/* style.css - Minimalist Design inspired by groups.php */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
    padding-bottom: 80px;
    font-size: 14px;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px;
}

/* ===== HEADER & TOP BAR ===== */
header {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e1e4e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

h1 {
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #4a5568;
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e1e4e8;
}

/* ===== ADMIN NAVIGATION ===== */
.admin-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e1e4e8;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 8px 12px;
    text-decoration: none;
    color: #4a5568;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.admin-nav a:hover {
    background: #f8f9fa;
    color: #6366f1;
}

.admin-nav a.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.export-btn {
    background: #10b981 !important;
    color: white !important;
    margin-left: auto;
}

.export-btn:hover {
    background: #059669 !important;
}

/* ===== WEEK SELECTOR ===== */
.week-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.week-selector h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.week-form select {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    background: white;
    font-size: 13px;
    color: #1a1a1a;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%236366f1"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.week-info, .month-info {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    color: #4a5568;
    border-left: 3px solid #6366f1;
}

.month-info {
    border-left-color: #10b981;
}

/* ===== PROBLEMS GRID ===== */
.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.problem-category {
    background: white;
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e1e4e8;
    border-top: 4px solid #6366f1;
}

.problem-category h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.leaders-list {
    margin-top: 8px;
}

.leaders-present strong,
.leaders-absent strong {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.leaders-present strong {
    color: #10b981;
}

.leaders-absent strong {
    color: #dc2626;
}

.leaders-list ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    max-height: 220px;
    overflow-y: auto;
}

.leaders-list li {
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.leaders-list li.present {
    background: #f0fdf4;
    color: #166534;
    border-left: 3px solid #10b981;
}

.leaders-list li.absent {
    background: #fef2f2;
    color: #991b1b;
    border-left: 3px solid #dc2626;
}

/* ===== SUMMARY CARD ===== */
.summary-card {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
}

.summary-card h3 {
    color: white;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.summary-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-size: 13px;
    opacity: 0.9;
}

.summary-value {
    font-size: 16px;
    font-weight: 700;
}

/* ===== TABLES PREMIUM MATERIAL DESIGN ===== */
.table-wrapper {
    overflow-x: auto;
    margin: 16px -16px;
    padding: 0 16px 16px 16px;
    width: calc(100% + 32px);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    /* overflow: hidden; -- Removed to fix sticky issues */
}

th {
    background: #4f46e5;
    color: white;
    padding: 14px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 20;
}

td {
    padding: 14px 12px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    vertical-align: middle;
}

/* Category Headers */
.header-category {
    font-size: 12px;
    padding: 8px;
    background: #3730a3;
    border-left: 1px solid rgba(255,255,255,0.1);
}

.header-category-care {
    background: #6d28d9;
}

.sub-header {
    background: #4f46e5;
    font-size: 9px;
    padding: 6px 4px;
}

.sub-header-care {
    background: #7c3aed;
}

.sticky-column {
    position: sticky !important;
    left: 0 !important;
    z-index: 30 !important;
    background: white;
    box-shadow: 4px 0 8px -2px rgba(0,0,0,0.15);
}

th.sticky-column {
    z-index: 50 !important;
    background: #312e81 !important;
    text-align: left;
}

td.sticky-column {
    background: white !important;
    font-weight: 600;
    min-width: 140px;
    padding: 12px 16px;
    text-align: left;
}

/* Ensure row hover doesn't break sticky background */
tr:hover td.sticky-column {
    background-color: #f5f3ff !important;
}

th:last-child {
    border-top-right-radius: 12px;
}

tr:hover td {
    background-color: #f5f3ff !important;
}

tr:hover td:first-child {
    background-color: #f5f3ff !important;
}

tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* Custom Checkbox Design */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    vertical-align: middle;
}

input[type="checkbox"]:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

input[type="checkbox"]:checked::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: bold;
}

input[type="checkbox"]:hover {
    border-color: #4f46e5;
    transform: scale(1.05);
}

input[type="checkbox"]:active {
    transform: scale(0.9);
}

/* Status Badges */
.badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    display: inline-block;
    margin-top: 2px;
}

.leader-badge { background: #e0e7ff; color: #4338ca; border: 1px solid #c7d2fe; }
.care-badge { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.trainee-badge { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* Mobile Optimization */
@media (max-width: 768px) {
    th, td {
        padding: 10px 6px;
        font-size: 11px;
    }
    
    input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    
    .table-wrapper {
        margin: 12px -12px;
        padding: 0 12px;
        width: calc(100% + 24px);
    }

    .sticky-column {
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 10px 8px !important;
    }
}

tr:nth-child(even) {
    background: #f8f9fa;
}

tr:hover {
    background: #f0f7ff;
}

/* Table specific styles */
.top-table th {
    background: #4f46e5;
}

.compact-table th {
    background: #7c3aed;
}

/* Status cells */
.present {
    background: #d1fae5;
    color: #065f46;
    font-weight: 500;
    border-radius: 4px;
}

.absent {
    background: #fee2e2;
    color: #991b1b;
    font-weight: 500;
    border-radius: 4px;
}

.post-present {
    background: #8b5cf6;
    color: white;
    font-weight: 500;
    border-radius: 4px;
}

.post-absent {
    background: #ede9fe;
    color: #5b21b6;
    font-weight: 500;
    border-radius: 4px;
}

.leader-row {
    background: #eff6ff;
    font-weight: 500;
}

.trainee-row {
    background: #f0f9ff;
    color: #0c4a6e;
}

.care-row {
    background: #fef3c7;
}

/* ===== BADGES ===== */
.attendance-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
    color: white;
    min-width: 50px;
}

.fasting-badge {
    background: #8b5cf6 !important;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
}

.perfect-attendance {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
}

/* ===== TOP PARTICIPANTS SECTIONS ===== */
.top-section {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e1e4e8;
}

.top-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* ===== LEADER REPORT GROUPS ===== */
.leader-report-group {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e1e4e8;
}

.leader-report-group h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* ===== ABSENCE REASON ===== */
.absence-reason-cell {
    min-width: 180px;
    max-width: 250px;
}

.absence-reason {
    font-size: 12px;
    color: #6b7280;
    padding: 6px 8px;
    background: #f9fafb;
    border-radius: 4px;
    word-break: break-word;
    line-height: 1.3;
}

/* ===== TRANSFER SECTION ===== */
.transfer-section {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e1e4e8;
}

.transfer-section h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.transfer-form h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 16px 0 12px 0;
}

/* ===== MESSAGES ===== */
.message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
}

.message-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.message-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    font-size: 13px;
    color: #1a1a1a;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-primary {
    background: #6366f1;
    color: white;
}

.btn-primary:hover {
    background: #4f46e5;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-large {
    padding: 14px 24px;
    font-size: 14px;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.select-member {
    background: #6366f1;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
}

.select-member:hover {
    background: #4f46e5;
}

.logout-btn {
    padding: 6px 12px;
    background: #fef2f2;
    color: #dc2626 !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #fee2e2;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #fee2e2;
    border-color: #fecaca;
}

/* Selected row */
.selected {
    background: #eff6ff !important;
    box-shadow: inset 0 0 0 2px #3b82f6;
}

.leader-row.selected {
    background: #f0f9ff !important;
    box-shadow: inset 0 0 0 2px #0ea5e9;
}

.trainee-row.selected {
    background: #f0fdf4 !important;
    box-shadow: inset 0 0 0 2px #10b981;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    border-top: 1px solid #e1e4e8;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6b7280;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    min-width: 60px;
}

.nav-item.active {
    color: #6366f1;
    background: #f0f7ff;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.nav-text {
    font-size: 11px;
    font-weight: 500;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .problems-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 8px;
    }
    
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    h1 {
        font-size: 16px;
    }
    
    .admin-nav {
        flex-direction: column;
    }
    
    .admin-nav a {
        width: 100%;
        text-align: center;
    }
    
    .problems-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .table-wrapper {
        margin: 8px -8px;
        padding: 0 8px;
        width: calc(100% + 16px);
    }
    
    th, td {
        font-size: 11px;
        padding: 8px 4px;
    }
    
    .absence-reason {
        font-size: 11px;
    }
    
    .bottom-nav {
        padding: 6px 0;
    }
    
    .nav-item {
        min-width: 50px;
        padding: 4px 6px;
    }
    
    .nav-icon {
        font-size: 18px;
    }
    
    .nav-text {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 12px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .week-form select {
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ===== UTILITY CLASSES ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.empty-state .icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-4 {
    margin-top: 16px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease-out;
}

/* ===== LOADING STATE ===== */
.loading {
    position: relative;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== REPORT TABLE STYLES ===== */
.report-table-container {
    position: relative;
    margin: 15px -12px;
    padding: 0 12px;
    width: calc(100% + 24px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
    background: white;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
}

.report-table th {
    background: #4a6fa5;
    color: white;
    padding: 10px 6px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.report-table th:last-child {
    border-right: none;
}

.report-table td {
    padding: 10px 6px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    vertical-align: middle;
    height: 45px;
    border-right: 1px solid #f0f0f0;
}

.report-table td:last-child {
    border-right: none;
}

/* Именной столбец - фиксированный */
.report-table .sticky-column {
    position: sticky !important;
    left: 0;
    background: white;
    z-index: 5;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    min-width: 220px;

    border-right: 1px solid #e1e4e8;
}

.report-table .name-header {
    z-index: 11;
    background: #3a5a80;
    min-width: 220px;
    width: 220px;
    text-align: left;
    padding-left: 15px;
}

.report-table .name-cell {
    text-align: left;
    padding-left: 15px;
    padding-right: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 45px;
}

/* Имя участника */
.member-name {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    overflow: hidden;
}

.member-name strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
    display: inline-block;
    font-weight: 500;
}

/* Бейджи статусов */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
}

.leader-badge {
    background: #3498db;
}

.care-badge {
    background: #e74c3c;
}

.trainee-badge {
    background: #f39c12;
}

/* Кнопка удаления */
.delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #e74c3c;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    border-radius: 50%;
    background: #fee;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
    line-height: 1;
    border: none;
    cursor: pointer;
    padding: 0;
}

.delete-btn:hover {
    background: #e74c3c;
    color: white;
    transform: scale(1.05);
}

/* Узкие столбцы с чекбоксами */
.report-table td:not(.sticky-column):not(.absence-reason-cell) {
    min-width: 55px;
    max-width: 60px;
    width: 55px;
    padding: 5px;
}

/* Чекбоксы */
.report-table input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    margin: 0;
    border-radius: 4px;
    border: 2px solid #ddd;
    transition: all 0.2s;
}

.report-table input[type="checkbox"]:checked {
    background-color: #4a6fa5;
    border-color: #4a6fa5;
}

/* Широкий столбец с причиной отсутствия */
.absence-reason-cell {
    min-width: 280px;
    max-width: 300px;
    width: 280px;
    text-align: left;
    padding: 8px 10px !important;
}

.absence-reason-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    transition: all 0.2s;
    background: #f8f9fa;
}

.absence-reason-input:focus {
    outline: none;
    border-color: #4a6fa5;
    background: white;
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.1);
}

/* Уменьшаем заголовки для узких столбцов */
.report-table th:not(.name-header):not(.absence-header) {

    font-size: 11px;
    padding: 10px 3px;
    line-height: 1.2;
}

/* Заголовок "Забота" */
.report-table .care-header {
    background: #4a6fa5;
    min-width: 165px;
}

/* Заголовок "Причина отсутствия" */
.report-table .absence-header {
    background: #4a6fa5;
    min-width: 280px;
    text-align: left;
    padding-left: 15px;
}

/* Даты в заголовке */
.dates-info {
    font-size: 9px;
    opacity: 0.9;
    font-weight: normal;
    display: block;
    margin-top: 2px;
    line-height: 1.1;
    color: rgba(255,255,255,0.9);
}

/* Цвета строк */
.report-table .leader-row {
    background: #f0f9ff;
}

.report-table .care-row {
    background: #fff8e1;
}

.report-table .trainee-row {
    background: #f0fff4;
}

.report-table .member-row {
    background: white;
}

.report-table tr:hover {
    background: #f8fafc !important;
}

/* Индикаторы прокрутки */
.report-table-container .scroll-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(74, 111, 165, 0.9);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.report-table-container .scroll-indicator.left {
    left: 8px;
}

.report-table-container .scroll-indicator.right {
    right: 8px;
}

.report-table-container .scroll-indicator.show {
    opacity: 1;
    pointer-events: auto;
}

.report-table-container .scroll-indicator:hover {
    background: #4a6fa5;
    transform: translateY(-50%) scale(1.1);
}

/* Форма добавления участника */
.add-member-card {
    background: #f8f9fa;
    border-left: 4px solid #4a6fa5;
    margin-bottom: 20px;
}

.add-member-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    align-items: end;
}

.form-group {
    margin-bottom: 0;
}

.form-input-large,
.form-select-large {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    box-sizing: border-box;
}

.form-input-large:focus,
.form-select-large:focus {
    outline: none;
    border-color: #4a6fa5;
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.1);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    margin-right: 6px;
}

/* Кнопка сохранения отчета */
.form-actions {
    text-align: center;
    margin-top: 20px;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.form-actions .btn-large {
    padding: 12px 30px;
    font-size: 16px;
    background: #4a6fa5;
}

.form-actions .btn-large:hover {
    background: #3a5a80;
}

/* Сообщения */
.success, .error {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
}

.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.error ul {
    margin: 8px 0 0 20px;
    padding-left: 0;
}

/* Адаптивность для таблицы отчетов */
@media (max-width: 1200px) {
    .report-table {
        min-width: 1000px;
    }
    
    .report-table .sticky-column {
        min-width: 200px;
        width: 200px;
    }
    
    .report-table .name-header {
        min-width: 200px;
        width: 200px;
    }
    
    .member-name strong {
        max-width: 110px;
    }
}

@media (max-width: 768px) {
    .report-table-container {
        margin: 10px -8px;
        padding: 0 8px;
        width: calc(100% + 16px);
        border-radius: 4px;
    }
    
    .report-table {
        min-width: 900px;
    }
    
    .report-table .sticky-column {
        min-width: 180px;
        width: 180px;
    }
    
    .report-table .name-header {
        min-width: 180px;
        width: 180px;
        padding-left: 12px;
    }
    
    .report-table .name-cell {
        padding-left: 12px;
        padding-right: 12px;
        height: 42px;
    }
    
    .member-name strong {
        max-width: 90px;
        font-size: 12px;
    }
    
    .badge {
        font-size: 7px;
        padding: 1px 6px;
        font-weight: 400;
    }
    
    .delete-btn {
        width: 22px;
        height: 22px;
        font-size: 12px;
        margin-left: 6px;
    }
    
    .report-table td:not(.sticky-column):not(.absence-reason-cell) {
        min-width: 50px;
        max-width: 55px;
        width: 50px;
        padding: 4px;
    }
    
    .report-table th:not(.name-header):not(.absence-header) {

        font-size: 10px;
        padding: 8px 2px;
    }
    
    .report-table input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }
    
    .absence-reason-cell {
        min-width: 240px;
        max-width: 260px;
        width: 240px;
        padding: 6px 8px !important;
    }
    
    .absence-reason-input {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .add-member-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .form-input-large,
    .form-select-large {
        font-size: 13px;
        padding: 8px 10px;
    }
    
    .report-table-container .scroll-indicator {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .report-table {
        min-width: 850px;
    }
    
    .report-table .sticky-column {
        min-width: 190px;
        width: 190px;
    }
    
    .report-table .name-header {
        min-width: 190px;
        width: 190px;
        padding-left: 10px;
    }
    
    .report-table .name-cell {
        padding-left: 10px;
        padding-right: 10px;
        height: 40px;
    }
    
    .member-name strong {
        max-width: 100px;
        font-size: 11px;
    }
    
    .report-table td:not(.sticky-column):not(.absence-reason-cell) {
        min-width: 45px;
        max-width: 50px;
        width: 45px;
        padding: 3px;
    }
    
    .report-table th:not(.name-header):not(.absence-header) {

        font-size: 9px;
        padding: 6px 1px;
    }
    
    .absence-reason-cell {
        min-width: 220px;
        max-width: 240px;
        width: 220px;
    }
    
    .form-actions .btn-large {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Анимация пульсации для индикаторов */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 111, 165, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(74, 111, 165, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 111, 165, 0);
    }
}

.report-table-container .scroll-indicator.show {
    animation: pulse 2s infinite;
}

/* ===== EDIT NAME FORM ===== */
.edit-name-form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.edit-name-input {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
}

.edit-name-btn {
    padding: 5px 15px;
    background-color: #4a6fa5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.edit-name-btn:hover {
    background-color: #3a5a80;
}

.user-info-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.edit-name-toggle {
    background: none;
    border: none;
    color: #4a6fa5;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    text-decoration: underline;
}

.edit-name-toggle:hover {
    color: #3a5a80;
}

/* Fix для нижней навигации */
.container {
    padding-bottom: 70px;
}
.report-table {
    border-collapse: separate; /* Изменено с collapse на separate */
    table-layout: fixed; /* Добавлено для фиксированной ширины столбцов */
}

/* Именной столбец - фиксированный */
.report-table .sticky-column {
    width: 220px; /* Добавлена фиксированная ширина */
}

.report-table .name-header {
    width: 220px; /* Добавлена фиксированная ширина */
    position: sticky;
    left: 0; /* Фиксируем слева */
}

/* Обновляем z-index для sticky-column */
.report-table tr .sticky-column {
    z-index: 5;
}

/* Увеличиваем z-index для строк при наведении */
.report-table tr:hover .sticky-column {
    z-index: 6; /* Выше чем у обычных строк */
}



/* Заголовок "Причина отсутствия" */
.report-table .absence-header {
    width: 280px; /* Добавлена фиксированная ширина */
}

/* Широкий столбец с причиной отсутствия */
.absence-reason-cell {
    width: 280px; /* Добавлена фиксированная ширина */
}

.report-table thead {
    z-index: 7;
}

/* Заголовок "Забота" */
.report-table .care-header {
    width: 165px; /* Добавлена фиксированная ширина */
}

/* Адаптивность для таблицы отчетов */
@media (max-width: 1200px) {
    .report-table .sticky-column,
    .report-table .name-header {
        width: 200px;
    }
    
    .absence-reason-cell,
    .report-table .absence-header {
        width: 260px;
    }
    
    .report-table .care-header {
        width: 150px;
    }
}

@media (max-width: 768px) {
    .report-table .sticky-column,
    .report-table .name-header {
        width: 180px;
    }
    
    .absence-reason-cell,
    .report-table .absence-header {
        width: 240px;
    }
    
    .report-table .care-header {
        width: 135px;
    }
}

@media (max-width: 480px) {
    .report-table .sticky-column,
    .report-table .name-header {
        width: 190px;
    }
    
    .absence-reason-cell,
    .report-table .absence-header {
        width: 220px;
    }
    
    .report-table .care-header {
        width: 120px;
    }
}
/* ===== LOGIN PAGE STYLES ===== */
.login-page {
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e1e4e8;
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
}

.login-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    font-size: 13px;
    color: #1a1a1a;
    background: white;
}

.login-form input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-block {

}

.login-hint {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e4e8;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 20px;
    border-left: 4px solid #dc2626;
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .login-container {
        padding: 20px;
    }
    
    .login-container h1 {
        font-size: 16px;
    }
}