:root {
    --primary: #4DB6AC;          /* Timetable+ Teal500 */
    --primary-hover: #3D9E94;    /* Timetable+ Teal600 */
    --primary-dark: #2E8B82;     /* Timetable+ Teal700 */
    --primary-light: #E6F7F5;    /* Timetable+ Teal50 container */
    --secondary: #F4A896;        /* Timetable+ Coral400 */
    --secondary-hover: #E8907C;  /* Timetable+ Coral500 */
    --secondary-light: #FFF0EC;  /* Timetable+ Coral50 container */
    --accent: #4DB6AC;
    --danger: #E53935;
    --warning: #F59E0B;
    --bg-main: #F8F9FA;          /* Timetable+ Cream50 clean background */
    --bg-card: #FFFFFF;
    --text-primary: #1A2332;     /* Timetable+ Dark900 text */
    --text-secondary: #4A5568;   /* Timetable+ Dark600 text */
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(46, 139, 130, 0.12);
    --shadow-lg: 0 12px 30px -4px rgba(46, 139, 130, 0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Cairo', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* LTR override for French */
html[dir="ltr"] body {
    font-family: 'Outfit', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
}

.app-root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* App Header */
.app-header {
    background: linear-gradient(135deg, #2E8B82 0%, #3D9E94 50%, #4DB6AC 100%);
    color: white;
    padding: 14px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(46, 139, 130, 0.25);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.brand-app-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.brand-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.brand-sub {
    font-size: 0.8rem;
    opacity: 0.85;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.lang-selector-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-full);
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background 0.2s;
}

.lang-selector-wrapper:hover {
    background: rgba(255, 255, 255, 0.28);
}

.lang-icon {
    font-size: 0.85rem;
    color: white;
    margin-right: 6px;
}

html[dir="rtl"] .lang-icon {
    margin-right: 0;
    margin-left: 6px;
}

.lang-select {
    background: transparent;
    border: none;
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 7px 4px;
    cursor: pointer;
    outline: none;
}

.lang-select option {
    background: #2E8B82;
    color: white;
}

.pill-btn {
    border: none;
    background: rgba(255, 255, 255, 0.18);
    color: white;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.pill-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    flex: 1;
    width: 100%;
}

.view-section {
    display: none;
}

.view-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Hero & Gateway */
.hero-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 36px 24px;
    text-align: center;
    max-width: 650px;
    margin: 20px auto;
    border: 1px solid var(--border);
}

.hero-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.hero-app-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 14px rgba(46, 139, 130, 0.25);
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* Segmented Control */
.segmented-control {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-full);
    margin-bottom: 24px;
    gap: 4px;
}

.seg-btn {
    flex: 1;
    border: none;
    padding: 10px 14px;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.seg-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.panel-content {
    display: none;
    text-align: initial;
}

.panel-content.active {
    display: block;
}

/* Forms & Inputs */
.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
}

html[dir="ltr"] .input-icon {
    right: auto;
    left: 14px;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 42px 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

html[dir="ltr"] .input-wrapper input {
    padding: 12px 16px 12px 42px;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(77, 182, 172, 0.25);
}

.code-generator-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.code-generated-input {
    letter-spacing: 3px;
    font-weight: 800 !important;
    font-size: 1.25rem !important;
    color: var(--primary) !important;
    background-color: #f8fafc !important;
    font-family: 'Consolas', 'Courier New', monospace, inherit !important;
    padding-left: 54px !important;
}

html[dir="ltr"] .code-generated-input {
    padding-left: 42px !important;
    padding-right: 54px !important;
}

.btn-addon {
    position: absolute;
    left: 8px;
    background: #e0e7ff;
    color: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

html[dir="ltr"] .btn-addon {
    left: auto;
    right: 8px;
}

.btn-addon:hover {
    background: var(--primary);
    color: white;
    transform: rotate(45deg);
}

.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}


.btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.hint-card {
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.hint-card i {
    color: var(--warning);
    font-size: 1.1rem;
}

/* Drop zones for FET */
.drop-zones-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .drop-zones-grid {
        grid-template-columns: 1fr;
    }
}

.drop-card {
    background: #fafafa;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 18px 14px;
    text-align: center;
    transition: all 0.2s;
}

.drop-card.loaded {
    border-color: var(--accent);
    background: #ecfdf5;
}

.drop-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.drop-card.loaded .drop-icon {
    color: var(--accent);
}

.drop-card h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.drop-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.file-input-hidden {
    display: none;
}

.btn-secondary {
    background: white;
    border: 1.5px solid var(--border);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

/* School Banner */
.school-banner {
    background: linear-gradient(135deg, #2E8B82 0%, #3D9E94 100%);
    color: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(46, 139, 130, 0.2);
    padding: 22px 24px;
    margin-bottom: 20px;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.school-banner-info .school-title {
    color: white;
    font-size: 1.45rem;
    font-weight: 800;
}

.school-banner-info .school-meta {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

.code-pill-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.35);
    margin-bottom: 8px;
}

.code-pill-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.95;
}

.badge-school-code {
    font-family: 'Consolas', monospace;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 2px;
    color: #ffffff;
}

.btn-code-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-code-icon:hover {
    background: white;
    color: var(--primary-dark);
}

.school-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-whatsapp:hover {
    background: #1ebc59;
    transform: translateY(-1px);
}

.btn-roster-toggle {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 10px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-roster-toggle:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Hub Tabs */
.hub-tabs {
    display: flex;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 6px;
    margin-bottom: 20px;
    overflow-x: auto;
    gap: 6px;
}

.hub-tab-btn {
    flex: 1;
    min-width: 140px;
    border: none;
    background: transparent;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.hub-tab-btn.active {
    background: var(--primary);
    color: white;
}

.vacant-counter {
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

.hub-tab-btn.active .vacant-counter {
    background: white;
    color: var(--primary);
}

/* Views & Cards */
.hub-view {
    display: none;
}

.hub-view.active {
    display: block;
}

.filter-bar {
    background: white;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-bar label {
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.form-select {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: white;
}

/* Timetable Grid */
.timetable-card {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 16px;
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 6px;
    min-width: 650px;
}

.schedule-table th {
    background: #f1f5f9;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
}

.schedule-table td {
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    text-align: center;
    vertical-align: middle;
    font-size: 0.85rem;
    background: #fafafa;
    border: 1px solid var(--border-light);
    height: 70px;
}

.cell-session {
    background: #eef2ff !important;
    border: 1.5px solid #c7d2fe !important;
    border-right: 4px solid var(--primary) !important;
}

html[dir="ltr"] .cell-session {
    border-right: 1.5px solid #c7d2fe !important;
    border-left: 4px solid var(--primary) !important;
}

.cell-subject {
    font-weight: 800;
    color: var(--primary);
    font-size: 0.9rem;
}

.cell-class, .cell-teacher {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.cell-room {
    display: inline-block;
    background: rgba(0, 0, 0, 0.05);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Vacant Rooms View */
.vacant-control-bar {
    background: white;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .vacant-control-bar {
        grid-template-columns: 1fr;
    }
}

.remedial-checker-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1.5px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.checker-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.checker-header i {
    font-size: 1.6rem;
    color: var(--accent);
}

.checker-header h4 {
    font-size: 1rem;
    color: #14532d;
}

.checker-header p {
    font-size: 0.82rem;
    color: #166534;
}

.checker-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.result-badge {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
}

.result-badge.free {
    background: #16a34a;
    color: white;
}

.result-badge.busy {
    background: var(--danger);
    color: white;
}

.vacant-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.pill-badge {
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
}

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

.room-card {
    background: white;
    border: 1.5px solid #a7f3d0;
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.room-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.room-icon {
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 6px;
}

.room-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.room-status {
    color: #059669;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 4px;
}

/* Admin Roster Drawer */
.roster-drawer {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1.5px solid var(--border);
    padding: 20px;
    margin-bottom: 24px;
    animation: fadeIn 0.25s ease;
}

.roster-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.btn-close-sm {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.btn-close-sm:hover {
    color: var(--danger);
}

.roster-header {
    margin-bottom: 16px;
}

.roster-header h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.roster-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-box i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

html[dir="ltr"] .search-box i {
    right: auto;
    left: 14px;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
}

html[dir="ltr"] .search-box input {
    padding: 10px 14px 10px 40px;
}

.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.roster-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.roster-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.roster-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-share-sm {
    background: #25d366;
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-share-sm:hover {
    background: #1ebc59;
}

/* Upload Type Switcher */
.upload-type-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-md);
}

.upload-type-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-type-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.upload-zone-panel {
    display: none;
}

.upload-zone-panel.active {
    display: block;
}

.csv-drop-card {
    border: 2px dashed var(--primary);
    background: rgba(77, 182, 172, 0.05);
    border-radius: var(--radius-md);
    padding: 28px 20px;
    text-align: center;
    margin-bottom: 18px;
    transition: all 0.2s;
}

.csv-drop-card.loaded {
    border-style: solid;
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.06);
}

.csv-stats-badge {
    margin-top: 14px;
    background: #10b981;
    color: white;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

/* Modal Popup Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 520px;
    width: 100%;
    padding: 28px;
    text-align: center;
    border: 1px solid var(--border);
    animation: slideUp 0.3s ease;
}

.modal-icon-circle {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 16px;
    box-shadow: 0 4px 14px rgba(61, 158, 148, 0.35);
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.modal-sub {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.modal-code-box {
    background: #f8fafc;
    border: 1.5px dashed var(--primary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 18px;
}

.modal-code-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.modal-code-display-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.modal-code-value {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--text-primary);
    font-family: monospace;
}

.btn-modal-copy {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-copy:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.modal-notice-box {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    text-align: right;
    margin-bottom: 22px;
}

html[dir="ltr"] .modal-notice-box {
    text-align: left;
}

.modal-notice-box .notice-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b45309;
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.modal-notice-box p {
    font-size: 0.82rem;
    color: #92400e;
    line-height: 1.5;
    margin: 0;
}

.btn-modal-proceed {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 800;
}

/* Locked Teacher View Badge */
.badge-teacher-locked {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

/* Roster Header Actions & Buttons */
.roster-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-copy-all-sm {
    background: #f1f5f9;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-copy-all-sm:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.roster-code-tag {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 1px;
    margin-top: 4px;
    display: inline-block;
}

.roster-actions-col {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-copy-code-sm {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-code-sm:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

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

/* Footer */
.app-footer {
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 30px;
}

.hidden {
    display: none !important;
}

