/**
 * Student Teacher Evaluation UI — shared polish
 * Aligns evaluation flow with portal design tokens (--wimsg-*).
 */


/* ===== from teacher_evaluation.css ===== */

/* ===== MAIN CONTENT - MATCHING SIDEBAR THEME ===== */

/* ===== PAGE HEADER ===== */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--wimsg-navy, #1A3668);
    margin-bottom: 6px;
}

.page-header p {
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 14px;
}

.title-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--wimsg-navy, #1A3668), var(--wimsg-gold, #FFE200));
    margin-top: 10px;
    border-radius: 3px;
}

/* ===== PERIOD CARDS ===== */
.period-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 24px;
}

.period-card {
    background: #fff;
    border-radius: 20px;
    padding: 22px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(19, 124, 158, 0.12);
    position: relative;
}

.period-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(11, 43, 68, 0.1);
}

.period-card.default-card {
    border: 2px solid var(--wimsg-navy, #1A3668);
    background: linear-gradient(135deg, #FFFFFF, #F8FBFE);
    box-shadow: 0 4px 15px rgba(17, 94, 122, 0.1);
}

.period-card.expired-card {
    opacity: 0.75;
    background: #F8FBFE;
}

.default-ribbon {
    position: absolute;
    top: -10px;
    right: 16px;
    background: linear-gradient(135deg, var(--wimsg-navy, #1A3668), var(--wimsg-teal, #2E4A8D));
    color: white;
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.default-ribbon i {
    font-size: 10px;
    margin-right: 4px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.period-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--wimsg-ink, #0B2B44);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.period-title i {
    color: var(--wimsg-navy, #1A3668);
    font-size: 18px;
}

.view-evaluated-btn {
    background: rgba(17, 94, 122, 0.08);
    border: 1px solid rgba(17, 94, 122, 0.2);
    color: var(--wimsg-navy, #1A3668);
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.view-evaluated-btn:hover {
    background: rgba(17, 94, 122, 0.15);
    transform: translateX(2px);
}

.view-evaluated-btn i {
    font-size: 11px;
}

.period-meta {
    font-size: 13px;
    color: var(--wimsg-muted, #5A6E7A);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.period-meta i {
    color: var(--wimsg-muted-2, #7A8FA0);
    font-size: 12px;
}

.status-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
    width: fit-content;
}

.status-badge.completed {
    background: #D1FAE5;
    color: #065F46;
}

.status-badge.expired {
    background: #FEE2E2;
    color: #991B1B;
}

.status-badge.in-progress {
    background: #FEF3C7;
    color: #92400E;
}

.status-badge.ready {
    background: #DBEAFE;
    color: #1E40AF;
}

.status-badge.waiting {
    background: #F3F4F6;
    color: #4B5563;
}

.progress-bar-container {
    margin: 14px 0;
    background: var(--wimsg-border-strong, #C9D6E3);
    border-radius: 20px;
    overflow: hidden;
    height: 8px;
}

.progress-bar {
    background: linear-gradient(90deg, var(--wimsg-navy, #1A3668), var(--wimsg-gold, #FFE200));
    height: 100%;
    border-radius: 20px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--wimsg-muted, #5A6E7A);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

.eval-steps {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 6px;
}
.eval-steps::-webkit-scrollbar { height: 4px; }
.eval-steps::-webkit-scrollbar-thumb {
    background: rgba(17, 94, 122, 0.25);
    border-radius: 4px;
}
.eval-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--wimsg-border, #E2EAF1);
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 12px;
    font-weight: 600;
    flex: 0 0 auto;
    white-space: nowrap;
}
.eval-step .num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--wimsg-border, #E2EAF1);
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 11px;
}
.eval-step.active {
    color: var(--wimsg-ink, #0B2B44);
    border-color: var(--wimsg-navy, #1A3668);
    background: rgba(17, 94, 122, 0.08);
}
.eval-step.active .num { background: var(--wimsg-navy, #1A3668); color: #fff; }
.guide-box {
    background: #fff;
    border: 1px solid rgba(17, 94, 122, 0.18);
    border-left: 4px solid var(--wimsg-navy, #1A3668);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.guide-box i { color: var(--wimsg-navy, #1A3668); margin-top: 2px; }
.guide-box p { margin: 0; font-size: 13px; color: #3D4F5C; line-height: 1.55; }

.card-buttons {
    margin-top: 18px;
}

.btn-start {
    background: linear-gradient(135deg, var(--wimsg-navy, #1A3668), var(--wimsg-teal, #2E4A8D));
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    justify-content: center;
}

.btn-start i {
    font-size: 13px;
}

.btn-start:hover {
    background: linear-gradient(135deg, var(--wimsg-navy-deep, #0C1F42), var(--wimsg-navy-deep, #0C1F42));
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(17, 94, 122, 0.3);
}

.btn-start.disabled {
    background: var(--wimsg-muted-2, #7A8FA0);
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.empty-state {
    text-align: center;
    padding: 60px 24px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(19, 124, 158, 0.12);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state p {
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 14px;
    margin-top: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .main {
        margin-left: 0;
        padding: 90px 24px 40px;
    }
    
    .period-cards {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .main {
        padding: 85px 20px 30px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .period-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .period-card {
        padding: 18px;
    }
    
    .period-title {
        font-size: 16px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .eval-steps {
        flex-wrap: nowrap;
        gap: 8px;
    }
    .eval-step {
        font-size: 11px;
        padding: 7px 10px;
    }
}

@media (max-width: 576px) {
    .main {
        padding: 80px 15px 30px;
    }
    
    .page-header h1 {
        font-size: 22px;
    }
    
    .period-card {
        padding: 16px;
    }
    
    .period-title {
        font-size: 15px;
    }
    
    .view-evaluated-btn {
        font-size: 11px;
        padding: 4px 12px;
    }
    
    .period-meta {
        font-size: 12px;
    }
    
    .status-badge {
        font-size: 11px;
        padding: 4px 12px;
    }
    
    .btn-start {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .empty-state {
        padding: 40px 20px;
    }
    
    .empty-state i {
        font-size: 48px;
    }
}

@media (max-width: 375px) {
    .main {
        padding: 75px 12px 25px;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .period-title {
        font-size: 14px;
    }
    
    .default-ribbon {
        font-size: 10px;
        padding: 3px 10px;
        top: -8px;
    }
}

/* ===== from select_teacher.css ===== */

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(17, 94, 122, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--wimsg-navy, #1A3668);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}
.back-btn:hover {
    background: rgba(17, 94, 122, 0.08);
    border-color: var(--wimsg-navy, #1A3668);
    transform: translateX(-3px);
}
.page-header {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.page-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}
.page-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--wimsg-navy, #1A3668);
}
.page-header p { color: var(--wimsg-muted, #5A6E7A); font-size: 14px; margin: 0; }
.title-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--wimsg-navy, #1A3668), var(--wimsg-gold, #FFE200));
    border-radius: 3px;
}

.eval-steps {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 6px;
}
.eval-steps::-webkit-scrollbar { height: 4px; }
.eval-steps::-webkit-scrollbar-thumb {
    background: rgba(17, 94, 122, 0.25);
    border-radius: 4px;
}
.eval-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--wimsg-border, #E2EAF1);
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 12px;
    font-weight: 600;
    flex: 0 0 auto;
    white-space: nowrap;
}
.eval-step .num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--wimsg-border, #E2EAF1);
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 11px;
}
.eval-step.done { color: var(--wimsg-navy, #1A3668); border-color: rgba(17,94,122,0.25); }
.eval-step.done .num { background: rgba(17,94,122,0.12); color: var(--wimsg-navy, #1A3668); }
.eval-step.active {
    color: var(--wimsg-ink, #0B2B44);
    border-color: var(--wimsg-navy, #1A3668);
    background: rgba(17, 94, 122, 0.08);
}
.eval-step.active .num { background: var(--wimsg-navy, #1A3668); color: #fff; }

.guide-box {
    background: #fff;
    border: 1px solid rgba(17, 94, 122, 0.18);
    border-left: 4px solid var(--wimsg-navy, #1A3668);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.guide-box i { color: var(--wimsg-navy, #1A3668); margin-top: 2px; }
.guide-box p { margin: 0; font-size: 13px; color: #3D4F5C; line-height: 1.55; }
.guide-box strong { color: var(--wimsg-ink, #0B2B44); }

.summary-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 6px;
}
.summary-row::-webkit-scrollbar { height: 4px; }
.summary-row::-webkit-scrollbar-thumb {
    background: rgba(17, 94, 122, 0.25);
    border-radius: 4px;
}
.summary-pill {
    background: #fff;
    border: 1px solid var(--wimsg-border, #E2EAF1);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--wimsg-muted, #5A6E7A);
    flex: 0 0 auto;
    white-space: nowrap;
}
.summary-pill strong { color: var(--wimsg-ink, #0B2B44); }

.filter-bar {
    position: sticky;
    top: calc(var(--desktop-topbar-h, 58px) + 8px);
    z-index: 20;
    background: #F0F4F8;
    border: 1px solid var(--wimsg-border, #E2EAF1);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 20px;
    display: grid;
    gap: 10px;
}
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.search-wrap {
    flex: 1 1 220px;
    position: relative;
}
.search-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wimsg-muted-2, #7A8FA0);
}
.search-wrap input,
.dept-select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--wimsg-border, #E2EAF1);
    border-radius: 12px;
    padding: 0 14px 0 40px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--wimsg-ink, #0B2B44);
    outline: none;
}
.dept-select { padding-left: 14px; flex: 0 1 200px; min-width: 160px; }
.search-wrap input:focus,
.dept-select:focus { border-color: var(--wimsg-navy, #1A3668); box-shadow: 0 0 0 3px rgba(17,94,122,0.12); }

.status-filters {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 4px;
}
.status-filters::-webkit-scrollbar { height: 4px; }
.status-filters::-webkit-scrollbar-thumb {
    background: rgba(17, 94, 122, 0.25);
    border-radius: 4px;
}
.status-filter {
    border: 1px solid var(--wimsg-border, #E2EAF1);
    background: #fff;
    color: var(--wimsg-muted, #5A6E7A);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    flex: 0 0 auto;
    white-space: nowrap;
}
.status-filter.active {
    background: rgba(17, 94, 122, 0.12);
    border-color: var(--wimsg-navy, #1A3668);
    color: var(--wimsg-navy, #1A3668);
}

.teacher-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 16px;
}
.teacher-card {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(19, 124, 158, 0.12);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: visible;
    transform: none;
}
.teacher-card::before,
.teacher-card::after {
    content: none;
    display: none;
    animation: none;
}
.teacher-card:hover {
    box-shadow: 0 12px 24px rgba(11, 43, 68, 0.1);
    border-color: var(--wimsg-navy, #1A3668);
    transform: none;
    background: #fff;
}
.teacher-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--wimsg-ink, #0B2B44);
    padding-right: 110px;
}
.teacher-department {
    font-size: 13px;
    color: var(--wimsg-muted, #5A6E7A);
    display: flex;
    align-items: center;
    gap: 6px;
}
.status-chip {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.status-chip.not_started { background: #EEF2F6; color: var(--wimsg-muted, #5A6E7A); }
.status-chip.in_progress { background: #FEF3C7; color: #92400E; }
.status-chip.completed { background: #D1FAE5; color: #065F46; }
.progress-info {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--wimsg-border, #E2EAF1);
}
.progress-label {
    font-size: 12px;
    color: var(--wimsg-muted, #5A6E7A);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}
.progress-bar-container {
    background: var(--wimsg-border-strong, #C9D6E3);
    border-radius: 20px;
    overflow: hidden;
    height: 6px;
}
.progress-bar-fill {
    background: linear-gradient(90deg, var(--wimsg-navy, #1A3668), var(--wimsg-gold, #FFE200));
    height: 100%;
    border-radius: 20px;
}
.select-btn {
    background: linear-gradient(135deg, #115E7A, #137C9E);
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    width: auto;
    align-self: flex-end;
    justify-content: center;
    white-space: nowrap;
    filter: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.select-btn:hover {
    background: linear-gradient(135deg, #0F4A62, #0F5B75);
    box-shadow: 0 4px 12px rgba(17, 94, 122, 0.3);
    filter: none;
}
.select-btn.completed { background: #10B981; }
.select-btn.completed:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.empty-state, .filter-empty {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(19, 124, 158, 0.12);
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 14px;
}
.filter-empty { display: none; }
.filter-empty.show { display: block; }
.alert-success {
    background: #D1FAE5;
    color: #065F46;
    padding: 14px 20px;
    border-radius: 16px;
    margin-bottom: 18px;
    border-left: 4px solid #10B981;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

@media (max-width: 1024px) {
    .main { margin-left: 0; padding: 90px 24px 40px; }
}
@media (max-width: 768px) {
    .main { padding: 85px 20px 30px; }
    .page-header h1 { font-size: 24px; }
    .page-header-left {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }
    .back-btn {
        background: transparent;
        border: none;
        width: auto;
        height: auto;
        padding: 4px 2px;
        border-radius: 0;
        box-shadow: none;
        font-size: 18px;
        line-height: 1;
    }
    .back-btn:hover {
        background: transparent;
        border: none;
        box-shadow: none;
        color: var(--wimsg-ink, #0B2B44);
    }
    .filter-bar { top: calc(var(--chrome-mobile-h, 56px) + env(safe-area-inset-top, 0px) + 8px); }
    .teacher-cards { grid-template-columns: 1fr; }
    .teacher-name { font-size: 16px; padding-right: 100px; }
    .eval-steps,
    .summary-row,
    .status-filters {
        flex-wrap: nowrap;
        gap: 8px;
    }
    .eval-step {
        font-size: 11px;
        padding: 7px 10px;
    }
    .summary-pill {
        font-size: 11px;
        padding: 7px 12px;
    }
    .status-filter {
        font-size: 11px;
        padding: 7px 12px;
    }
    .eval-step span.label-full { display: none; }
    .select-btn {
        width: auto;
        align-self: flex-end;
    }
}
@media (max-width: 576px) {
    .main { padding: 80px 15px 30px; }
    .page-header h1 { font-size: 22px; }
    .dept-select { flex: 1 1 100%; }
    .eval-step {
        font-size: 10px;
        padding: 6px 9px;
        gap: 6px;
    }
    .eval-step .num {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    .summary-pill {
        font-size: 10px;
        padding: 6px 10px;
    }
    .status-filter {
        font-size: 10px;
        padding: 6px 10px;
    }
    .select-btn {
        width: auto;
        align-self: flex-end;
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* ===== from select_subject.css ===== */

/* ===== MAIN CONTENT - MATCHING SIDEBAR THEME ===== */

/* ===== TOAST NOTIFICATION ===== */
.toast-notification {
    position: fixed;
    top: 80px;
    right: 30px;
    min-width: 320px;
    max-width: 450px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: slideInRight 0.3s ease forwards;
    border-left: 4px solid;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.toast-notification.toast-hide {
    animation: slideOutRight 0.3s ease forwards;
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon i {
    font-size: 16px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
}

.toast-close {
    cursor: pointer;
    color: #94a3b8;
    font-size: 14px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #475569;
}

.toast-success {
    border-left-color: #10b981;
}
.toast-success .toast-icon {
    background: #d1fae5;
}
.toast-success .toast-icon i {
    color: #10b981;
}
.toast-success .toast-title {
    color: #10b981;
}

.toast-error {
    border-left-color: #ef4444;
}
.toast-error .toast-icon {
    background: #fee2e2;
}
.toast-error .toast-icon i {
    color: #ef4444;
}
.toast-error .toast-title {
    color: #ef4444;
}

/* Back button - circle on desktop */
.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(17, 94, 122, 0.2);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--wimsg-navy, #1A3668);
    font-size: 18px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}
.back-btn:hover {
    background: rgba(17, 94, 122, 0.08);
    border-color: var(--wimsg-navy, #1A3668);
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(17, 94, 122, 0.15);
}

/* Page header */
.page-header {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.page-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}
.page-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--wimsg-navy, #1A3668);
    margin-bottom: 6px;
}
.page-header p {
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}
.title-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--wimsg-navy, #1A3668), var(--wimsg-gold, #FFE200));
    border-radius: 3px;
}

/* Teacher info card */
.teacher-info-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px 24px;
    margin: 20px 0 28px;
    border: 1px solid rgba(19, 124, 158, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.teacher-info-card h3 {
    font-size: 12px;
    color: var(--wimsg-muted, #5A6E7A);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.teacher-name-large {
    font-size: 20px;
    font-weight: 700;
    color: var(--wimsg-ink, #0B2B44);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.teacher-name-large i {
    color: var(--wimsg-navy, #1A3668);
    font-size: 22px;
}
.teacher-department {
    font-size: 13px;
    color: var(--wimsg-muted, #5A6E7A);
    display: flex;
    align-items: center;
    gap: 6px;
}
.teacher-department i {
    color: var(--wimsg-muted-2, #7A8FA0);
}

/* Student total subjects setup */
.quota-setup-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px 18px;
    margin: 0 0 20px;
    border: 1px solid rgba(17, 94, 122, 0.18);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.quota-setup-card h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--wimsg-ink, #0B2B44);
    display: flex;
    align-items: center;
    gap: 8px;
}
.quota-setup-card h3 i { color: var(--wimsg-navy, #1A3668); }
.quota-setup-card .quota-help {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--wimsg-muted, #5A6E7A);
    line-height: 1.5;
}
.quota-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}
.quota-field {
    flex: 1 1 160px;
    min-width: 0;
}
.quota-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--wimsg-muted, #5A6E7A);
    margin-bottom: 6px;
}
.quota-field input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1px solid var(--wimsg-border, #E2EAF1);
    border-radius: 12px;
    font-size: 16px;
    color: var(--wimsg-ink, #0B2B44);
    background: #F8FBFE;
}
.quota-field input[type="number"]:focus {
    outline: none;
    border-color: var(--wimsg-navy, #1A3668);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(17, 94, 122, 0.12);
}
.quota-meta {
    font-size: 12px;
    color: var(--wimsg-muted, #5A6E7A);
    margin-top: 6px;
}
.quota-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: none;
    border-radius: 40px;
    background: linear-gradient(135deg, var(--wimsg-navy, #1A3668), var(--wimsg-teal, #2E4A8D));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.quota-save-btn:hover { filter: brightness(1.05); }
.quota-error {
    margin-top: 10px;
    font-size: 13px;
    color: #b91c1c;
    display: flex;
    align-items: center;
    gap: 6px;
}
.quota-progress-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(17, 94, 122, 0.08);
    color: var(--wimsg-navy, #1A3668);
    font-size: 12px;
    font-weight: 600;
}
.quota-progress-pill.complete {
    background: #D1FAE5;
    color: #065F46;
}
.btn-evaluate-disabled {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 40px;
    background: var(--wimsg-border-strong, #C9D6E3);
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 13px;
    font-weight: 600;
    cursor: not-allowed;
}

/* Subjects grid */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 24px;
}
.subject-card {
    background: #fff;
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(19, 124, 158, 0.12);
    overflow: hidden;
}
.subject-card:hover {
    box-shadow: 0 12px 24px rgba(11, 43, 68, 0.1);
    border-color: var(--wimsg-navy, #1A3668);
}
.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--wimsg-border, #E2EAF1);
    background: linear-gradient(135deg, #F8FBFE 0%, #F8FBFE 100%);
}
.card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--wimsg-ink, #0B2B44);
    margin-bottom: 4px;
}
.subject-code {
    font-size: 12px;
    color: var(--wimsg-muted, #5A6E7A);
    font-weight: 500;
}
.card-
.schedule-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #F8FBFE;
    border-radius: 12px;
    font-size: 13px;
    color: #1a2a3a;
}
.schedule-info i {
    color: var(--wimsg-navy, #1A3668);
}
.btn-evaluate {
    background: linear-gradient(135deg, #115E7A, #137C9E);
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    justify-content: center;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    filter: none;
}
.btn-evaluate:hover {
    background: linear-gradient(135deg, #0F4A62, #0F5B75);
    box-shadow: 0 4px 12px rgba(17, 94, 122, 0.3);
    filter: none;
}
.subject-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}
.evaluated-badge {
    background: #D1FAE5;
    color: #065F46;
    padding: 10px 16px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    justify-content: center;
    white-space: nowrap;
}
.btn-view-answers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    margin-top: 0;
    padding: 10px 16px;
    border-radius: 40px;
    background: var(--wimsg-navy, #1A3668);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.btn-view-answers:hover {
    background: var(--wimsg-navy-deep, #0C1F42);
    color: #fff;
}
.progress-indicator {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--wimsg-border, #E2EAF1);
}
.progress-text {
    font-size: 12px;
    color: var(--wimsg-muted, #5A6E7A);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}
.progress-bar-container {
    background: var(--wimsg-border-strong, #C9D6E3);
    border-radius: 20px;
    overflow: hidden;
    height: 6px;
}
.progress-bar-fill {
    background: linear-gradient(90deg, var(--wimsg-navy, #1A3668), var(--wimsg-gold, #FFE200));
    height: 100%;
    border-radius: 20px;
}
.empty-state {
    text-align: center;
    padding: 60px 24px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(19, 124, 158, 0.12);
}
.empty-state i {
    font-size: 64px;
    background: linear-gradient(135deg, var(--wimsg-navy, #1A3668), var(--wimsg-sky, #9BC7E0));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
}
.empty-state p {
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 14px;
}
.eval-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}
.eval-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--wimsg-border, #E2EAF1);
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 12px;
    font-weight: 600;
}
.eval-step .num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--wimsg-border, #E2EAF1);
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 11px;
}
.eval-step.done { color: var(--wimsg-navy, #1A3668); border-color: rgba(17,94,122,0.25); }
.eval-step.done .num { background: rgba(17,94,122,0.12); color: var(--wimsg-navy, #1A3668); }
.eval-step.active {
    color: var(--wimsg-ink, #0B2B44);
    border-color: var(--wimsg-navy, #1A3668);
    background: rgba(17, 94, 122, 0.08);
}
.eval-step.active .num { background: var(--wimsg-navy, #1A3668); color: #fff; }
.next-actions {
    margin-top: 22px;
    background: #fff;
    border: 1px solid rgba(19, 124, 158, 0.12);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}
.next-actions a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    width: auto;
    flex: 0 0 auto;
}
.next-actions .btn-primary-soft {
    background: linear-gradient(135deg, var(--wimsg-navy, #1A3668), var(--wimsg-teal, #2E4A8D));
    color: #fff;
}
.next-actions .btn-secondary-soft {
    background: #fff;
    color: var(--wimsg-navy, #1A3668);
    border: 1px solid rgba(17, 94, 122, 0.3);
}
.guide-box {
    background: #fff;
    border: 1px solid rgba(17, 94, 122, 0.18);
    border-left: 4px solid var(--wimsg-navy, #1A3668);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.guide-box i { color: var(--wimsg-navy, #1A3668); margin-top: 2px; }
.guide-box p { margin: 0; font-size: 13px; color: #3D4F5C; line-height: 1.55; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .main {
        margin-left: 0;
        padding: 90px 24px 40px;
    }
}

@media (max-width: 768px) {
    .main {
        padding: 85px 20px 30px;
    }
    /* Mobile only: arrow only, left of title */
    .page-header-left {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }
    .back-btn {
        background: transparent;
        border: none;
        width: auto;
        height: auto;
        padding: 4px 2px;
        border-radius: 0;
        box-shadow: none;
        font-size: 18px;
        line-height: 1;
    }
    .back-btn:hover {
        background: transparent;
        border: none;
        box-shadow: none;
        color: var(--wimsg-ink, #0B2B44);
    }
    /* Mobile only: horizontal steps */
    .eval-steps {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 6px;
        gap: 8px;
    }
    .eval-steps::-webkit-scrollbar { height: 4px; }
    .eval-steps::-webkit-scrollbar-thumb {
        background: rgba(17, 94, 122, 0.25);
        border-radius: 4px;
    }
    .eval-step {
        font-size: 11px;
        padding: 7px 10px;
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .quota-setup-card {
        padding: 14px;
    }
    .quota-form {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: flex-end;
        justify-content: space-between;
        gap: 10px;
    }
    .quota-field {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }
    .quota-save-btn {
        width: auto;
        flex: 0 0 auto;
        margin-left: auto;
        padding: 11px 16px;
    }
    .page-header h1 {
        font-size: 24px;
    }
    .subjects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .teacher-name-large {
        font-size: 18px;
    }
    .subject-actions {
        justify-content: flex-end;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .next-actions {
        justify-content: flex-end;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .toast-notification {
        min-width: 280px;
        right: 20px;
        top: 70px;
    }
}

@media (max-width: 576px) {
    .main {
        padding: 80px 15px 30px;
    }
    .page-header h1 {
        font-size: 22px;
    }
    .eval-step {
        font-size: 10px;
        padding: 6px 9px;
        gap: 6px;
    }
    .eval-step .num {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    .teacher-info-card {
        padding: 16px;
    }
    .teacher-name-large {
        font-size: 16px;
    }
    .card-header {
        padding: 14px 16px;
    }
    .card-header h3 {
        font-size: 14px;
    }
    .card-
    .subject-actions {
        justify-content: flex-end;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    .evaluated-badge,
    .btn-view-answers,
    .btn-evaluate {
        padding: 8px 12px;
        font-size: 12px;
    }
    .next-actions {
        justify-content: flex-end;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }
    .next-actions a {
        padding: 8px 12px;
        font-size: 12px;
    }
    .toast-notification {
        left: 20px;
        right: 20px;
        min-width: auto;
        max-width: none;
    }
}

/* ===== from evaluation_form.css ===== */

/* Back button - circle on desktop */
.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(17, 94, 122, 0.2);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--wimsg-navy, #1A3668);
    font-size: 18px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}
.back-btn:hover {
    background: rgba(17, 94, 122, 0.08);
    border-color: var(--wimsg-navy, #1A3668);
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(17, 94, 122, 0.15);
}
.page-header {
    margin-bottom: 25px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.page-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}
.page-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--wimsg-navy, #1A3668);
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}
.page-header p {
    color: #5c6f87;
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
}
.title-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--wimsg-teal, #2E4A8D), var(--wimsg-sky, #9BC7E0));
    border-radius: 3px;
}
.eval-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}
.eval-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--wimsg-border, #E2EAF1);
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 12px;
    font-weight: 600;
}
.eval-step .num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--wimsg-border, #E2EAF1);
    color: var(--wimsg-muted, #5A6E7A);
    font-size: 11px;
}
.eval-step.done { color: var(--wimsg-navy, #1A3668); border-color: rgba(17,94,122,0.25); }
.eval-step.done .num { background: rgba(17,94,122,0.12); color: var(--wimsg-navy, #1A3668); }
.eval-step.active {
    color: var(--wimsg-ink, #0B2B44);
    border-color: var(--wimsg-navy, #1A3668);
    background: rgba(17, 94, 122, 0.08);
}
.eval-step.active .num { background: var(--wimsg-navy, #1A3668); color: #fff; }

.info-cards-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 25px;
}
.info-card {
    background: white;
    border-radius: 18px;
    padding: 16px;
    border: 1px solid #e2edf2;
}
.info-card h3 {
    margin-bottom: 12px;
    color: #10568B;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
.legend-item, .rating-range-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.75rem;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.85rem;
    padding: 6px 0;
}
.summary-item strong {
    color: #10568B;
    font-size: 1rem;
}

.category-box {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #e2edf2;
}
.category-header {
    background: #F8FBFE;
    padding: 12px 16px;
    border-bottom: 1px solid #e2edf2;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #10568B;
    font-size: 0.9rem;
}

.question-list {
    display: flex;
    flex-direction: column;
}
.question-item {
    padding: 16px;
    border-bottom: 1px solid #ecf3f8;
    transition: background 0.2s, box-shadow 0.2s;
}
.question-item:last-child {
    border-bottom: none;
}
.question-item.incomplete {
    background: #FEF2F2;
    box-shadow: inset 3px 0 0 #EF4444;
}
.question-item.incomplete .question-text {
    color: #B91C1C;
}
.category-box.has-incomplete {
    border-color: #FCA5A5;
}
.category-box.has-incomplete .category-header {
    background: #FEF2F2;
    color: #B91C1C;
    border-bottom-color: #FECACA;
}

.toast-notification {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    min-width: 280px;
    max-width: 420px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--wimsg-border, #E2EAF1);
    border-left: 4px solid var(--wimsg-navy, #1A3668);
    box-shadow: 0 12px 28px rgba(11, 43, 68, 0.16);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--wimsg-ink, #0B2B44);
    animation: toastIn 0.28s ease;
}
.toast-notification.toast-error {
    border-left-color: #EF4444;
}
.toast-notification.toast-success {
    border-left-color: #22C55E;
}
.toast-notification.toast-hide {
    animation: toastOut 0.28s ease forwards;
}
.toast-notification i {
    margin-top: 2px;
    flex-shrink: 0;
}
.toast-notification.toast-error i { color: #EF4444; }
.toast-notification.toast-success i { color: #22C55E; }
@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

@media (max-width: 576px) {
    .toast-notification {
        left: 16px;
        right: 16px;
        min-width: auto;
        max-width: none;
        top: 70px;
    }
}
.question-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1a2c3e;
    margin-bottom: 12px;
    line-height: 1.4;
}
.rating-options {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    flex-wrap: wrap;
}
.rating-option {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 6px 12px;
    background: #F8FBFE;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}
.rating-option input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
    accent-color: var(--wimsg-teal, #2E4A8D);
}
.rating-option span {
    font-size: 0.75rem;
    color: #1e293b;
    font-weight: 500;
}
.rating-option.selected {
    background: var(--wimsg-sky-soft, #EAF6FA);
    border-color: var(--wimsg-teal, #2E4A8D);
}

.comment-section {
    background: white;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid #e2edf2;
    margin-top: 20px;
}
.comment-section label {
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #10568B;
}
.form-control {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-family: inherit;
    resize: vertical;
    font-size: 0.8rem;
}
.form-control:focus {
    outline: none;
    border-color: var(--wimsg-teal, #2E4A8D);
    box-shadow: 0 0 0 3px rgba(40,116,199,0.1);
}

.form-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    margin-bottom: 30px;
}
.btn-cancel {
    background: #f1f5f9;
    border: none;
    padding: 12px 20px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    color: #1e293b;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 0.85rem;
    width: auto;
}
.btn-submit {
    background: linear-gradient(135deg, var(--wimsg-teal, #2E4A8D), var(--wimsg-teal, #2E4A8D));
    border: none;
    padding: 12px 20px;
    border-radius: 40px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    width: auto;
}
.btn-submit:hover {
    background: linear-gradient(135deg, var(--wimsg-teal-mid, #3D5FA0), var(--wimsg-navy, #1A3668));
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .info-cards-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .form-actions {
        flex-direction: row;
        justify-content: flex-end;
    }
    .btn-cancel, .btn-submit {
        width: auto;
    }
    .question-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }
    .question-text {
        flex: 1;
        margin-bottom: 0;
    }
    .rating-options {
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.35rem;
    }
    .page-header-left {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }
    .back-btn {
        background: transparent;
        border: none;
        width: auto;
        height: auto;
        padding: 4px 2px;
        border-radius: 0;
        box-shadow: none;
        font-size: 18px;
        line-height: 1;
    }
    .back-btn:hover {
        background: transparent;
        border: none;
        box-shadow: none;
        color: var(--wimsg-ink, #0B2B44);
    }
    .eval-steps {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 6px;
        gap: 6px;
    }
    .eval-steps::-webkit-scrollbar { height: 4px; }
    .eval-steps::-webkit-scrollbar-thumb {
        background: rgba(17, 94, 122, 0.25);
        border-radius: 4px;
    }
    .eval-step {
        font-size: 10px;
        padding: 6px 9px;
        gap: 6px;
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .eval-step .num {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    .form-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }
    .btn-cancel,
    .btn-submit {
        width: auto;
        flex: 0 0 auto;
        padding: 10px 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.2rem;
    }
}

/* ===== from evaluation_view.css ===== */

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(17, 94, 122, 0.2);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--wimsg-navy, #1A3668);
    font-size: 18px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}
.back-btn:hover {
    background: rgba(17, 94, 122, 0.08);
    border-color: var(--wimsg-navy, #1A3668);
    transform: translateX(-3px);
}
.page-header {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.page-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}
.page-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--wimsg-navy, #1A3668);
    margin-bottom: 6px;
}
.page-header p { color: #5c6f87; font-size: 0.85rem; line-height: 1.45; margin: 0; }
.title-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--wimsg-teal, #2E4A8D), var(--wimsg-sky, #9BC7E0));
    border-radius: 3px;
}
.info-card, .category-box, .comment-section {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e2edf2;
    margin-bottom: 18px;
}
.info-card { padding: 16px; }
.info-card h3 {
    margin-bottom: 12px;
    color: #10568B;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
.legend-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.75rem;
}
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.meta-item {
    background: #fff;
    border: 1px solid #e2edf2;
    border-radius: 14px;
    padding: 12px 14px;
}
.meta-item span {
    display: block;
    font-size: 0.72rem;
    color: #6c7a8a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.meta-item strong { color: var(--wimsg-ink, #0B2B44); font-size: 0.92rem; }
.category-header {
    background: linear-gradient(135deg, var(--wimsg-navy, #1A3668), var(--wimsg-teal-soft, #5B7FBF));
    color: #fff;
    padding: 14px 18px;
    border-radius: 18px 18px 0 0;
    font-weight: 700;
    font-size: 0.92rem;
}
.question-list { padding: 8px 16px 16px; }
.question-item {
    padding: 14px 0;
    border-bottom: 1px solid #eef2f6;
}
.question-item:last-child { border-bottom: none; }
.question-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1a2c3e;
    margin-bottom: 10px;
}
.rating-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rating-option {
    min-width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid #dce3ec;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F8FBFE;
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
}
.rating-option.selected {
    background: var(--wimsg-navy, #1A3668);
    border-color: var(--wimsg-navy, #1A3668);
    color: #fff;
    box-shadow: 0 6px 14px rgba(17, 94, 122, 0.25);
}
.rating-label {
    margin-top: 8px;
    font-size: 0.78rem;
    color: #64748b;
}
.comment-section { padding: 16px 18px; }
.comment-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #10568B;
    margin-bottom: 10px;
}
.comment-box {
    background: #F8FBFE;
    border: 1px solid #e2edf2;
    border-radius: 12px;
    padding: 12px 14px;
    color: #334155;
    white-space: pre-wrap;
    min-height: 72px;
}
.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0 28px;
}
.form-actions-end {
    justify-content: flex-end;
    align-items: center;
}
.form-actions-end .btn-back-text {
    width: auto;
    flex: 0 0 auto;
}
.btn-back-text, .btn-secondary-soft {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
    font-size: 0.88rem;
}
.btn-back-text {
    background: var(--wimsg-navy, #1A3668);
    color: #fff;
}
.btn-secondary-soft {
    background: #fff;
    color: var(--wimsg-navy, #1A3668);
    border: 1px solid rgba(17, 94, 122, 0.25);
}
@media (max-width: 768px) {
    .page-header h1 { font-size: 1.35rem; }
    .page-header-left {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }
    .back-btn {
        background: transparent;
        border: none;
        width: auto;
        height: auto;
        padding: 4px 2px;
        border-radius: 0;
        box-shadow: none;
        font-size: 18px;
        line-height: 1;
    }
    .back-btn:hover {
        background: transparent;
        border: none;
        box-shadow: none;
        color: var(--wimsg-ink, #0B2B44);
    }
    .rating-option { min-width: 38px; height: 38px; }
}

/* ===== from evaluated_list.css ===== */

/* ===== PAGE HEADER ===== */
.page-header {
    background: white;
    border-radius: 20px;
    padding: 20px 25px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.page-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(17, 94, 122, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--wimsg-navy, #1A3668);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    gap: 8px;
}

.btn-back:hover {
    background: rgba(17, 94, 122, 0.08);
    border-color: var(--wimsg-navy, #1A3668);
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(17, 94, 122, 0.15);
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 5px;
}

.page-header p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

.title-line {
    width: 60px;
    height: 3px;
    background: var(--wimsg-teal, #2E4A8D);
    border-radius: 2px;
}

.department-section {
    margin-bottom: 40px;
}

.department-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wimsg-teal, #2E4A8D);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.teacher-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
    overflow: hidden;
}

.teacher-header {
    padding: 15px 20px;
    background: #F8FBFE;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.teacher-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.teacher-dept {
    font-size: 13px;
    color: #6c757d;
    margin-top: 4px;
}

.subjects-list {
    display: flex;
    flex-direction: column;
}

.subject-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #e0e0e0;
    gap: 12px;
    flex-wrap: wrap;
}

.subject-info {
    flex: 2;
    min-width: 140px;
}

.subject-code {
    font-weight: 600;
    color: var(--wimsg-teal, #2E4A8D);
    font-size: 14px;
}

.subject-name {
    font-size: 14px;
    color: #1a1a2e;
    margin-top: 4px;
}

.subject-schedule {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.subject-progress {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    min-width: 70px;
}

.badge-complete, .badge-incomplete {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.badge-complete {
    background: #d4edda;
    color: #155724;
}

.badge-incomplete {
    background: #fff3cd;
    color: #856404;
}

.btn-view-answers {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--wimsg-navy, #1A3668);
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.btn-view-answers:hover {
    background: var(--wimsg-navy-deep, #0C1F42);
    color: #fff;
}

.subject-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state p {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 24px;
    }
    .teacher-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .subject-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .subject-progress {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .badge-complete, .badge-incomplete {
        align-self: flex-start;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 22px;
    }
    .page-header-left {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }
    .department-title {
        font-size: 18px;
    }
    .teacher-name {
        font-size: 16px;
    }
    .btn-back {
        background: transparent;
        border: none;
        width: auto;
        height: auto;
        padding: 4px 2px;
        border-radius: 0;
        box-shadow: none;
        font-size: 18px;
        line-height: 1;
    }
    .btn-back:hover {
        background: transparent;
        border: none;
        box-shadow: none;
        color: var(--wimsg-ink, #0B2B44);
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 20px;
    }
}


/* ===== Final portal alignment overrides ===== */
.portal-page-header h1,
.page-header h1 {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    color: var(--wimsg-navy, #1A3668) !important;
}

.portal-page-header .title-line,
.page-header .title-line {
    background: linear-gradient(90deg, var(--wimsg-navy, #1A3668), var(--wimsg-gold, #FFE200));
}

.btn-back {
    /* alias of .back-btn */
}

.back-btn,
.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--wimsg-border-strong, #C9D6E3);
    background: #F8FBFE;
    color: var(--wimsg-navy, #1A3668);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.back-btn:hover,
.btn-back:hover {
    background: rgba(26, 54, 104, 0.08);
    border-color: rgba(26, 54, 104, 0.28);
    color: var(--wimsg-navy, #1A3668);
}

.btn-start,
.quota-save-btn,
.btn-submit {
    background: linear-gradient(135deg, var(--wimsg-navy, #1A3668), var(--wimsg-teal, #2E4A8D)) !important;
}

.select-btn:not(.completed),
.btn-evaluate {
    background: linear-gradient(135deg, #115E7A, #137C9E) !important;
    filter: none;
}

.btn-start:hover,
.quota-save-btn:hover,
.btn-submit:hover {
    filter: brightness(1.05);
}

.select-btn:not(.completed):hover,
.btn-evaluate:hover {
    background: linear-gradient(135deg, #0F4A62, #0F5B75) !important;
    filter: none;
}

.period-card.default-card {
    border-color: var(--wimsg-navy, #1A3668);
}

.eval-step.active .num,
.progress-bar-fill,
.progress-bar {
    /* ensure brand tokens win where fill uses old cyan */
}

@media (max-width: 1024px) {
    /* Let portal-chrome own .main spacing on mobile */
    .main {
        margin-left: 0 !important;
    }
}


/* ===== Mobile phone responsive (all eval pages) ===== */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.main,
.main-inner {
    max-width: 100%;
    box-sizing: border-box;
}

.period-cards,
.teacher-cards,
.subjects-grid,
.info-cards-wrapper,
.meta-grid,
.period-card,
.teacher-card,
.subject-card,
.category-box,
.form-card,
.quota-setup-card,
.teacher-info-card,
.department-section,
.filter-bar,
.guide-box,
.eval-steps,
.summary-row,
.status-filters {
    max-width: 100%;
    box-sizing: border-box;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

@media (max-width: 1024px) {
    .main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: max(14px, env(safe-area-inset-left)) !important;
        padding-right: max(14px, env(safe-area-inset-right)) !important;
    }

    .filter-bar {
        top: calc(var(--chrome-mobile-h, 64px) + env(safe-area-inset-top, 0px) + 8px);
        position: sticky;
    }
}

@media (max-width: 768px) {
    .period-cards,
    .teacher-cards,
    .subjects-grid,
    .info-cards-wrapper {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .meta-grid {
        grid-template-columns: 1fr !important;
    }

    .page-header,
    .portal-page-header {
        margin-bottom: 18px !important;
        gap: 10px !important;
    }

    .page-header h1,
    .portal-page-header h1 {
        font-size: clamp(1.15rem, 5.2vw, 1.45rem) !important;
        line-height: 1.25 !important;
        word-break: break-word;
    }

    .page-header p,
    .portal-page-header p {
        font-size: 0.84rem !important;
        line-height: 1.45 !important;
    }

    .page-header-left {
        width: 100%;
        gap: 10px !important;
    }

    .back-btn,
    .btn-back {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px;
        flex-shrink: 0;
    }

    .eval-steps {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        margin-bottom: 14px !important;
    }

    .eval-steps::-webkit-scrollbar { display: none; }

    .eval-step {
        flex: 0 0 auto !important;
        white-space: nowrap;
        font-size: 12px !important;
        padding: 8px 12px !important;
    }

    .guide-box {
        padding: 12px 14px !important;
        font-size: 0.84rem !important;
    }

    .period-card,
    .teacher-card,
    .subject-card,
    .teacher-info-card,
    .quota-setup-card,
    .info-card,
    .category-box,
    .comment-section,
    .history-card {
        padding-left: 14px;
        padding-right: 14px;
        border-radius: 16px !important;
    }

    .period-card {
        padding: 16px !important;
    }

    .btn-start,
    .select-btn,
    .btn-evaluate,
    .btn-evaluate-disabled,
    .quota-save-btn,
    .btn-submit,
    .btn-cancel,
    .btn-view-answers,
    .btn-secondary-soft,
    .view-evaluated-btn {
        width: 100% !important;
        justify-content: center !important;
        min-height: 44px !important;
        box-sizing: border-box;
    }

    .form-actions,
    .portal-actions,
    .next-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
    }

    .form-actions.form-actions-end {
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
    }

    .form-actions.form-actions-end .btn-back-text {
        width: auto !important;
        flex: 0 0 auto !important;
    }

    .form-actions .btn-cancel,
    .form-actions .btn-submit,
    .portal-actions .btn-cancel,
    .portal-actions .btn-submit {
        width: 100% !important;
        flex: 1 1 auto !important;
    }

    .filter-bar {
        top: calc(var(--chrome-mobile-h, 56px) + env(safe-area-inset-top, 0px) + 8px);
        padding: 10px !important;
        border-radius: 14px !important;
        margin-bottom: 14px !important;
    }

    .filter-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .search-wrap,
    .dept-select {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .summary-row,
    .status-filters {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px !important;
    }

    .summary-row::-webkit-scrollbar,
    .status-filters::-webkit-scrollbar { display: none; }

    .summary-pill,
    .status-filter {
        flex: 0 0 auto !important;
    }

    .progress-bar-container {
        width: 100% !important;
    }

    .rating-options {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .rating-option {
        min-width: 0 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 8px 4px !important;
        box-sizing: border-box;
    }

    .rating-option span {
        font-size: 0.72rem !important;
    }

    .question-item {
        padding: 14px 12px !important;
    }

    .question-text {
        font-size: 0.88rem !important;
        line-height: 1.45 !important;
    }

    .subject-item,
    .subject-actions {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .subject-info,
    .subject-progress,
    .subject-actions {
        min-width: 0 !important;
        width: 100% !important;
    }

    .department-title {
        font-size: 0.95rem !important;
        padding: 12px 14px !important;
        flex-wrap: wrap;
    }

    .quota-setup-card .portal-form-grid,
    .quota-fields,
    .two-columns,
    .form-row,
    .form-row-2 {
        grid-template-columns: 1fr !important;
    }

    .toast-notification {
        left: max(12px, env(safe-area-inset-left)) !important;
        right: max(12px, env(safe-area-inset-right)) !important;
        top: calc(var(--chrome-mobile-h, 64px) + env(safe-area-inset-top, 0px) + 10px) !important;
        min-width: 0 !important;
        max-width: none !important;
        width: auto !important;
    }
}

@media (max-width: 480px) {
    .main {
        padding-left: max(12px, env(safe-area-inset-left)) !important;
        padding-right: max(12px, env(safe-area-inset-right)) !important;
    }

    .period-card,
    .teacher-card,
    .subject-card,
    .info-card,
    .category-box,
    .comment-section,
    .quota-setup-card,
    .teacher-info-card {
        padding: 12px !important;
        border-radius: 14px !important;
    }

    .category-header {
        padding: 10px 12px !important;
        font-size: 0.84rem !important;
    }

    .rating-options {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    .rating-option {
        min-height: 40px;
        border-radius: 10px !important;
        font-size: 0.8rem !important;
    }

    .eval-step .num {
        width: 22px !important;
        height: 22px !important;
        font-size: 11px !important;
    }

    .period-title,
    .teacher-card h3,
    .adv-name {
        font-size: 1rem !important;
        word-break: break-word;
    }

    .period-meta,
    .teacher-department,
    .schedule-info {
        font-size: 0.78rem !important;
    }

    .default-ribbon {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }

    .status-badge,
    .status-chip,
    .badge-complete,
    .badge-incomplete,
    .evaluated-badge {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
}

@media (max-width: 360px) {
    .page-header h1,
    .portal-page-header h1 {
        font-size: 1.05rem !important;
    }

    .rating-options {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 4px !important;
    }

    .rating-option {
        padding: 6px 2px !important;
        min-height: 36px;
    }

    .btn-start,
    .select-btn,
    .btn-evaluate,
    .btn-submit,
    .btn-cancel {
        font-size: 0.84rem !important;
        padding: 10px 12px !important;
    }
}

@media (hover: none) and (pointer: coarse) {
    .back-btn,
    .btn-back,
    .btn-start,
    .select-btn,
    .btn-evaluate,
    .btn-submit,
    .btn-cancel,
    .status-filter,
    .rating-option,
    .history-action-btn {
        min-height: 44px;
    }

    .rating-option {
        min-height: 40px;
    }
}


/* Extra mobile safety */
.subject-name,
.subject-code,
.period-title,
.teacher-card h3,
.period-meta span,
.meta-item,
.question-text {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.teacher-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

@media (max-width: 768px) {
    .teacher-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .select-btn.completed {
        width: 100% !important;
    }
}
