* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F8F9F9;
    color: #2d3436;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #097CC2;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

a:hover {
    color: #065a8f;
    text-decoration: underline;
}

/* ==============================
   LOGIN PAGE
   ============================== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #097CC2 0%, #065a8f 100%);
    padding: 20px;
}

.login-container {
    background: white;
    padding: 45px 40px;
    border-radius: 16px;
    width: 420px;
    max-width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(9,124,194,0.3), 0 8px 24px rgba(0,0,0,0.1);
}

.login-container .logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(9,124,194,0.15);
    background: #F8F9F9;
    padding: 10px;
}

.login-container h1 {
    margin-bottom: 6px;
    color: #1a1a2e;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-container p {
    color: #636e72;
    margin-bottom: 30px;
    font-size: 15px;
    font-weight: 400;
}

.login-container .btn-block {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

/* ==============================
   SIDEBAR
   ============================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background: linear-gradient(180deg, #097CC2 0%, #065a8f 100%);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 200;
    box-shadow: 2px 0 12px rgba(9,124,194,0.15);
}

.sidebar-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.sidebar-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    padding: 6px;
}

.sidebar-header h2 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
}

.sidebar-user {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
}

.sidebar-user .user-name {
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.sidebar-user .user-role {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-top: 3px;
    text-transform: capitalize;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.sidebar-nav a i {
    font-size: 18px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.12);
    color: white;
    text-decoration: none;
    border-left-color: rgba(255,255,255,0.4);
}

.sidebar-nav a:active {
    background: rgba(255,255,255,0.18);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.08);
}

.sidebar-footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.sidebar-footer a:hover {
    color: white;
    text-decoration: none;
}

/* ==============================
   MAIN CONTENT
   ============================== */
.main-content {
    margin-left: 250px;
    padding: 30px 35px;
    min-height: 100vh;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.main-content h1 {
    margin-bottom: 25px;
    color: #1a1a2e;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.main-content h2 {
    margin-bottom: 15px;
    color: #1a1a2e;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.main-content > p {
    color: #636e72;
    margin-bottom: 20px;
    font-size: 15px;
}

/* ==============================
   TIMER BAR
   ============================== */
/* Timer bar in sidebar footer */
.timer-bar {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    text-align: center;
    transition: background 0.2s;
}

.timer-bar .timer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.timer-bar .timer-row i {
    font-size: 15px;
}

#timer-display {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

.timer-bar .timer-actions {
    display: flex;
    gap: 4px;
}

.timer-bar .timer-btn {
    flex: 1;
    background: rgba(255,255,255,0.12);
    color: white;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 5px 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s;
    text-align: center;
}

.timer-bar .timer-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

.timer-bar .timer-btn-break {
    color: #f39c12;
    border-color: rgba(243,156,18,0.3);
}

.timer-bar .timer-btn-break:hover {
    background: rgba(243,156,18,0.15);
    border-color: rgba(243,156,18,0.5);
}

.timer-bar .timer-btn-out {
    color: #e74c3c;
    border-color: rgba(231,76,60,0.3);
}

.timer-bar .timer-btn-out:hover {
    background: rgba(231,76,60,0.15);
    border-color: rgba(231,76,60,0.5);
}

.timer-bar .timer-btn-resume {
    background: rgba(39,174,96,0.2);
    color: #2ecc71;
    border-color: rgba(39,174,96,0.3);
}

.timer-bar .timer-btn-resume:hover {
    background: rgba(39,174,96,0.3);
    border-color: rgba(39,174,96,0.5);
}

/* ==============================
   ATTENDANCE POPUPS
   ============================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.popup-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    width: 480px;
    max-width: 92%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

.popup-card h2 {
    margin-bottom: 10px;
    color: #1a1a2e;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.popup-card h2 i {
    margin-right: 8px;
}

.popup-card p {
    color: #636e72;
    margin-bottom: 25px;
    font-size: 15px;
}

.popup-card textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #dfe6e9;
    border-radius: 10px;
    font-size: 15px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 22px;
    font-family: inherit;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.popup-card textarea:focus {
    border-color: #097CC2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(9,124,194,0.12);
}

.popup-card .btn {
    min-width: 140px;
}

/* ==============================
   STATS GRID
   ============================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background: white;
    padding: 24px 20px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(9,124,194,0.1), 0 2px 8px rgba(0,0,0,0.06);
}

.stat-card h3 {
    font-size: 34px;
    color: #097CC2;
    margin-bottom: 4px;
    font-weight: 700;
    letter-spacing: -1px;
}

.stat-card p {
    color: #636e72;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==============================
   CARDS
   ============================== */
.card {
    background: white;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.dashboard-card {
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0 24px;
    margin-bottom: 16px;
}

.card-header h2 {
    margin: 0;
    font-size: 18px;
    color: #1a1a2e;
}

/* ==============================
   FORMS
   ============================== */
.form-card {
    background: white;
    padding: 35px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
    max-width: 720px;
    border: 1px solid rgba(0,0,0,0.04);
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: #1a1a2e;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 15px;
    border: 2px solid #dfe6e9;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.25s, box-shadow 0.25s;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #097CC2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(9,124,194,0.1);
}

.form-group small {
    color: #999;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

/* ==============================
   BUTTONS
   ============================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    line-height: 1.4;
    white-space: nowrap;
}

.btn i {
    font-size: 16px;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 8px;
}

.btn-primary {
    background: #097CC2;
    color: white;
}

.btn-primary:hover {
    background: #07619a;
    color: white;
    box-shadow: 0 4px 14px rgba(9,124,194,0.3);
}

.btn-primary:active {
    background: #054d7a;
}

.btn-secondary {
    background: #dfe6e9;
    color: #2d3436;
}

.btn-secondary:hover {
    background: #b2bec3;
    color: #2d3436;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

.btn-danger:hover {
    background: #c0392b;
    color: white;
    box-shadow: 0 4px 14px rgba(231,76,60,0.3);
}

.btn-success {
    background: #00b894;
    color: white;
}

.btn-success:hover {
    background: #00a381;
    color: white;
    box-shadow: 0 4px 14px rgba(0,184,148,0.3);
}

/* ==============================
   TABLES
   ============================== */
.data-table {
    width: 100%;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
    border-collapse: collapse;
    border: 1px solid rgba(0,0,0,0.04);
}

.data-table thead th {
    background: #097CC2;
    color: white;
    padding: 14px 18px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px 18px;
    border-bottom: 1px solid #f1f2f6;
    font-size: 14px;
    vertical-align: middle;
    color: #2d3436;
}

.data-table td[data-label] {
    font-weight: 500;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:nth-child(even) {
    background: #F8F9F9;
}

.data-table tbody tr:hover {
    background: #ebf5fb;
}

.data-table .actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ==============================
   COURSE CARDS
   ============================== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 22px;
    margin-bottom: 30px;
}

.course-card {
    background: white;
    padding: 28px 24px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #097CC2, #00b894);
    border-radius: 14px 14px 0 0;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(9,124,194,0.1), 0 4px 12px rgba(0,0,0,0.06);
}

.course-card h3 {
    margin-bottom: 10px;
    color: #1a1a2e;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.course-card p {
    color: #636e72;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.6;
}

.course-card .price {
    color: #097CC2;
    font-weight: 700;
    font-size: 18px;
    margin-top: 10px;
}

/* Week Card */
.week-card {
    background: white;
    padding: 22px 24px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 16px;
    border: 1px solid rgba(0,0,0,0.04);
    border-left: 4px solid #097CC2;
    transition: all 0.25s ease;
}

.week-card:hover {
    box-shadow: 0 6px 20px rgba(9,124,194,0.08);
}

.week-card h3 {
    margin-bottom: 8px;
    color: #1a1a2e;
    font-size: 17px;
    font-weight: 600;
}

.week-card p {
    color: #636e72;
    margin-bottom: 4px;
    font-size: 14px;
}

.week-card .actions {
    margin-top: 10px;
}

/* ==============================
   ALERTS
   ============================== */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 22px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ==============================
   BADGES
   ============================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.active {
    background: #00b894;
    color: white;
}

.badge.inactive {
    background: #b2bec3;
    color: white;
}

.badge.completed {
    background: #097CC2;
    color: white;
}

.badge.cancelled {
    background: #e74c3c;
    color: white;
}

/* ==============================
   FILTER FORM
   ============================== */
.filter-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    background: white;
    padding: 20px 24px;
    border-radius: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}

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

.filter-form label {
    font-size: 13px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 5px;
    display: block;
}

.filter-form input,
.filter-form select {
    padding: 9px 14px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.25s;
}

.filter-form input:focus,
.filter-form select:focus {
    border-color: #097CC2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(9,124,194,0.1);
}

/* ==============================
   MISC UTILITY
   ============================== */
code {
    background: #f1f2f6;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 13px;
    color: #e74c3c;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h1,
.section-header h2 {
    margin-bottom: 0;
}

/* Week Timeline */
.weeks-timeline {
    position: relative;
    padding-left: 30px;
}

.weeks-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #097CC2, #00b894);
    border-radius: 3px;
}

.week-timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.week-timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 24px;
    width: 14px;
    height: 14px;
    background: #097CC2;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(9,124,194,0.2);
}

/* Content list */
.content-list {
    list-style: none;
    padding: 0;
}

.content-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #F8F9F9;
    margin-bottom: 6px;
    font-size: 14px;
    transition: background 0.2s;
}

.content-item:hover {
    background: #ebf5fb;
}

.content-item .icon {
    font-size: 18px;
    width: 32px;
    text-align: center;
}

.content-item a {
    color: #097CC2;
    font-weight: 500;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar-header h2,
    .sidebar-user,
    .sidebar-nav a span,
    .sidebar-footer p,
    .sidebar-footer span {
        display: none;
    }

    .sidebar-logo {
        width: 36px;
        height: 36px;
        padding: 4px;
    }

    .sidebar-nav a {
        padding: 14px;
        justify-content: center;
        font-size: 18px;
        border-left: none;
    }

    .sidebar-nav a:hover {
        border-left-color: transparent;
    }

    .main-content {
        margin-left: 60px;
        padding: 20px 16px;
    }

    .main-content h1 {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 18px 14px;
    }

    .stat-card h3 {
        font-size: 26px;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .data-table {
        font-size: 13px;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody tr {
        display: block;
        padding: 14px;
        border-bottom: 2px solid #dfe6e9;
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid #f1f2f6;
    }

        .data-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #097CC2;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .data-table td:last-child {
        border-bottom: none;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .form-card {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        text-align: center;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .card-header {
        padding: 16px 16px 0 16px;
    }

    .popup-card {
        padding: 28px 24px;
    }

    .login-container {
        padding: 30px 24px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}