:root {
    --primary: #1a5f23;
    --primary-light: #2e7d32;
    --primary-lighter: #4caf50;
    --secondary: #81c784;
    --accent: #a5d6a7;
    --background: #f8faf9;
    --surface: #ffffff;
    --text-primary: #1e3a2a;
    --text-secondary: #5d7c6b;
    --text-tertiary: #8a9b93;
    --border: #e0e7e3;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --info: #2196f3;
    --shadow-sm: 0 2px 8px rgba(30, 58, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(30, 58, 42, 0.08);
    --shadow-lg: 0 8px 32px rgba(30, 58, 42, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --bottom-nav-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: var(--bottom-nav-height);
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: transform var(--transition);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.logo-section {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.university-short {
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
    line-height: 1.2;
}

.nav-section {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    padding: 0 20px 12px;
    font-weight: 600;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(129, 199, 132, 0.08);
    color: var(--primary);
}

.nav-link.active {
    background-color: rgba(129, 199, 132, 0.12);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.user-section {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0;
    transition: var(--transition);
    width: 100%;
}

.topbar {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: var(--shadow-sm);
    min-height: 72px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-input {
    padding: 12px 16px 12px 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    font-size: 15px;
    width: 100%;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 16px;
}

.notification-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.notification-btn:hover {
    background-color: rgba(129, 199, 132, 0.08);
    color: var(--primary);
}

.page-content {
    padding: 24px;
}

.quick-actions {
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-link {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.section-link:hover {
    text-decoration: underline;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.action-card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

.action-card:active {
    transform: scale(0.98);
}

.action-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: var(--transition);
}

.action-card:hover::after {
    opacity: 1;
}

.action-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(129, 199, 132, 0.1), rgba(76, 175, 80, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 24px;
    color: var(--primary);
    transition: var(--transition);
}

.action-card:hover .action-icon {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.action-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 17px;
}

.action-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.info-card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.info-card-content {
    padding: 10px 0;
}

.info-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item h3 {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.info-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.schedule-info-card {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.2));
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(33, 150, 243, 0.3);
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.1);
}

.schedule-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.schedule-info-icon {
    color: var(--info);
    font-size: 1.2rem;
}

.schedule-info-header h3 {
    font-weight: 600;
    color: var(--text-primary);
}

.schedule-info-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.schedule-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.schedule-control-group {
    display: flex;
    gap: 10px;
    background: var(--surface);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.control-btn {
    padding: 10px 15px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.control-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
}

.control-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.today-btn {
    background: linear-gradient(135deg, var(--warning), #ffb300);
    color: white;
}

.today-btn:hover {
    background: linear-gradient(135deg, #ffb300, var(--warning));
}

.date-search-container {
    margin-bottom: 20px;
}

.date-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    max-width: 400px;
}

.date-search-label {
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-primary);
}

.date-input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
    flex: 1;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.date-search-btn {
    padding: 8px 15px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.date-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.week-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 20px;
    max-width: 300px;
}

.week-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-light);
    animation: pulse 2s infinite;
}

.week-dot.even {
    background: var(--accent);
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.day-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.day-btn {
    padding: 10px 15px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    border: 1px solid var(--border);
}

.day-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
}

.day-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.schedule-section {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.schedule-section h2 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-container {
    width: 100%;
    height: 6px;
    background: var(--background);
    border-radius: 3px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--accent));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.day-progress {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.schedule-list {
    list-style: none;
}

.lesson-item {
    margin: 12px 0;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--background);
    border-left: 4px solid var(--primary-light);
    transition: var(--transition);
}

.lesson-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.lesson-item.past {
    opacity: 0.6;
    border-left-color: var(--text-tertiary);
}

.lesson-item.current {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: var(--success);
    animation: pulseCurrent 2s infinite;
}

@keyframes pulseCurrent {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(76, 175, 80, 0); }
}

.lesson-item strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 15px;
}

.lesson-time {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lesson-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(33, 150, 243, 0.1);
    font-size: 13px;
    color: var(--info);
}

.status-current {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.status-next {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: none;
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.mobile-menu-btn:active {
    background-color: rgba(129, 199, 132, 0.1);
    color: var(--primary);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    display: none;
    z-index: 1000;
    height: var(--bottom-nav-height);
    padding: 8px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.bottom-nav-list {
    display: flex;
    list-style: none;
    height: 100%;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
}

.bottom-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 11px;
    gap: 4px;
    transition: var(--transition);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.bottom-nav-link:active {
    background-color: rgba(129, 199, 132, 0.1);
    color: var(--primary);
}

.bottom-nav-link.active {
    color: var(--primary);
}

.bottom-nav-icon {
    font-size: 20px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 58, 42, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@media (max-width: 1200px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 992px) {
    .actions-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        max-width: 240px;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 20px 16px;
    }
    
    .topbar {
        padding: 16px;
    }
    
    .topbar-left {
        gap: 12px;
    }
    
    .search-container {
        max-width: 200px;
    }
    
    .section-title {
        font-size: 17px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .schedule-controls {
        flex-direction: column;
    }
    
    .schedule-control-group {
        width: 100%;
        justify-content: center;
    }
    
    .date-search {
        flex-direction: column;
        align-items: stretch;
        max-width: 100%;
    }
    
    .date-search-label {
        text-align: center;
    }
    
    .day-nav {
        justify-content: center;
    }
    
    .schedule-section {
        padding: 20px;
    }
    
    .bottom-nav {
        display: block;
    }
    
    body {
        padding-bottom: var(--bottom-nav-height);
    }
}

@media (max-width: 576px) {
    .page-content {
        padding: 16px 12px;
    }
    
    .topbar {
        padding: 12px;
        min-height: 64px;
    }
    
    .search-container {
        display: none;
    }
    
    .search-container.mobile-visible {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 12px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        max-width: none;
        z-index: 800;
    }
    
    .info-card {
        padding: 16px;
    }
    
    .control-btn, .day-btn {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .lesson-item {
        padding: 12px;
    }
    
    .lesson-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 380px) {
    .page-title {
        font-size: 16px;
    }
    
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
    }
    
    .notification-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .action-card {
        padding: 16px;
    }
    
    .action-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .action-title {
        font-size: 16px;
    }
}

@supports (-webkit-touch-callout: none) {
    .bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    }
    
    body {
        padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    }
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}
.journal-header {
    text-align: center;
    margin-bottom: 30px;
}

.journal-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.journal-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.journal-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 10px;
    background: var(--surface);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-light);
}

.filter-btn {
    padding: 8px 15px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.attendance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-card.present {
    border-top: 4px solid var(--success);
}

.stat-card.absent {
    border-top: 4px solid var(--danger);
}

.stat-card.late {
    border-top: 4px solid var(--warning);
}

.stat-card.percentage {
    border-top: 4px solid var(--info);
}

.journal-table-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 30px;
    overflow-x: auto;
}

.journal-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.journal-table th {
    background: var(--background);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
}

.journal-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.journal-table tr:hover {
    background: rgba(129, 199, 132, 0.05);
}

.student-name {
    font-weight: 500;
    color: var(--text-primary);
}

.attendance-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-present {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.status-absent {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
}

.status-late {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.status-excused {
    background: rgba(33, 150, 243, 0.1);
    color: var(--info);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    font-weight: 500;
}

.action-btn:hover {
    background: rgba(76, 175, 80, 0.1);
}

.action-btn.edit {
    background: rgba(33, 150, 243, 0.1);
    color: var(--info);
}

.action-btn.delete {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: var(--danger);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

.btn-primary {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.btn-secondary {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(129, 199, 132, 0.1);
}

.legend {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-present {
    background: var(--success);
}

.legend-absent {
    background: var(--danger);
}

.legend-late {
    background: var(--warning);
}

.legend-excused {
    background: var(--info);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

@media (max-width: 768px) {
    .journal-filters {
        flex-direction: column;
    }
    
    .filter-group {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-select {
        min-width: auto;
    }
    
    .attendance-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .journal-table-container {
        padding: 15px;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .attendance-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .legend {
        justify-content: center;
    }
}

.date-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.date-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.date-btn:hover {
    background: rgba(76, 175, 80, 0.1);
}

.current-date-display {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 150px;
    text-align: center;
}

.add-date-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.add-date-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.attendance-legend {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--background);
    border: 1px solid var(--border);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-sm);
}

.legend-present {
    background: var(--success);
}

.legend-absent {
    background: var(--danger);
}

.legend-late {
    background: var(--warning);
}

.legend-excused {
    background: var(--info);
}

.group-table-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 30px;
    overflow-x: auto;
}

.group-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.group-table th {
    background: var(--background);
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.group-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    vertical-align: middle;
}

.group-table tr:hover {
    background: rgba(129, 199, 132, 0.05);
}

.student-info {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.student-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.student-name {
    font-weight: 500;
    color: var(--text-primary);
}

.attendance-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.status-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
}

.status-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.status-btn.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

.status-present-btn {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.status-absent-btn {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
}

.status-late-btn {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.status-excused-btn {
    background: rgba(33, 150, 243, 0.1);
    color: var(--info);
}

.day-lessons {
    margin-bottom: 30px;
}

.day-lessons h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.lessons-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lesson-tag {
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    background: var(--background);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.lesson-tag:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--primary-light);
}

.lesson-tag.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: var(--primary);
}

.journal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.save-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.export-btn {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.export-btn:hover {
    background: rgba(76, 175, 80, 0.1);
}

.quick-actions-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quick-action-btn {
    padding: 8px 15px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.quick-action-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--primary-light);
}

.dates-list {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.date-chip {
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    background: var(--background);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-chip:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--primary-light);
}

.date-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: var(--primary);
}

.lesson-info {
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.lesson-info h4 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.lesson-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--text-primary);
    color: white;
    text-align: center;
    border-radius: var(--radius-sm);
    padding: 8px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    font-weight: normal;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

@media (max-width: 768px) {
    .date-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-navigation {
        justify-content: center;
    }
    
    .add-date-btn {
        width: 100%;
        justify-content: center;
    }
    
    .attendance-legend {
        justify-content: center;
    }
    
    .quick-actions-row {
        justify-content: center;
    }
    
    .journal-actions {
        flex-direction: column;
    }
    
    .save-btn, .export-btn {
        width: 100%;
        justify-content: center;
    }
    
    .group-table-container {
        padding: 10px;
    }
    
    .group-table th,
    .group-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .student-info {
        gap: 8px;
    }
    
    .student-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .status-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .attendance-legend {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .legend-item {
        width: 100%;
        justify-content: space-between;
    }
    
    .lessons-list {
        flex-direction: column;
    }
    
    .lesson-tag {
        justify-content: center;
    }
    
    .lesson-details {
        grid-template-columns: 1fr;
    }
}

.lesson-cell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 120px;
    padding: 8px 4px;
}

.lesson-header {
    text-align: center;
    margin-bottom: 8px;
    width: 100%;
}

.attendance-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    align-items: center;
}

.status-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.status-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.status-btn.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

@media (max-width: 768px) {
    .lesson-cell-content {
        min-height: 100px;
        padding: 6px 2px;
    }
    
    .status-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .lesson-header div {
        font-size: 10px !important;
    }
}

@media (max-width: 480px) {
    .lesson-cell-content {
        min-height: 90px;
    }
    
    .status-btn {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .attendance-buttons {
        gap: 3px;
    }
}

.date-selector-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.selector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.selector-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.dates-count {
    font-size: 14px;
    color: var(--text-tertiary);
    background: var(--background);
    padding: 4px 8px;
    border-radius: 12px;
}

.date-quick-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 15px;
    transition: var(--transition);
}

.date-quick-select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.quick-access-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.date-quick-card {
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 10px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    text-align: center;
}

.date-quick-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
}

.date-quick-card.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: var(--primary);
    color: white;
}

.date-quick-card.active .date-card-content {
    color: white;
}

.date-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.date-card-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.date-card-day {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.date-card-month {
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.8;
}

.date-card-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
}

.date-card-weekday {
    opacity: 0.8;
}

.date-card-week {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
}

.date-card-week.even {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success);
}

.date-card-week.odd {
    background: rgba(33, 150, 243, 0.2);
    color: var(--info);
}

.date-quick-card.active .date-card-week.even {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.date-quick-card.active .date-card-week.odd {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.date-management-section {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.date-management-btn {
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
}

.date-management-btn.add-date {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.date-management-btn.delete-date {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.date-management-btn.view-all {
    background: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.date-management-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.date-management-btn.add-date:hover {
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.date-management-btn.delete-date:hover {
    background: rgba(244, 67, 54, 0.2);
}

.date-management-btn.view-all:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--primary-light);
}

.empty-dates-message {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-tertiary);
}

.empty-dates-message i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-dates-message p {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-subtext {
    font-size: 14px !important;
    opacity: 0.7;
}

.large-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.all-dates-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.all-dates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.dates-summary {
    font-size: 14px;
    color: var(--text-secondary);
}

.dates-summary strong {
    color: var(--primary);
    font-weight: 600;
}

.search-dates-container {
    flex: 1;
    max-width: 200px;
}

.search-dates-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 13px;
}

.search-dates-input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.all-dates-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    margin-bottom: 15px;
}

.all-date-item {
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 12px 15px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.all-date-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.all-date-item.current {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--primary-light);
}

.date-item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-item-info {
    flex: 1;
}

.date-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.date-item-day {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    min-width: 80px;
}

.date-item-date {
    font-size: 14px;
    color: var(--text-primary);
}

.date-item-details {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.week-type-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.week-type-badge.even {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.week-type-badge.odd {
    background: rgba(33, 150, 243, 0.1);
    color: var(--info);
}

.lessons-count {
    opacity: 0.8;
}

.date-comment {
    font-style: italic;
    opacity: 0.7;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.date-item-actions {
    display: flex;
    gap: 5px;
}

.date-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.date-action-btn:hover {
    transform: scale(1.1);
}

.date-action-btn.select-date:hover {
    background: rgba(76, 175, 80, 0.1);
    color: var(--primary);
}

.date-action-btn.delete-date:hover {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
}

.no-dates-found {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
}

.no-dates-found i {
    font-size: 36px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-dates-found p {
    font-size: 14px;
}

.dates-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
    .quick-access-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .date-management-section {
        flex-direction: column;
    }
    
    .date-management-btn {
        width: 100%;
    }
    
    .all-dates-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .search-dates-container {
        max-width: none;
    }
    
    .date-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .date-item-day {
        min-width: auto;
    }
    
    .date-item-details {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .date-comment {
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .quick-access-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .date-card-day {
        font-size: 18px;
    }
    
    .date-card-month {
        font-size: 10px;
    }
    
    .date-card-info {
        flex-direction: column;
        gap: 3px;
    }
    
    .all-date-item {
        padding: 10px;
    }
    
    .date-item-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .date-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.lesson-cell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 120px;
    padding: 8px 4px;
}

.lesson-header {
    text-align: center;
    margin-bottom: 8px;
    width: 100%;
}

.attendance-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    align-items: center;
}

.status-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.status-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.status-btn.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

@media (max-width: 768px) {
    .lesson-cell-content {
        min-height: 100px;
        padding: 6px 2px;
    }
    
    .status-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .lesson-header div {
        font-size: 10px !important;
    }
}

@media (max-width: 480px) {
    .lesson-cell-content {
        min-height: 90px;
    }
    
    .status-btn {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .attendance-buttons {
        gap: 3px;
    }
}

.import-export-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.import-btn {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.import-btn:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: var(--info);
}

.import-instructions {
    background: rgba(33, 150, 243, 0.05);
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(33, 150, 243, 0.1);
}

.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.instruction-item:last-child {
    margin-bottom: 0;
}

.instruction-item i {
    color: var(--info);
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.instruction-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.instruction-item strong {
    color: var(--warning);
}

.import-form {
    margin-bottom: 20px;
}

.file-input {
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    cursor: pointer;
    transition: var(--transition);
}

.file-input:hover {
    border-color: var(--primary-light);
    background: rgba(76, 175, 80, 0.05);
}

.file-info {
    margin-top: 10px;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--background);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.file-details i {
    font-size: 24px;
    color: var(--primary);
}

.file-size {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.import-options {
    margin-top: 20px;
    padding: 15px;
    background: var(--background);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.option-description {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
    margin-left: 28px;
    line-height: 1.4;
}

.student-lastname-mobile {
    display: none;
    font-size: 10px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    opacity: 0.7;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.date-selector-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.selector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.selector-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.dates-count {
    font-size: 14px;
    color: var(--text-tertiary);
    background: var(--background);
    padding: 4px 8px;
    border-radius: 12px;
}

.date-quick-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 15px;
    transition: var(--transition);
}

.date-quick-select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.quick-access-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.date-quick-card {
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 10px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    text-align: center;
}

.date-quick-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
}

.date-quick-card.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: var(--primary);
    color: white;
}

.date-quick-card.active .date-card-content {
    color: white;
}

.date-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.date-card-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.date-card-day {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.date-card-month {
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.8;
}

.date-card-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
}

.date-card-weekday {
    opacity: 0.8;
}

.date-card-week {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
}

.date-card-week.even {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success);
}

.date-card-week.odd {
    background: rgba(33, 150, 243, 0.2);
    color: var(--info);
}

.date-quick-card.active .date-card-week.even {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.date-quick-card.active .date-card-week.odd {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.date-management-section {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.date-management-btn {
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
}

.date-management-btn.add-date {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.date-management-btn.delete-date {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.date-management-btn.view-all {
    background: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.date-management-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.date-management-btn.add-date:hover {
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.date-management-btn.delete-date:hover {
    background: rgba(244, 67, 54, 0.2);
}

.date-management-btn.view-all:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--primary-light);
}

.empty-dates-message {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-tertiary);
}

.empty-dates-message i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-dates-message p {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-subtext {
    font-size: 14px !important;
    opacity: 0.7;
}

.large-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.all-dates-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.all-dates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.dates-summary {
    font-size: 14px;
    color: var(--text-secondary);
}

.dates-summary strong {
    color: var(--primary);
    font-weight: 600;
}

.search-dates-container {
    flex: 1;
    max-width: 200px;
}

.search-dates-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 13px;
}

.search-dates-input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.all-dates-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    margin-bottom: 15px;
}

.all-date-item {
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 12px 15px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.all-date-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.all-date-item.current {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--primary-light);
}

.date-item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-item-info {
    flex: 1;
}

.date-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.date-item-day {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    min-width: 80px;
}

.date-item-date {
    font-size: 14px;
    color: var(--text-primary);
}

.date-item-details {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.week-type-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.week-type-badge.even {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.week-type-badge.odd {
    background: rgba(33, 150, 243, 0.1);
    color: var(--info);
}

.lessons-count {
    opacity: 0.8;
}

.date-comment {
    font-style: italic;
    opacity: 0.7;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.date-item-actions {
    display: flex;
    gap: 5px;
}

.date-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.date-action-btn:hover {
    transform: scale(1.1);
}

.date-action-btn.select-date:hover {
    background: rgba(76, 175, 80, 0.1);
    color: var(--primary);
}

.date-action-btn.delete-date:hover {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
}

.no-dates-found {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
}

.no-dates-found i {
    font-size: 36px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-dates-found p {
    font-size: 14px;
}

.dates-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.lesson-cell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 120px;
    padding: 8px 4px;
    position: relative;
}

.lesson-header {
    text-align: center;
    margin-bottom: 8px;
    width: 100%;
}

.attendance-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    align-items: center;
}

.status-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.status-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.status-btn.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

@media (max-width: 768px) {
    .student-lastname-mobile {
        display: block;
    }
    
    .lesson-cell-content {
        min-height: 110px;
        padding: 6px 2px;
    }
    
    .status-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .lesson-header div {
        font-size: 10px !important;
    }
    
    .import-export-container {
        flex-direction: column;
    }
    
    .import-btn, .export-btn {
        width: 100%;
        justify-content: center;
    }

    .quick-access-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .date-management-section {
        flex-direction: column;
    }
    
    .date-management-btn {
        width: 100%;
    }
    
    .group-table th, .group-table td {
        padding: 8px 6px;
    }
    
    .student-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
    }
    
    .student-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .student-name {
        font-size: 12px;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .lesson-cell-content {
        min-height: 100px;
        padding: 4px 2px;
    }
    
    .status-btn {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .attendance-buttons {
        gap: 3px;
    }
    
    .student-lastname-mobile {
        font-size: 9px;
        margin-bottom: 3px;
    }
    
    .quick-access-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .date-card-day {
        font-size: 18px;
    }
    
    .date-card-month {
        font-size: 10px;
    }
    
    .date-card-info {
        flex-direction: column;
        gap: 3px;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .large-modal {
        max-height: 90vh;
    }
    
    .all-dates-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .search-dates-container {
        max-width: none;
    }
    
    .date-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .date-item-day {
        min-width: auto;
    }
    
    .date-item-details {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .date-comment {
        max-width: 100px;
    }
    
    .date-item-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .date-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.delete-all-dates-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: 10px;
}

.delete-all-dates-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.lesson-cell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 120px;
    padding: 8px 4px;
    position: relative;
}

.lesson-header {
    text-align: center;
    margin-bottom: 8px;
    width: 100%;
}

.attendance-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    align-items: center;
}

.status-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.status-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.status-btn.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

.student-lastname-mobile {
    display: none;
    font-size: 10px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    opacity: 0.7;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .student-lastname-mobile {
        display: block;
    }
    
    .lesson-cell-content {
        min-height: 110px;
        padding: 6px 2px;
    }
    
    .status-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .lesson-header div {
        font-size: 10px !important;
    }
}

@media (max-width: 480px) {
    .lesson-cell-content {
        min-height: 100px;
        padding: 4px 2px;
    }
    
    .status-btn {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .attendance-buttons {
        gap: 3px;
    }
    
    .student-lastname-mobile {
        font-size: 9px;
        margin-bottom: 3px;
    }
}

.schedule-widget {
    margin-bottom: 24px;
}

.upcoming-lessons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upcoming-lesson {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 16px;
    border-left: 4px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.upcoming-lesson:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.lesson-time {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 120px;
}

.lesson-info {
    flex: 1;
}

.lesson-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.lesson-room {
    font-size: 13px;
    color: var(--text-tertiary);
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: var(--text-secondary);
}

.loading-spinner i {
    font-size: 18px;
}

@media (max-width: 768px) {
    .upcoming-lesson {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .lesson-time {
        min-width: auto;
    }
}


.settings-container {
    max-width: 1000px;
    margin: 0 auto;
}

.settings-user-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 24px;
    flex-shrink: 0;
}

.user-info-large {
    flex: 1;
    min-width: 200px;
}

.user-info-large h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.user-info-large .user-role {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.user-info-large .user-group {
    font-size: 14px;
    color: var(--text-tertiary);
    padding: 6px 12px;
    background: var(--background);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.edit-profile-btn {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.edit-profile-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--primary-light);
}

.settings-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 25px;
}

.settings-section .section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section .section-title i {
    color: var(--primary);
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 15px;
}

.setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-info {
    flex: 1;
    min-width: 250px;
}

.setting-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.setting-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.setting-control {
    flex-shrink: 0;
}

.theme-switcher {
    display: flex;
    gap: 10px;
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 4px;
    border: 1px solid var(--border);
}

.theme-option {
    padding: 10px 15px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: var(--transition);
    flex: 1;
    justify-content: center;
}

.theme-option:hover {
    background: rgba(76, 175, 80, 0.1);
}

.theme-option.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: var(--shadow-sm);
}

.color-picker {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    padding: 8px;
    border-radius: var(--radius-sm);
}

.color-option:hover {
    background: rgba(76, 175, 80, 0.1);
}

.color-option.active {
    background: rgba(76, 175, 80, 0.1);
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-option.active .color-preview {
    border: 3px solid var(--primary);
}

.color-option span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.color-option.active span {
    color: var(--primary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-tertiary);
    transition: var(--transition);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.setting-select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 150px;
    transition: var(--transition);
}

.setting-select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.btn-secondary, .btn-primary, .btn-danger {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-secondary {
    background: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--primary-light);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.warning-message {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

.warning-message i {
    font-size: 48px;
    color: var(--warning);
    margin-bottom: 15px;
}

.warning-message p {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.warning-subtext {
    font-size: 14px !important;
    color: var(--text-secondary) !important;
    line-height: 1.5;
}

.reset-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: slideIn 0.5s ease forwards;
}

@media (max-width: 768px) {
    .settings-user-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .user-info-large {
        min-width: auto;
    }
    
    .edit-profile-btn {
        width: 100%;
        justify-content: center;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }
    
    .setting-info {
        min-width: auto;
    }
    
    .setting-control {
        width: 100%;
    }
    
    .theme-switcher {
        width: 100%;
    }
    
    .color-picker {
        justify-content: center;
    }
    
    .settings-actions {
        flex-direction: column;
    }
    
    .settings-actions button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .settings-section {
        padding: 20px;
    }
    
    .theme-option {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .color-option {
        min-width: 70px;
    }
    
    .color-preview {
        width: 32px;
        height: 32px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px;
    z-index: 100;
    overflow-y: auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.university-short {
    font-size: 12px;
    color: var(--text-secondary);
}

.nav-section {
    margin-bottom: 30px;
}

.nav-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.nav-link:hover {
    background: rgba(129, 199, 132, 0.1);
    color: var(--primary);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(26, 95, 35, 0.1), rgba(76, 175, 80, 0.1));
    color: var(--primary);
    font-weight: 500;
}

.nav-icon {
    width: 20px;
    text-align: center;
}

.user-section {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--background);
    border-radius: var(--radius-md);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.notification-btn:hover {
    background: rgba(129, 199, 132, 0.1);
    color: var(--primary);
}

.main-content {
    margin-left: 250px;
    min-height: 100vh;
    padding-bottom: 70px;
}

.topbar {
    position: sticky;
    top: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
}

.actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-container {
    position: relative;
    width: 300px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

.search-input {
    width: 100%;
    padding: 10px 15px 10px 45px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.mobile-search-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.page-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 100;
}

.bottom-nav-list {
    display: flex;
    list-style: none;
    height: 60px;
}

.bottom-nav-item {
    flex: 1;
}

.bottom-nav-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 12px;
    transition: var(--transition);
}

.bottom-nav-link:hover,
.bottom-nav-link.active {
    color: var(--primary);
}

.bottom-nav-icon {
    font-size: 18px;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .overlay.active {
        display: block;
    }
    
    .search-container {
        display: none;
    }
    
    .mobile-search-btn {
        display: flex;
    }
    
    .bottom-nav {
        display: block;
    }
    
    .page-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 15px;
    }
    
    .topbar {
        padding: 12px 15px;
    }
    
    .journal-header h1 {
        font-size: 24px;
    }
    
    .date-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-navigation {
        justify-content: center;
    }
    
    .attendance-legend {
        justify-content: center;
    }
    
    .quick-actions-row {
        justify-content: center;
    }
    
    .journal-actions {
        flex-direction: column;
        gap: 10px;
    }
}
/* ОСНОВНЫЕ ПЕРЕМЕННЫЕ И СТИЛИ */
:root {
    --primary: #1a5f23;
    --primary-light: #2e7d32;
    --primary-lighter: #4caf50;
    --secondary: #81c784;
    --accent: #a5d6a7;
    --background: #f8faf9;
    --surface: #ffffff;
    --text-primary: #1e3a2a;
    --text-secondary: #5d7c6b;
    --text-tertiary: #8a9b93;
    --border: #e0e7e3;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --info: #2196f3;
    --shadow-sm: 0 2px 8px rgba(30, 58, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(30, 58, 42, 0.08);
    --shadow-lg: 0 8px 32px rgba(30, 58, 42, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --bottom-nav-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: var(--bottom-nav-height);
}

/* СТИЛИ ЖУРНАЛА (из journal.html) */
.journal-header {
    text-align: center;
    margin-bottom: 30px;
}

.journal-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.journal-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.date-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.date-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.date-btn:hover {
    background: rgba(76, 175, 80, 0.1);
}

.current-date-display {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 150px;
    text-align: center;
}

.add-date-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.add-date-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.attendance-legend {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--background);
    border: 1px solid var(--border);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-sm);
}

.legend-present {
    background: var(--success);
}

.legend-absent {
    background: var(--danger);
}

.legend-late {
    background: var(--warning);
}

.legend-excused {
    background: var(--info);
}

.group-table-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 30px;
    overflow-x: auto;
}

.group-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.group-table th {
    background: var(--background);
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.group-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    vertical-align: middle;
}

.group-table tr:hover {
    background: rgba(129, 199, 132, 0.05);
}

.student-info {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.student-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.student-name {
    font-weight: 500;
    color: var(--text-primary);
}

.attendance-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.status-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
}

.status-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.status-btn.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

.status-present-btn {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.status-absent-btn {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
}

.status-late-btn {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.status-excused-btn {
    background: rgba(33, 150, 243, 0.1);
    color: var(--info);
}

.day-lessons {
    margin-bottom: 30px;
}

.day-lessons h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.lessons-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lesson-tag {
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    background: var(--background);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.lesson-tag:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--primary-light);
}

.lesson-tag.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: var(--primary);
}

.journal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.save-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.export-btn {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.export-btn:hover {
    background: rgba(76, 175, 80, 0.1);
}

.attendance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-card.present {
    border-top: 4px solid var(--success);
}

.stat-card.absent {
    border-top: 4px solid var(--danger);
}

.stat-card.late {
    border-top: 4px solid var(--warning);
}

.stat-card.percentage {
    border-top: 4px solid var(--info);
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--text-primary);
    color: white;
    text-align: center;
    border-radius: var(--radius-sm);
    padding: 8px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    font-weight: normal;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.dates-list {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.date-chip {
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    background: var(--background);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-chip:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--primary-light);
}

.date-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: var(--primary);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: var(--danger);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

.btn-primary {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.btn-secondary {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(129, 199, 132, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

.quick-actions-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quick-action-btn {
    padding: 8px 15px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.quick-action-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--primary-light);
}

.lesson-info {
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.lesson-info h4 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.lesson-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.add-student-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.add-student-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.student-actions {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.edit-student-btn,
.delete-student-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    background: var(--background);
    color: var(--text-secondary);
}

.edit-student-btn:hover {
    background: rgba(33, 150, 243, 0.1);
    color: var(--info);
}

.delete-student-btn:hover {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
}

.empty-table-message {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.empty-table-message h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.form-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 5px;
}

.dev-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 20px 32px;
    border-radius: 14px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    z-index: 9999;
    backdrop-filter: blur(6px);
}

/* СТИЛИ ПОИСКА РАСПИСАНИЯ (из search_schedule.html) */
.search-page-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 30px 20px;
}

.search-page-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.search-input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 18px;
}

.search-page-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    font-size: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.search-page-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.search-results {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.search-result-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-item:hover {
    background: rgba(76, 175, 80, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
    flex-shrink: 0;
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.result-details {
    font-size: 13px;
    color: var(--text-secondary);
}

.empty-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
}

.empty-results i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-results p {
    font-size: 16px;
}

/* СТИЛИ РАСПИСАНИЯ (из ksk9-25-2.html) */
.schedule-page-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a5f23, #1b5e20);
    z-index: -1;
    opacity: 0.05;
}

.schedule-container {
    max-width: 1200px;
    margin: 0 auto;
}

.schedule-header {
    text-align: center;
    margin-bottom: 30px;
}

.schedule-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.schedule-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

.schedule-controls {
    margin-bottom: 20px;
}

.current-date-display {
    background: var(--surface);
    padding: 15px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-date-display i {
    color: var(--primary);
}

/* ОСТАЛЬНЫЕ СТИЛИ (из style.css) */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: transform var(--transition);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.logo-section {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.university-short {
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
    line-height: 1.2;
}

.nav-section {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    padding: 0 20px 12px;
    font-weight: 600;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(129, 199, 132, 0.08);
    color: var(--primary);
}

.nav-link.active {
    background-color: rgba(129, 199, 132, 0.12);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.user-section {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0;
    transition: var(--transition);
    width: 100%;
}

.topbar {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: var(--shadow-sm);
    min-height: 72px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-input {
    padding: 12px 16px 12px 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    font-size: 15px;
    width: 100%;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 16px;
}

.notification-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.notification-btn:hover {
    background-color: rgba(129, 199, 132, 0.08);
    color: var(--primary);
}

.page-content {
    padding: 24px;
}

.quick-actions {
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-link {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.section-link:hover {
    text-decoration: underline;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.action-card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

.action-card:active {
    transform: scale(0.98);
}

.action-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: var(--transition);
}

.action-card:hover::after {
    opacity: 1;
}

.action-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(129, 199, 132, 0.1), rgba(76, 175, 80, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 24px;
    color: var(--primary);
    transition: var(--transition);
}

.action-card:hover .action-icon {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.action-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 17px;
}

.action-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.info-card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.info-card-content {
    padding: 10px 0;
}

.info-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item h3 {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.info-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.schedule-info-card {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.2));
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(33, 150, 243, 0.3);
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.1);
}

.schedule-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.schedule-info-icon {
    color: var(--info);
    font-size: 1.2rem;
}

.schedule-info-header h3 {
    font-weight: 600;
    color: var(--text-primary);
}

.schedule-info-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.schedule-control-group {
    display: flex;
    gap: 10px;
    background: var(--surface);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.control-btn {
    padding: 10px 15px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.control-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
}

.control-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.today-btn {
    background: linear-gradient(135deg, var(--warning), #ffb300);
    color: white;
}

.today-btn:hover {
    background: linear-gradient(135deg, #ffb300, var(--warning));
}

.date-search-container {
    margin-bottom: 20px;
}

.date-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    max-width: 400px;
}

.date-search-label {
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-primary);
}

.date-input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
    flex: 1;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.date-search-btn {
    padding: 8px 15px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.date-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.week-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 20px;
    max-width: 300px;
}

.week-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-light);
    animation: pulse 2s infinite;
}

.week-dot.even {
    background: var(--accent);
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.day-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.day-btn {
    padding: 10px 15px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    border: 1px solid var(--border);
}

.day-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
}

.day-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(26, 95, 35, 0.3);
}

.schedule-section {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.schedule-section h2 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-container {
    width: 100%;
    height: 6px;
    background: var(--background);
    border-radius: 3px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--accent));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.day-progress {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.schedule-list {
    list-style: none;
}

.lesson-item {
    margin: 12px 0;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--background);
    border-left: 4px solid var(--primary-light);
    transition: var(--transition);
}

.lesson-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.lesson-item.past {
    opacity: 0.6;
    border-left-color: var(--text-tertiary);
}

.lesson-item.current {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: var(--success);
    animation: pulseCurrent 2s infinite;
}

@keyframes pulseCurrent {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(76, 175, 80, 0); }
}

.lesson-item strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 15px;
}

.lesson-time {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lesson-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(33, 150, 243, 0.1);
    font-size: 13px;
    color: var(--info);
}

.status-current {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.status-next {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: none;
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.mobile-menu-btn:active {
    background-color: rgba(129, 199, 132, 0.1);
    color: var(--primary);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    display: none;
    z-index: 1000;
    height: var(--bottom-nav-height);
    padding: 8px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.bottom-nav-list {
    display: flex;
    list-style: none;
    height: 100%;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
}

.bottom-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 11px;
    gap: 4px;
    transition: var(--transition);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.bottom-nav-link:active {
    background-color: rgba(129, 199, 132, 0.1);
    color: var(--primary);
}

.bottom-nav-link.active {
    color: var(--primary);
}

.bottom-nav-icon {
    font-size: 20px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 58, 42, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* МЕДИА-ЗАПРОСЫ */
@media (max-width: 1200px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 992px) {
    .actions-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        max-width: 240px;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 20px 16px;
    }
    
    .topbar {
        padding: 16px;
    }
    
    .topbar-left {
        gap: 12px;
    }
    
    .search-container {
        max-width: 200px;
    }
    
    .section-title {
        font-size: 17px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .schedule-controls {
        flex-direction: column;
    }
    
    .schedule-control-group {
        width: 100%;
        justify-content: center;
    }
    
    .date-search {
        flex-direction: column;
        align-items: stretch;
        max-width: 100%;
    }
    
    .date-search-label {
        text-align: center;
    }
    
    .day-nav {
        justify-content: center;
    }
    
    .schedule-section {
        padding: 20px;
    }
    
    .bottom-nav {
        display: block;
    }
    
    body {
        padding-bottom: var(--bottom-nav-height);
    }

    /* Для search_schedule.html */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media (min-width: 1200px) {
    .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .overlay.active {
        opacity: 0;
        visibility: hidden;
    }
}

@media (max-width: 576px) {
    .page-content {
        padding: 16px 12px;
    }
    
    .topbar {
        padding: 12px;
        min-height: 64px;
    }
    
    .search-container {
        display: none;
    }
    
    .search-container.mobile-visible {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 12px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        max-width: none;
        z-index: 800;
    }
    
    .info-card {
        padding: 16px;
    }
    
    .control-btn, .day-btn {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .lesson-item {
        padding: 12px;
    }
    
    .lesson-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 380px) {
    .page-title {
        font-size: 16px;
    }
    
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
    }
    
    .notification-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .action-card {
        padding: 16px;
    }
    
    .action-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .action-title {
        font-size: 16px;
    }
}

@supports (-webkit-touch-callout: none) {
    .bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    }
    
    body {
        padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    }
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}