:root {
    --app-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --sidebar-w:   250px;

    --bg-app:      #0B1220;
    --bg-panel:    #111C31;
    --bg-card:     #16233B;
    --bg-input:    #0B1524;
    --bg-hover:    rgba(255, 255, 255, 0.06);

    --border:      rgba(148, 163, 184, 0.18);
    --border-soft: rgba(148, 163, 184, 0.10);

    --text:        #E8EEF8;
    --text-muted:  #94A3B8;
    --text-faint:  #64748B;

    --accent:      #38BDF8;
    --accent-ink:  #04222F;
    --success:     #34D399;
    --success-ink: #04231A;
    --danger:      #F87171;
    --danger-ink:  #2B0A0A;
    --warning:     #FBBF24;
    --warning-ink: #2A1C00;
    --violet:      #A78BFA;
    --violet-ink:  #1E1140;

    --radius:      10px;
    --radius-lg:   14px;
}

[data-theme="light"] {
    --sidebar-w:   250px;
    --bg-app:      #F1F5F9;
    --bg-panel:    #FFFFFF;
    --bg-card:     #FFFFFF;
    --bg-input:    #F8FAFC;
    --bg-hover:    rgba(15, 23, 42, 0.05);

    --border:      rgba(15, 23, 42, 0.12);
    --border-soft: rgba(15, 23, 42, 0.06);

    --text:        #0F172A;
    --text-muted:  #475569;
    --text-faint:  #94A3B8;

    --accent:      #0284C7;
    --accent-ink:  #FFFFFF;
    --success:     #059669;
    --success-ink: #FFFFFF;
    --danger:      #DC2626;
    --danger-ink:  #FFFFFF;
    --warning:     #D97706;
    --warning-ink: #FFFFFF;
    --violet:      #7C3AED;
    --violet-ink:  #FFFFFF;
}

[data-theme="light"] .card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .modal {
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .auth-card {
    background: #FFFFFF;
    color: #0F172A;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .sidebar {
    background: #FFFFFF;
    border-right-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .topbar {
    background: #FFFFFF;
    border-bottom-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] table.data thead th {
    background: rgba(15, 23, 42, 0.03);
    color: #475569;
}

[data-theme="light"] .badge-neutral { background: rgba(71, 85, 105, 0.1); color: #334155; }
[data-theme="light"] .badge-accent  { background: rgba(2, 132, 199, 0.12); color: #0284C7; }
[data-theme="light"] .badge-success { background: rgba(5, 150, 105, 0.12); color: #059669; }
[data-theme="light"] .badge-danger  { background: rgba(220, 38, 38, 0.12); color: #DC2626; }
[data-theme="light"] .badge-warning { background: rgba(217, 119, 6, 0.12); color: #D97706; }
[data-theme="light"] .badge-violet  { background: rgba(124, 58, 237, 0.12); color: #7C3AED; }

[data-theme="light"] .btn-secondary {
    background: #FFFFFF;
    border-color: rgba(15, 23, 42, 0.18);
    color: #0F172A;
}
[data-theme="light"] .btn-secondary:hover:not(:disabled) {
    background: #F1F5F9;
    border-color: rgba(15, 23, 42, 0.28);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg-app);
    color: var(--text);
    font-family: var(--app-font);
    font-size: 14px;
    line-height: 1.5;
}

.hidden { display: none !important; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--text); }
h3 { font-size: 15px; }
p  { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); font-size: 12px; }
.mono  { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px; border: 1px solid transparent; border-radius: var(--radius);
    font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1;
    cursor: pointer; white-space: nowrap;
    transition: filter 0.15s, background 0.15s, border-color 0.15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-primary { background: var(--accent);  color: var(--accent-ink); }
.btn-success { background: var(--success); color: var(--success-ink); }
.btn-danger  {
    background: var(--danger);
    color: var(--danger-ink);
    border: 1px solid rgba(239, 68, 68, 0.35);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}
.btn-warning { background: var(--warning); color: var(--warning-ink); }
.btn-violet  { background: var(--violet);  color: var(--violet-ink); }

.btn-delete {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #fca5a5;
    transition: all 0.18s ease;
}
.btn-delete:hover:not(:disabled) {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}
.btn-delete:active:not(:disabled) {
    transform: translateY(0);
    background: #dc2626;
    box-shadow: none;
}

[data-theme="light"] .btn-delete {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.20);
    color: #dc2626;
}
[data-theme="light"] .btn-delete:hover:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    transform: translateY(-1px);
}
[data-theme="light"] .btn-delete:active:not(:disabled) {
    transform: translateY(0);
    background: #b91c1c;
    box-shadow: none;
}

.list-actions .btn-delete:not(.btn-text) {
    width: 32px;
    height: 32px;
    padding: 0;
    min-width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13.5px;
    flex-shrink: 0;
}

.list-actions button[title*="sil" i]:not(.btn-text),
.list-actions button[title*="Sil" i]:not(.btn-text) {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #fca5a5;
    width: 32px;
    height: 32px;
    padding: 0;
    min-width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13.5px;
    flex-shrink: 0;
    transition: all 0.18s ease;
}
.list-actions button[title*="sil" i]:hover:not(:disabled),
.list-actions button[title*="Sil" i]:hover:not(:disabled) {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}
.list-actions button[title*="sil" i]:active:not(:disabled),
.list-actions button[title*="Sil" i]:active:not(:disabled) {
    transform: translateY(0);
    background: #dc2626;
    box-shadow: none;
}

[data-theme="light"] .list-actions button[title*="sil" i],
[data-theme="light"] .list-actions button[title*="Sil" i] {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.20);
    color: #dc2626;
}
[data-theme="light"] .list-actions button[title*="sil" i]:hover:not(:disabled),
[data-theme="light"] .list-actions button[title*="Sil" i]:hover:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    transform: translateY(-1px);
}
[data-theme="light"] .list-actions button[title*="sil" i]:active:not(:disabled),
[data-theme="light"] .list-actions button[title*="Sil" i]:active:not(:disabled) {
    transform: translateY(0);
    background: #b91c1c;
    box-shadow: none;
}

.btn-neutral {
    background: var(--bg-hover);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-neutral:hover:not(:disabled) {
    background: var(--border);
    color: var(--text);
}
[data-theme="light"] .btn-neutral {
    background: #f1f5f9;
    color: #334155;
    border-color: rgba(15, 23, 42, 0.14);
}
[data-theme="light"] .btn-neutral:hover:not(:disabled) {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.btn-outline:hover:not(:disabled) {
    background: var(--accent);
    color: var(--accent-ink);
}
[data-theme="light"] .btn-outline {
    background: rgba(2, 132, 199, 0.06);
    color: #0284c7;
    border-color: rgba(2, 132, 199, 0.35);
}
[data-theme="light"] .btn-outline:hover:not(:disabled) {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.version-hero-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(56, 189, 248, 0.30);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.version-hero-badge-tag {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-weight: 700;
}
.version-hero-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin-top: 4px;
    letter-spacing: -0.3px;
}
.version-hero-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.version-hero-card .badge {
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 700;
}

[data-theme="light"] .version-hero-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid rgba(2, 132, 199, 0.22);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .version-hero-title {
    color: #0f172a;
}
[data-theme="light"] .version-hero-sub {
    color: #475569;
}
[data-theme="light"] .version-hero-card .badge-success {
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
    border: 1px solid rgba(5, 150, 105, 0.25);
}
[data-theme="light"] .version-hero-card .badge-warning {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.25);
}
[data-theme="light"] .version-hero-card .badge-danger {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.btn-secondary {
    background: transparent; color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-hover); }

.btn-ghost {
    background: transparent; color: var(--text-muted);
    border-color: transparent; padding: 6px 10px;
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }

.btn-sm    { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }

.btn-link {
    background: none; border: none; color: var(--text-muted);
    font-family: inherit; font-size: 12px; text-decoration: underline;
    cursor: pointer; padding: 6px;
}
.btn-link:hover { color: var(--text); }

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

.field > label {
    display: block; margin-bottom: 6px;
    font-size: 12.5px; font-weight: 600; color: var(--text-muted);
}
.field .hint { display: block; margin-top: 5px; font-size: 11.5px; color: var(--text-faint); }

.field input,
.field select,
.field textarea,
input.control, select.control, textarea.control {
    width: 100%; padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit; font-size: 13.5px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 84px; resize: vertical; }

.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }

.field input:focus, .field select:focus, .field textarea:focus,
input.control:focus, select.control:focus, textarea.control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.field select, select.control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M2 4.5 6 8.5 10 4.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 34px;
}
.field select option { background: var(--bg-panel); color: var(--text); }

.field input[type="file"] {
    padding: 8px; font-size: 12.5px; color: var(--text-muted);
}
.field input[type="file"]::file-selector-button {
    margin-right: 10px; padding: 7px 12px;
    background: var(--bg-hover); color: var(--text);
    border: 1px solid var(--border); border-radius: 8px;
    font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset;
    caret-color: var(--text);
}

.check-row {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 10px; border-radius: 8px; cursor: pointer;
}
.check-row:hover { background: var(--bg-hover); }
.check-row input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: var(--accent);
    margin: 0; cursor: pointer; flex-shrink: 0;
}
.check-row span { font-size: 13px; }

.check-list {
    max-height: 190px; overflow-y: auto;
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 5px; background: var(--bg-input);
}

.field-row { display: grid; gap: 10px; }
.field-row.cols-2 { grid-template-columns: 1fr 1fr; }
.field-row.cols-narrow { grid-template-columns: 120px 1fr; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.card + .card { margin-top: 18px; }
.card-head { margin-bottom: 16px; }
.card-head h3 { margin-bottom: 4px; }
.card-head p  { font-size: 12.5px; color: var(--text-muted); }

.card-section + .card-section {
    margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border-soft);
}
.card-section > h4 {
    font-size: 13px; color: var(--accent); margin-bottom: 12px;
}

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 20px;
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.badge-neutral { background: rgba(148,163,184,0.16); color: var(--text-muted); }
.badge-accent  { background: rgba(56,189,248,0.16);  color: var(--accent); }
.badge-success { background: rgba(52,211,153,0.16);  color: var(--success); }
.badge-danger  { background: rgba(248,113,113,0.16); color: var(--danger); }
.badge-warning { background: rgba(251,191,36,0.16);  color: var(--warning); }
.badge-violet  { background: rgba(167,139,250,0.16); color: var(--violet); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.online  { background: var(--success); }
.dot.locked  { background: var(--warning); }
.dot.offline { background: var(--text-faint); }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-soft); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data thead th {
    text-align: left; padding: 12px 16px;
    background: var(--bg-hover);
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--text-faint);
    border-bottom: 1px solid var(--border-soft); white-space: nowrap;
}
table.data tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--bg-hover); }
table.data .cell-empty { text-align: center; color: var(--text-faint); padding: 32px 20px; font-size: 13.5px; }

.list-row {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 12px 0; border-bottom: 1px solid var(--border-soft);
}
.list-row:last-child { border-bottom: none; }
.list-row-main { min-width: 0; }
.list-row-title { font-size: 13.5px; font-weight: 600; }
.list-row-sub   { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.list-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.empty-state {
    padding: 28px; text-align: center;
    color: var(--text-faint); font-size: 13px;
    border: 1px dashed var(--border); border-radius: var(--radius);
}

.secret-box {
    margin-top: 14px; padding: 14px;
    background: var(--bg-input);
    border: 1px solid var(--warning); border-radius: var(--radius);
}
.secret-box .secret-title { font-size: 12px; font-weight: 700; color: var(--warning); }
.secret-box code {
    display: block; margin: 8px 0;
    font-size: 13px; color: var(--warning); word-break: break-all;
}
.secret-box .secret-warn { font-size: 11.5px; color: var(--danger); }

.modal-overlay {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(2, 6, 23, 0.72);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    backdrop-filter: blur(4px);
}
.modal {
    width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.modal.modal-wide { max-width: 680px; }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.modal-text  { font-size: 13.5px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.45; }
.modal-body  { margin-bottom: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.modal-error { color: var(--danger); font-size: 12.5px; margin-top: 10px; min-height: 16px; }

.user-manage-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: var(--bg-hover);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
}
.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0284C7, #4F46E5);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}
.user-avatar.avatar-admin {
    background: linear-gradient(135deg, #DC2626, #EA580C);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.25);
}
.user-avatar.avatar-principal {
    background: linear-gradient(135deg, #0D9488, #2563EB);
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25);
}
.user-avatar.avatar-sm {
    width: 34px;
    height: 34px;
    font-size: 12px;
    border-radius: 9px;
}
.user-manage-profile {
    flex: 1;
    min-width: 0;
}
.user-manage-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.user-manage-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.user-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin: 18px 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.user-action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg-hover);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: border-color 0.15s, background 0.15s;
}
.user-action-card:hover {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.04);
}
[data-theme="light"] .user-action-card:hover {
    background: rgba(15, 23, 42, 0.03);
}
.user-action-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    flex-shrink: 0;
}
.user-action-content {
    flex: 1;
    min-width: 0;
}
.user-action-heading {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}
.user-action-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.4;
}
.user-danger-zone {
    border: 1px solid rgba(248, 113, 113, 0.28);
    background: rgba(248, 113, 113, 0.05);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
[data-theme="light"] .user-danger-zone {
    border-color: rgba(220, 38, 38, 0.25);
    background: rgba(220, 38, 38, 0.05);
}

.users-header-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 12.5px;
    color: var(--text);
    line-height: 1.45;
}
[data-theme="light"] .users-header-banner {
    background: rgba(2, 132, 199, 0.06);
    border-color: rgba(2, 132, 199, 0.2);
    color: #0F172A;
}
.users-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.user-stat-card {
    background: var(--bg-hover);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    flex-shrink: 0;
}
.user-stat-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.user-stat-label {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
}
.users-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.users-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}
.user-row-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.schedule-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.schedule-stat-card {
    background: var(--bg-hover);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.schedule-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    flex-shrink: 0;
}
.schedule-stat-val {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.schedule-stat-label {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.schedule-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}
.schedule-lesson-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.schedule-lesson-card:hover {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.04);
}
[data-theme="light"] .schedule-lesson-card:hover {
    background: rgba(15, 23, 42, 0.03);
}
.schedule-lesson-card.is-editing {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 0 1px var(--accent);
}
[data-theme="light"] .schedule-lesson-card.is-editing {
    background: rgba(2, 132, 199, 0.08);
}
.schedule-lesson-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.schedule-num-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), #6366F1);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.schedule-lesson-info {
    min-width: 0;
}
.schedule-lesson-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.schedule-lesson-time {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.schedule-duration-tag {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--text-muted);
    font-weight: 600;
}
[data-theme="light"] .schedule-duration-tag {
    background: rgba(71, 85, 105, 0.1);
    color: #475569;
}

.schedule-break-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4px 0;
}
.schedule-break-divider::before {
    content: "";
    position: absolute;
    left: 24px;
    right: 24px;
    height: 1px;
    background: dashed 1px var(--border-soft);
    border-top: 1px dashed var(--border-soft);
    z-index: 1;
}
.schedule-break-badge {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
}
.schedule-break-badge.is-lunch {
    border-color: rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.08);
    color: var(--warning);
}
[data-theme="light"] .schedule-break-badge.is-lunch {
    border-color: rgba(217, 119, 6, 0.35);
    background: rgba(217, 119, 6, 0.08);
    color: #B45309;
}

.schedule-edit-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    margin-bottom: 14px;
    font-size: 12.5px;
    color: var(--text);
}
[data-theme="light"] .schedule-edit-notice {
    background: rgba(2, 132, 199, 0.1);
    border-color: var(--accent);
    color: #0F172A;
}

.toast-stack { position: fixed; bottom: 22px; right: 22px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast {
    max-width: 380px; padding: 13px 16px;
    background: var(--bg-panel); border: 1px solid var(--border);
    border-left: 4px solid var(--accent); border-radius: var(--radius);
    color: var(--text); font-size: 13px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    animation: toast-in 0.18s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.app-layout { display: flex; min-height: 100vh; align-items: stretch; }

.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--bg-panel);
    border-right: 1px solid var(--border-soft);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    z-index: 40; flex-shrink: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar, .sidebar-nav::-webkit-scrollbar, .nav-sub-items::-webkit-scrollbar {
    display: none; width: 0; height: 0;
}

.sidebar-header {
    padding: 16px 14px 12px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.sidebar-close-btn:hover {
    color: var(--text);
    background: var(--bg-hover);
}
.logo-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}
.logo-sub {
    font-size: 11.5px;
    color: var(--text-faint);
    margin-bottom: 6px;
}

.school-switcher { position: relative; margin-top: 6px; }
.school-switcher-btn {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 8px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text); font-family: inherit; font-size: 12.5px; font-weight: 600;
    cursor: pointer; text-align: left;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}
.school-switcher-btn:hover { border-color: var(--accent); background: var(--bg-hover); }
.school-switcher.open .school-switcher-btn {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}
.school-switcher-btn .sw-left {
    display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1;
}
.school-switcher-btn .sw-icon {
    font-size: 15px; flex-shrink: 0; display: flex; align-items: center;
}
.school-switcher-btn .sw-text {
    display: flex; flex-direction: column; min-width: 0; flex: 1;
}
.school-switcher-btn .sw-label {
    font-size: 9.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-faint); line-height: 1.1;
}
.school-switcher-btn .sw-name {
    font-size: 12px; font-weight: 600; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3;
}
.school-switcher-btn .sw-chev {
    font-size: 9px; color: var(--text-faint);
    transition: transform 0.2s ease; margin-left: 4px; flex-shrink: 0;
}
.school-switcher.open .school-switcher-btn .sw-chev { transform: rotate(180deg); }

.school-switcher-menu {
    position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 999;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.5);
    max-height: 260px; overflow-y: auto;
    scrollbar-width: none;
}
.school-switcher-menu::-webkit-scrollbar { display: none; width: 0; }

.school-option {
    display: block; width: 100%; text-align: left;
    padding: 8px 10px; border: none; background: transparent; border-radius: 6px;
    color: var(--text-muted); font-family: inherit; font-size: 12.5px; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: background 0.12s, color 0.12s;
}
.school-option:hover { background: var(--bg-hover); color: var(--text); }
.school-option.selected { background: rgba(56,189,248,0.14); color: var(--accent); font-weight: 600; }

.sidebar-nav {
    flex: 1; padding: 12px 10px; overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav-item {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    padding: 10px 12px; margin-bottom: 3px;
    background: transparent; border: none; border-radius: 9px;
    color: var(--text-muted); font-family: inherit; font-size: 13.5px; cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: rgba(56,189,248,0.14); color: var(--accent); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.nav-item .nav-ico { width: 18px; text-align: center; flex-shrink: 0; }

.nav-group { margin-bottom: 4px; }
.nav-group-btn { cursor: pointer; width: 100%; }
.nav-group-btn .nav-chev { font-size: 11px; color: var(--text-faint); transition: transform 0.2s ease; margin-left: auto; }
.nav-group.open .nav-group-btn .nav-chev { transform: rotate(0deg); }
.nav-group:not(.open) .nav-group-btn .nav-chev { transform: rotate(-90deg); }
.nav-group:not(.open) .nav-sub-items { display: none; }
.nav-sub-items {
    padding-left: 14px;
    padding-top: 3px;
    padding-bottom: 6px;
    border-left: 2px solid var(--border-soft);
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.nav-sub-item {
    display: block; width: 100%; text-align: left;
    padding: 8px 11px; background: transparent; border: none; border-radius: 8px;
    color: var(--text-muted); font-family: inherit; font-size: 12.5px; cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.nav-sub-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-sub-item.active { background: rgba(56,189,248,0.14); color: var(--accent); font-weight: 600; }

.sidebar-footer { padding: 14px; border-top: 1px solid var(--border-soft); }
.sidebar-user { margin-bottom: 10px; font-size: 13px; }
.sidebar-user .su-name { font-weight: 600; display: block; margin-bottom: 5px; }

.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    display: flex; align-items: center; gap: 14px;
    padding: 15px 26px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(11, 18, 32, 0.85);
    position: sticky; top: 0; z-index: 30;
    backdrop-filter: blur(8px);
}
.topbar h1 { font-size: 18px; flex: 1; }
.topbar .status-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-muted); }
.topbar .legend-item { display: inline-flex; align-items: center; gap: 6px; }

.sidebar-toggle { display: none; background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; padding: 4px 8px; }
.sidebar-backdrop { display: none; }

.content { padding: 22px 26px 60px; flex: 1; }
.view-section { display: none; }
.view-section.active { display: block; }

.page-intro { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }

.page-grid { display: grid; gap: 18px; align-items: start; justify-content: start;
             grid-template-columns: repeat(auto-fit, minmax(340px, 520px)); }
.page-stack { display: flex; flex-direction: column; gap: 18px; }
.page-grid .card + .card, .page-stack .card + .card { margin-top: 0; }

.subnav {
    display: flex; gap: 4px; flex-wrap: wrap;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 20px; padding-bottom: 2px;
}
.subnav-item {
    padding: 9px 14px; background: transparent; border: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    color: var(--text-muted); font-family: inherit; font-size: 13px; cursor: pointer;
}
.subnav-item:hover { color: var(--text); }
.subnav-item.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.subview { display: none; }
.subview.active { display: block; }

.auth-screen {
    position: fixed; inset: 0; z-index: 800;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    overflow-y: auto;
    background-color: #030712;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(56, 189, 248, 0.14), transparent 70%),
        radial-gradient(ellipse 60% 40% at 50% 120%, rgba(99, 102, 241, 0.12), transparent 70%),
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 44px 44px, 44px 44px;
    background-position: center, center, center, center;
}
.auth-card {
    width: 100%; max-width: 410px;
    background: rgba(13, 19, 33, 0.72);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 24px;
    padding: 36px 32px 32px;
    text-align: center;
    box-shadow:
        0 30px 60px -12px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}
.auth-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 35px 70px -12px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.auth-icon {
    font-size: 32px; width: 68px; height: 68px; line-height: 1;
    margin: 0 auto 16px; border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex; align-items: center; justify-content: center;
}
.auth-card h2 { font-size: 23px; color: #ffffff; margin-bottom: 6px; letter-spacing: -0.02em; font-weight: 700; }
.auth-card > p { font-size: 13px; color: #94a3b8; margin-bottom: 22px; line-height: 1.5; }
.auth-card .field { margin-bottom: 12px; }
.auth-card .field input {
    width: 100%; height: 48px; box-sizing: border-box;
    background: rgba(11, 18, 32, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px; color: #f1f5f9; font-size: 14.5px;
    padding: 0 16px; text-align: center;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.auth-card .field input:focus {
    outline: none; border-color: rgba(255, 255, 255, 0.35); background: #0b1220;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 0 4px rgba(56, 189, 248, 0.12);
}
.auth-card .field input#setupNationalId,
.auth-card .field input#otpCode { letter-spacing: 3px; font-size: 17px; }
.auth-card .btn:not(.btn-link) { height: 48px; border-radius: 12px; font-size: 14.5px; font-weight: 600; margin-top: 4px; }
.auth-card .btn-link {
    background: none; border: none; font-size: 12.5px; color: #94a3b8;
    text-decoration: none; margin-top: 10px; display: inline-block; cursor: pointer;
    transition: color 0.15s ease;
}
.auth-card .btn-link:hover { color: #ffffff; text-decoration: underline; }
.auth-error { color: var(--danger); font-size: 12.5px; margin-top: 14px; min-height: 18px; line-height: 1.4; }
.auth-error.ok { color: var(--success); }
#turnstileHost { display: flex; justify-content: center; margin: 4px 0 12px; min-height: 66px; }
#turnstileHost:empty { display: none; }

.btn-quick-logout {
    color: #ef4444 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}
.btn-quick-logout:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #f87171 !important;
}
.btn-quick-logout svg {
    width: 17px;
    height: 17px;
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100dvh;
        height: 100vh;
        max-height: 100dvh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.7);
        display: flex;
        flex-direction: column;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .sidebar-backdrop.open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 990;
    }
    .sidebar-footer {
        flex-shrink: 0;
        background: var(--bg-panel);
        padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
    }
    body.sidebar-open {
        overflow: hidden;
    }
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .topbar {
        padding: 10px 14px;
        gap: 10px;
    }
    .topbar h1 {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .topbar .status-legend {
        display: none;
    }
    .content {
        padding: 14px 14px 50px;
    }
    .page-grid {
        grid-template-columns: 1fr;
    }
    .field-row.cols-2, .field-row.cols-narrow {
        grid-template-columns: 1fr;
    }
    .toast-stack {
        left: 14px;
        right: 14px;
        bottom: 14px;
    }
    .toast {
        max-width: none;
    }
}

.schools-grid { display: flex; flex-direction: column; gap: 18px; }
.unassigned-section { margin-bottom: 4px; }
.unassigned-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.terminal-card {
    background: #090d16;
    border: 1px solid #1e293b;
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    display: flex;
    flex-direction: column;
}
.terminal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
}
.terminal-dots {
    display: flex;
    gap: 6px;
}
.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }
.terminal-title {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
}
.terminal-screen {
    min-height: 240px;
    max-height: 380px;
    overflow-y: auto;
    padding: 14px;
    color: #f1f5f9;
    font-size: 12.5px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    background: #070a12;
}
.terminal-meta {
    color: #64748b;
    font-size: 11px;
    margin-top: 4px;
}
.terminal-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    background: #0f172a;
    border-top: 1px solid #1e293b;
}
.terminal-quick-btn {
    background: #1e293b;
    color: #cbd5e1;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.terminal-quick-btn:hover {
    background: #334155;
    color: #fff;
    border-color: #475569;
}
.terminal-input-wrap {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    background: #090d16;
    border-top: 1px solid #1e293b;
    align-items: center;
}
.terminal-prefix {
    color: #10b981;
    font-weight: 700;
    font-size: 14px;
}
.terminal-input {
    flex: 1;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #f8fafc;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13px;
}
.terminal-input:focus {
    outline: none;
    border-color: #38bdf8;
}


.offline-code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 44px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-align: center;
    color: #38bdf8;
    margin: 12px 0 4px;
    text-indent: 0.28em;
}
.offline-code-countdown {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

.app-layout.teacher-mode .content { max-width: 580px; margin: 0 auto; width: 100%; padding-top: 14px; }
.app-layout.teacher-mode .topbar { justify-content: space-between; }
.app-layout.teacher-mode .topbar h1 { flex: 0 1 auto; }

.teacher-profile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 14px 18px;
    margin-bottom: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}
.teacher-profile-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.teacher-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.teacher-name {
    font-size: 15.5px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}
.teacher-sub {
    font-size: 12px;
    color: #94a3b8;
    margin: 2px 0 0;
}
.teacher-logout-btn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.teacher-logout-btn:hover {
    background: #ef4444;
    color: #ffffff;
}
.teacher-logout-btn svg {
    width: 17px;
    height: 17px;
}

.teacher-tabs {
    display: flex;
    gap: 6px;
    background: rgba(15, 23, 42, 0.75);
    padding: 5px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 18px;
}
.teacher-tab-btn {
    flex: 1;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.18s ease;
}
.teacher-tab-btn:hover:not(.active) {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.04);
}
.teacher-tab-btn.active {
    background: #ffffff;
    color: #090d16;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.teacher-tab-btn svg {
    width: 15px;
    height: 15px;
}

.teacher-tab-panel {
    display: none;
}
.teacher-tab-panel.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: tabFadeIn 0.22s ease;
}
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.teacher-quick-card {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(99, 102, 241, 0.05) 100%), rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.22);
}
.teacher-quick-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.pulse-ring {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    animation: ringPulse 2s infinite ease-in-out;
}
@keyframes ringPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}
.teacher-quick-head h3 {
    margin: 0;
    font-size: 16px;
    color: #ffffff;
}
.teacher-quick-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 18px;
    line-height: 1.45;
}
.btn-scan-qr {
    height: 52px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 14px;
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 12px 28px -6px rgba(56, 189, 248, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.btn-scan-qr:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px -6px rgba(56, 189, 248, 0.6);
}
.btn-scan-qr svg {
    width: 20px;
    height: 20px;
}
.teacher-manual-hint {
    margin: 14px 0 0;
    font-size: 12.5px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.45;
}
.teacher-manual-hint strong {
    color: #38bdf8;
}

.offline-code-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 14px 0 4px;
}
.offline-code-container .offline-code {
    margin: 0;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 0.22em;
    color: #38bdf8;
    text-shadow: 0 0 24px rgba(56, 189, 248, 0.35);
}
.btn-copy-code {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-copy-code:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}
.btn-copy-code svg {
    width: 17px;
    height: 17px;
}

.guide-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.guide-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
}
.guide-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13.5px;
}
.guide-body h4 {
    margin: 0 0 4px;
    font-size: 14px;
    color: #f8fafc;
}
.guide-body p {
    margin: 0;
    font-size: 12.5px;
    color: #94a3b8;
    line-height: 1.5;
}

.qr-modal-card {
    max-width: 390px;
    width: 92%;
    padding: 22px;
    border-radius: 24px;
    background: rgba(13, 19, 33, 0.96);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.9);
}
.qr-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.qr-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.qr-modal-title h3 {
    margin: 0;
    font-size: 16px;
    color: #ffffff;
}
.qr-scanner-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 18px;
    overflow: hidden;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
#qrVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qr-scanner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.qr-scanner-frame {
    position: relative;
    width: 68%;
    height: 68%;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 16px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
}
.qr-laser {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
    box-shadow: 0 0 12px #38bdf8;
    animation: laserMotion 2.2s infinite ease-in-out;
}
@keyframes laserMotion {
    0% { top: 0; opacity: 0.8; }
    50% { top: 100%; opacity: 1; }
    100% { top: 0; opacity: 0.8; }
}
.corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: #38bdf8;
    border-style: solid;
}
.corner.top-left { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-top-left-radius: 6px; }
.corner.top-right { top: -2px; right: -2px; border-width: 3px 3px 0 0; border-top-right-radius: 6px; }
.corner.bottom-left { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; border-bottom-left-radius: 6px; }
.corner.bottom-right { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-bottom-right-radius: 6px; }

.qr-scanner-footer {
    text-align: center;
    margin-top: 14px;
}
.qr-status-text {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

[data-theme="light"] .teacher-profile-bar {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .teacher-avatar {
    background: rgba(2, 132, 199, 0.08);
    border-color: rgba(2, 132, 199, 0.2);
}
[data-theme="light"] .teacher-name {
    color: #0f172a;
}
[data-theme="light"] .teacher-sub {
    color: #64748b;
}
[data-theme="light"] .teacher-logout-btn {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.18);
    color: #dc2626;
}
[data-theme="light"] .teacher-logout-btn:hover {
    background: #dc2626;
    color: #ffffff;
}

[data-theme="light"] .teacher-tabs {
    background: #e2e8f0;
    border-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .teacher-tab-btn {
    color: #64748b;
}
[data-theme="light"] .teacher-tab-btn:hover:not(.active) {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.6);
}
[data-theme="light"] .teacher-tab-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .teacher-quick-card {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.06) 0%, rgba(99, 102, 241, 0.04) 100%), #ffffff;
    border-color: rgba(2, 132, 199, 0.22);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .teacher-quick-head h3 {
    color: #0f172a;
}
[data-theme="light"] .teacher-quick-desc {
    color: #475569;
}
[data-theme="light"] .pulse-ring {
    background: #0284c7;
    box-shadow: 0 0 10px #0284c7;
}
[data-theme="light"] .btn-scan-qr {
    background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
    box-shadow: 0 10px 24px -4px rgba(2, 132, 199, 0.35);
}
[data-theme="light"] .teacher-manual-hint {
    color: #64748b;
}
[data-theme="light"] .teacher-manual-hint strong {
    color: #0284c7;
}

[data-theme="light"] .offline-code-container .offline-code {
    color: #0284c7;
    text-shadow: none;
}
[data-theme="light"] .btn-copy-code {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: #334155;
}
[data-theme="light"] .btn-copy-code:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}
[data-theme="light"] .offline-card-icon {
    background: rgba(2, 132, 199, 0.08);
    color: #0284c7;
}
[data-theme="light"] .offline-card-top h3 {
    color: #0f172a;
}
[data-theme="light"] .offline-card-top p,
[data-theme="light"] .offline-code-note,
[data-theme="light"] .offline-code-countdown {
    color: #64748b;
}

[data-theme="light"] .guide-item {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .guide-icon {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}
[data-theme="light"] .guide-body h4 {
    color: #0f172a;
}
[data-theme="light"] .guide-body p {
    color: #475569;
}

[data-theme="light"] .my-board-row {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .my-board-info strong {
    color: #0f172a;
}
[data-theme="light"] .my-board-info .hint {
    color: #64748b;
}

[data-theme="light"] .pwa-card {
    border: 1px solid rgba(2, 132, 199, 0.25);
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.06), rgba(99, 102, 241, 0.05));
}
[data-theme="light"] .pwa-card .hint {
    color: #475569;
}

[data-theme="light"] .pwa-login-tip {
    border: 1px solid rgba(2, 132, 199, 0.25);
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.06), rgba(99, 102, 241, 0.05));
}
[data-theme="light"] .pwa-login-tip strong {
    color: #0f172a;
}
[data-theme="light"] .pwa-login-tip p {
    color: #475569;
}

[data-theme="light"] .qr-modal-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
[data-theme="light"] .qr-modal-title h3 {
    color: #0f172a;
}
[data-theme="light"] .qr-status-text {
    color: #64748b;
}
[data-theme="light"] #btnCloseQrScanner {
    color: #64748b;
}
[data-theme="light"] #btnCloseQrScanner:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.05);
}

.offline-card-top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.offline-card-icon {
    font-size: 26px; line-height: 1; flex-shrink: 0;
    width: 52px; height: 52px; border-radius: 14px;
    background: rgba(56, 189, 248, 0.12);
    display: flex; align-items: center; justify-content: center;
}
.offline-card-top h3 { font-size: 16px; margin: 0 0 4px; }
.offline-card-top p { font-size: 13px; color: #94a3b8; margin: 0; line-height: 1.5; }
.offline-code-note { text-align: center; font-size: 12.5px; color: #94a3b8; margin: 12px 0 4px; line-height: 1.5; }

.board-unlock-icon {
    font-size: 34px; width: 78px; height: 78px; margin: 0 auto 10px;
    border-radius: 22px; background: rgba(16, 185, 129, 0.14);
    display: flex; align-items: center; justify-content: center;
}
.board-unlock-eyebrow {
    font-size: 11.5px; letter-spacing: 0.16em; font-weight: 700;
    color: #64748b; margin: 0 0 6px; text-transform: uppercase;
}
.board-unlock-card h2 { font-size: 24px; margin: 0 0 4px; }
.board-unlock-card #unlockUserBadge { margin: 16px 0 22px; }
.btn-unlock-lg { height: 56px; font-size: 17px; font-weight: 700; border-radius: 14px; }
.board-unlock-hint { font-size: 12.5px; color: #94a3b8; margin: 12px 0 0; }

.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 13px;
    margin-bottom: 20px;
    font-size: 11.5px;
    font-weight: 500;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    letter-spacing: 0.01em;
}
.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: badgePulse 2.4s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.login-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow:
        0 14px 28px -6px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}
.login-logo:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
}
.login-logo svg {
    width: 30px;
    height: 30px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 5px;
    letter-spacing: -0.025em;
}
.login-sub {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 24px;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}
.login-input {
    position: relative;
}
.login-input-ico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: #64748b;
    pointer-events: none;
    transition: color 0.18s ease;
}
.login-input input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 42px;
    box-sizing: border-box;
    background: rgba(11, 18, 32, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 14.5px;
    text-align: left !important;
    letter-spacing: normal !important;
    color-scheme: dark;
    caret-color: #38bdf8;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.login-input input::placeholder {
    color: #475569;
    font-size: 13.5px;
}
.login-input input:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(11, 18, 32, 0.85);
}
.login-input input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.35);
    background: #0b1220;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 0 4px rgba(56, 189, 248, 0.12);
}
.login-input:focus-within .login-input-ico {
    color: #38bdf8;
}

.login-input input:-webkit-autofill,
.login-input input:-webkit-autofill:hover,
.login-input input:-webkit-autofill:focus,
.login-input input:-webkit-autofill:active,
.auth-card .field input:-webkit-autofill,
.auth-card .field input:-webkit-autofill:hover,
.auth-card .field input:-webkit-autofill:focus,
.auth-card .field input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #0b1220 inset !important;
    box-shadow: 0 0 0 1000px #0b1220 inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    color: #f8fafc !important;
    caret-color: #38bdf8 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.login-input input:autofill,
.auth-card .field input:autofill {
    box-shadow: 0 0 0 1000px #0b1220 inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    color: #f8fafc !important;
    caret-color: #38bdf8 !important;
}

.login-toggle-pwd {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.18s ease, background 0.18s ease;
}
.login-toggle-pwd:hover {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
}
.login-toggle-pwd svg {
    width: 17px;
    height: 17px;
}

.btn-login {
    height: 48px;
    margin-top: 6px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    background: #ffffff;
    color: #090d16;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow:
        0 12px 28px -6px rgba(255, 255, 255, 0.16),
        0 4px 12px -2px rgba(0, 0, 0, 0.4);
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.btn-login:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow:
        0 16px 32px -6px rgba(255, 255, 255, 0.24),
        0 6px 16px -2px rgba(0, 0, 0, 0.5);
}
.btn-login:active {
    transform: translateY(0);
    background: #e2e8f0;
}
.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.btn-arrow {
    width: 15px;
    height: 15px;
    transition: transform 0.18s ease;
}
.btn-login:hover .btn-arrow {
    transform: translateX(3px);
}

.login-footer-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
    font-size: 11.5px;
    color: #64748b;
    letter-spacing: 0.01em;
}
.login-footer-info svg {
    width: 13px;
    height: 13px;
    color: #38bdf8;
}

@media (max-width: 900px) {
    input:not([type="checkbox"]):not([type="radio"]),
    select, textarea { font-size: 16px; }
    .login-input input { font-size: 16px; }
}

.my-board-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--border-soft);
}
.my-board-row:last-child { border-bottom: none; }
.my-board-info { min-width: 0; }
.my-board-info strong { display: block; font-size: 14.5px; }
.my-board-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 480px) {
    .my-board-row { flex-direction: column; align-items: stretch; }
    .my-board-actions { justify-content: stretch; }
    .my-board-actions .btn { flex: 1; }
}

.pwa-card {
    border: 1px solid rgba(56,189,248,0.35);
    background: linear-gradient(135deg, rgba(56,189,248,0.10), rgba(99,102,241,0.10));
}
.pwa-card .hint { margin-top: 10px; line-height: 1.6; }
.pwa-card .btn-link { display: block; margin: 10px auto 0; }

.pwa-login-tip {
    margin-top: 18px; padding: 14px 16px; text-align: left;
    border: 1px solid rgba(56,189,248,0.30); border-radius: 14px;
    background: linear-gradient(135deg, rgba(56,189,248,0.10), rgba(99,102,241,0.10));
}
.pwa-login-tip-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pwa-login-tip-ico { font-size: 18px; }
.pwa-login-tip strong { color: #e2e8f0; font-size: 14px; }
.pwa-login-tip p { font-size: 12.5px; color: #94a3b8; margin: 0; line-height: 1.55; }
.pwa-login-tip .btn { margin-top: 12px; }
.pwa-steps { margin: 4px 0 0; padding-left: 22px; }
.pwa-steps li { font-size: 14px; line-height: 1.7; color: #e2e8f0; margin-bottom: 8px; }

.screen-settings-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 1100px) {
    .screen-settings-grid {
        grid-template-columns: 1fr;
    }
}

.visual-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 16px;
}

.visual-choice-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 14px 12px 14px;
    background: var(--bg-hover);
    border: 2px solid var(--border-soft);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.visual-choice-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.visual-choice-card.is-selected {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 0 1px var(--accent);
}
[data-theme="light"] .visual-choice-card {
    background: #ffffff;
    border-color: var(--border);
}
[data-theme="light"] .visual-choice-card:hover {
    background: #f8fafc;
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .visual-choice-card.is-selected {
    background: rgba(2, 132, 199, 0.08);
    border-color: var(--accent);
}
.visual-choice-icon {
    font-size: 24px;
    line-height: 1;
    margin-bottom: 8px;
}
.visual-choice-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.visual-choice-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.35;
}
.visual-choice-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}
.visual-choice-card.is-selected .visual-choice-check {
    opacity: 1;
    transform: scale(1);
}

.board-mockup-wrapper {
    position: sticky;
    top: 20px;
}

.board-mockup-frame {
    background: #0b0f19;
    border: 10px solid #1e293b;
    border-bottom: 18px solid #1e293b;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}
[data-theme="light"] .board-mockup-frame {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.board-mockup-led {
    position: absolute;
    bottom: -14px;
    right: 14px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8, 0 0 16px rgba(56, 189, 248, 0.6);
    z-index: 10;
}

.board-mockup-brand {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #64748b;
    text-transform: uppercase;
    z-index: 10;
    pointer-events: none;
}

.board-mockup-screen {
    flex: 1;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    transition: background 0.4s ease;
    overflow: hidden;
}

.board-mockup-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: background 0.3s ease;
}
.board-mockup-screen.theme-dark .board-mockup-overlay {
    background: radial-gradient(circle at 50% 40%, rgba(15, 23, 42, 0.35) 0%, rgba(10, 15, 30, 0.75) 100%);
}
.board-mockup-screen.theme-light .board-mockup-overlay {
    background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.05) 0%, rgba(15, 23, 42, 0.30) 100%);
}

.board-mockup-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.board-mockup-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
.board-mockup-screen.theme-dark .board-mockup-pill {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
}
.board-mockup-screen.theme-light .board-mockup-pill {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #0f172a;
}

.board-mockup-pill-version {
    font-weight: 700 !important;
    letter-spacing: 0.5px;
}
.board-mockup-screen.theme-dark .board-mockup-pill-version {
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    color: #38bdf8 !important;
}
.board-mockup-screen.theme-light .board-mockup-pill-version {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(2, 132, 199, 0.45) !important;
    color: #0284c7 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.board-mockup-pill-status {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
    color: #34d399 !important;
}
.board-mockup-screen.theme-light .board-mockup-pill-status {
    color: #059669 !important;
}

.board-mockup-center {
    position: relative;
    z-index: 2;
    align-self: center;
    text-align: center;
    padding: 12px 24px;
    border-radius: 18px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}
.board-mockup-screen.theme-dark .board-mockup-center {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.board-mockup-screen.theme-light .board-mockup-center {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

.board-mockup-clock {
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}
.board-mockup-date {
    font-size: 11.5px;
    font-weight: 500;
    margin-top: 4px;
    opacity: 0.85;
}

.board-mockup-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 10.5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}
.board-mockup-screen.theme-dark .board-mockup-footer {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}
.board-mockup-screen.theme-light .board-mockup-footer {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

.board-mockup-video-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: #ef4444;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kiosk-news-card {
    background: var(--bg-hover);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.kiosk-news-card h5 {
    margin: 0 0 3px 0;
    font-size: 13.5px;
    color: var(--text);
    font-weight: 700;
}
.kiosk-news-card p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.kiosk-news-card .kiosk-news-date {
    font-size: 10.5px;
    color: var(--text-dim);
    white-space: nowrap;
}

.duration-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.duration-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border-soft);
    background: var(--bg-hover);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.duration-pill:hover {
    border-color: var(--accent);
    color: var(--text);
}
.duration-pill.is-active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
}

.announcement-card {
    background: var(--bg-hover);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}
.announcement-card:hover {
    border-color: var(--border);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
.announcement-card.is-active {
    border-left: 4px solid var(--success);
}
.announcement-card.is-expired {
    border-left: 4px solid var(--border-soft);
    opacity: 0.85;
}
.announcement-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}
.announcement-card-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.35;
}
.announcement-card-meta {
    font-size: 11.5px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.announcement-card-msg {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    margin: 8px 0 0 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.ann-mockup-frame {
    position: relative;
    border-radius: 16px;
    padding: 10px 10px 24px 10px;
    background: #090d16;
    border: 3px solid #1e293b;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    margin-top: 12px;
}
[data-theme="light"] .ann-mockup-frame {
    background: #0f172a;
    border-color: #334155;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
}
.ann-mockup-screen {
    min-height: 290px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    transition: background 0.35s ease;
}
.ann-mockup-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    z-index: 2;
}
.ann-mockup-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.ann-mockup-pill-kind {
    background: rgba(0, 0, 0, 0.28);
    border-color: rgba(255, 255, 255, 0.45);
    font-weight: 700;
    letter-spacing: 0.5px;
}
.ann-mockup-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: annPulse 1.8s infinite;
}
@keyframes annPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}
.ann-mockup-center {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    flex: 1;
}
.ann-mockup-card {
    width: 100%;
    max-width: 580px;
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
.ann-mockup-title {
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.35;
    word-break: break-word;
}
.ann-mockup-divider {
    height: 1.5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 1px;
    margin-bottom: 10px;
}
.ann-mockup-body {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.95);
    word-break: break-word;
}
.ann-mockup-poll {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ann-mockup-poll-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
}
.ann-mockup-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}
.ann-mockup-footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}
.ann-mockup-progress-track {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
}
.ann-mockup-progress-bar {
    height: 100%;
    width: 100%;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.quiz-correct-group {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.quiz-correct-pill {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--border-soft);
    background: var(--bg-hover);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.quiz-correct-pill:hover {
    border-color: var(--accent);
    color: var(--text);
}
.quiz-correct-pill.is-active {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 0 0 1px var(--success);
}

.quiz-opt-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--bg-hover);
    transition: border-color 0.2s ease;
}
.quiz-opt-input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}
.quiz-opt-letter {
    padding: 0 12px;
    font-weight: 800;
    font-size: 13px;
    color: var(--text-muted);
    border-right: 1px solid var(--border-soft);
    user-select: none;
}
.quiz-opt-input-wrap input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 9px 12px !important;
    flex: 1;
    color: var(--text);
}

.quiz-live-preview {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.98));
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: var(--radius);
    padding: 20px;
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    margin-top: 14px;
    position: relative;
    overflow: hidden;
}
[data-theme="light"] .quiz-live-preview {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-color: rgba(2, 132, 199, 0.35);
    color: #0f172a;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
.quiz-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.quiz-preview-tag {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #38bdf8;
}
[data-theme="light"] .quiz-preview-tag {
    color: #0284c7;
}
.quiz-preview-q {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 14px;
    min-height: 24px;
}
.quiz-preview-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
@media (max-width: 500px) {
    .quiz-preview-options {
        grid-template-columns: 1fr;
    }
}
.quiz-preview-opt {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
[data-theme="light"] .quiz-preview-opt {
    border-color: rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.03);
}
.quiz-preview-opt.is-correct {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: #10b981 !important;
    color: #34d399 !important;
    font-weight: 700;
}
[data-theme="light"] .quiz-preview-opt.is-correct {
    color: #059669 !important;
    background: rgba(16, 185, 129, 0.15) !important;
}
.quiz-preview-explanation {
    margin-top: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.12);
    border-left: 3px solid #38bdf8;
    font-size: 11.5px;
    color: #bae6fd;
    line-height: 1.45;
}
[data-theme="light"] .quiz-preview-explanation {
    background: rgba(2, 132, 199, 0.08);
    color: #0369a1;
}



.ann-color-group { display: flex; flex-wrap: wrap; gap: 10px; }

.ann-color {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.12s ease, border-color 0.12s ease;
}

.ann-color:hover { transform: translateY(-2px); }

.ann-color.is-active {
    border-color: var(--text, #e2e8f0);
    transform: translateY(-2px);
}

.ann-card-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    vertical-align: middle;
}

.ann-poll-results { margin-top: 12px; }

.ann-poll-total {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 8px;
}

.ann-poll-row { margin-bottom: 8px; }

.ann-poll-label {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    margin-bottom: 4px;
}

.ann-poll-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25);
    overflow: hidden;
}

.ann-poll-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.quiz-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
.quiz-filter-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.quiz-row-opt-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    background: var(--bg-hover);
    border: 1px solid var(--border-soft);
    margin-right: 4px;
    margin-bottom: 2px;
    color: var(--text-muted);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.quiz-row-opt-pill.is-correct {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--success);
    color: var(--success);
    font-weight: 700;
}

.quiz-action-btns {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.quiz-action-btns .btn {
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.quiz-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
    font-size: 12.5px;
    color: var(--text-muted);
}
.quiz-pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}
.quiz-pagination-controls .btn {
    padding: 4px 10px;
    font-size: 12px;
    min-width: 32px;
}

.quiz-stat-card {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    background: var(--bg-hover);
    border: 1px solid var(--border-soft);
    color: var(--text);
}

.quiz-filter-group .control {
    height: 38px;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
}

.quiz-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 260px;
    flex: 1;
}
.quiz-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
    line-height: 1;
}
.quiz-search-input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 36px !important;
    background: var(--bg-input) !important;
    background-color: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    color: var(--text) !important;
    font-size: 13px !important;
    font-family: inherit !important;
    outline: none !important;
    box-shadow: none !important;
    color-scheme: dark light;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
}
.quiz-search-input::placeholder {
    color: var(--text-faint) !important;
    opacity: 0.9;
}
.quiz-search-input::-webkit-search-cancel-button {
    filter: invert(0.6);
    cursor: pointer;
}
.quiz-search-input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18) !important;
    background: var(--bg-surface) !important;
}

.quiz-badge-protected {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-hover);
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
}

.school-profile-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 1.15fr;
    gap: 20px;
    align-items: start;
    margin-top: 16px;
}
@media (max-width: 960px) {
    .school-profile-grid {
        grid-template-columns: 1fr;
    }
}

.school-hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--bg-panel), var(--bg-hover));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.school-hero-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.school-hero-avatar {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.school-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.school-hero-info h2 {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.school-hero-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.school-brand-box {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--bg-input);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.school-logo-preview-box {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    background: repeating-conic-gradient(var(--bg-hover) 0% 25%, var(--bg-surface) 0% 50%) 50% / 16px 16px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.school-logo-preview-box img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.school-bg-preview-box {
    width: 120px;
    height: 68px;
    border-radius: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}
.school-bg-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.school-key-card {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.05), rgba(15, 23, 42, 0.2));
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius);
    padding: 20px;
}

.school-key-display-box {
    margin-top: 14px;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.school-key-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--accent);
    word-break: break-all;
}

.school-key-steps {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.school-key-step-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--text-muted);
}
.school-key-step-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 700;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.school-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.school-mini-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.school-mini-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}
.school-mini-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.school-mini-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-hover);
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    overflow: hidden;
    flex-shrink: 0;
}
.school-mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.school-mini-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    line-height: 1.3;
}

.school-danger-zone {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.04);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.school-danger-zone h4 {
    margin: 0 0 4px 0;
    color: var(--danger);
    font-size: 14px;
}
.school-danger-zone p {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-muted);
}

.log-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.log-metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.log-metric-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.log-metric-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.log-metric-icon.blue { background: rgba(56, 189, 248, 0.12); color: var(--accent); }
.log-metric-icon.green { background: rgba(52, 211, 153, 0.12); color: var(--success); }
.log-metric-icon.red { background: rgba(248, 113, 113, 0.12); color: var(--danger); }
.log-metric-icon.purple { background: rgba(167, 139, 250, 0.12); color: var(--violet); }
.log-metric-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.5px;
}
.log-metric-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.log-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
.log-toolbar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
    min-width: 280px;
}
.log-toolbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.log-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}
.log-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--text-muted);
    pointer-events: none;
}
.log-search-input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.log-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.log-filter-select {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    outline: none;
    cursor: pointer;
}
.log-filter-select:focus {
    border-color: var(--accent);
}

.log-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
}
.log-live-badge.is-live {
    background: rgba(5, 150, 105, 0.12);
    border-color: rgba(5, 150, 105, 0.35);
    color: var(--success);
}
.log-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-faint);
}
.log-live-badge.is-live .log-live-dot {
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: logPulse 1.8s infinite;
}
@keyframes logPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

[data-theme="light"] .log-metric-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .log-metric-value {
    color: #0f172a;
}
[data-theme="light"] .log-metric-icon.blue { background: rgba(2, 132, 199, 0.1); color: #0284c7; }
[data-theme="light"] .log-metric-icon.green { background: rgba(5, 150, 105, 0.1); color: #059669; }
[data-theme="light"] .log-metric-icon.red { background: rgba(220, 38, 38, 0.1); color: #dc2626; }
[data-theme="light"] .log-metric-icon.purple { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
[data-theme="light"] .log-search-input,
[data-theme="light"] .log-filter-select {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.15);
    color: #0f172a;
}
[data-theme="light"] .log-live-badge.is-live {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
    border-color: rgba(5, 150, 105, 0.3);
}

.log-table-row {
    transition: background 0.12s ease;
}
.log-table-row:hover {
    background: var(--bg-hover);
}
.log-time-cell {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}
.log-time-sub {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 2px;
}
.log-board-cell {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.log-board-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}
.log-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.log-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
}
.log-detail-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 16px;
}
.log-detail-item {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
}
.log-detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.log-detail-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

.security-policy-banner {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.9));
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
[data-theme="light"] .security-policy-banner {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid rgba(2, 132, 199, 0.2);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}
.security-policy-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.security-policy-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 4px;
}
.security-policy-rules {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.security-rule-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text);
}
.security-empty-box {
    text-align: center;
    padding: 32px 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-hover);
}
.security-empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
}
.security-empty-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.security-empty-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
.security-account-card {
    background: var(--bg-panel);
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
[data-theme="light"] .security-account-card {
    background: #ffffff;
    border-color: rgba(220, 38, 38, 0.3);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.06);
}
.security-ip-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.security-ip-badge {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

.install-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
    overflow: hidden;
}
.install-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
    border-color: rgba(56, 189, 248, 0.4);
}
[data-theme="light"] .install-card {
    background: #ffffff;
    border-color: rgba(226, 232, 240, 0.95);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}
[data-theme="light"] .install-card:hover {
    border-color: rgba(2, 132, 199, 0.45);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.09);
}
.install-card-pending {
    border-left: 5px solid #f59e0b;
}
.install-card-approved {
    border-left: 5px solid #10b981;
}
.install-card-rejected {
    border-left: 5px solid #ef4444;
}

.install-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.install-file-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 280px;
}
.install-file-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, var(--bg-hover), var(--bg-panel));
    border: 1px solid var(--border);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.install-file-title {
    font-size: 16.5px;
    font-weight: 700;
    color: var(--text);
    word-break: break-all;
    line-height: 1.3;
}
.install-file-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.install-detect-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    background: rgba(168, 85, 247, 0.14);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #c084fc;
}
[data-theme="light"] .install-detect-pill {
    background: rgba(147, 51, 234, 0.09);
    border-color: rgba(147, 51, 234, 0.25);
    color: #7e22ce;
}

.install-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 18px;
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--bg-hover);
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 13px;
}
[data-theme="light"] .install-details-grid {
    background: #f8fafc;
    border-color: rgba(226, 232, 240, 0.8);
}
.install-detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.install-detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    font-weight: 700;
}
.install-detail-value {
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    word-break: break-word;
}

.install-hash-pill {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    word-break: break-all;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.install-hash-pill:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--bg-panel);
    cursor: pointer;
}
[data-theme="light"] .install-hash-pill {
    background: #f1f5f9;
}
[data-theme="light"] .install-hash-pill:hover {
    background: #ffffff;
}

.install-action-panel {
    margin-top: 14px;
    padding: 16px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
[data-theme="light"] .install-action-panel {
    background: #f8fafc;
    border-color: rgba(226, 232, 240, 0.9);
}

.install-detect-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(2, 132, 199, 0.10);
    border: 1px solid rgba(2, 132, 199, 0.28);
    font-size: 12.5px;
    color: var(--text);
}
[data-theme="light"] .install-detect-box {
    background: rgba(2, 132, 199, 0.08);
    border-color: rgba(2, 132, 199, 0.22);
}

.install-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.install-quick-arg-btn {
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 11.5px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--accent);
    cursor: pointer;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 600;
    transition: all 0.15s ease;
}
.install-quick-arg-btn:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.install-btn-approve {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
    font-weight: 700;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.install-btn-approve:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.38);
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
}
.install-btn-reject {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    font-weight: 600;
    transition: all 0.14s ease;
}
.install-btn-reject:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 3px 12px rgba(239, 68, 68, 0.25);
}

.deploy-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.deploy-preset-card {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.deploy-preset-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}
[data-theme="light"] .deploy-preset-card {
    background: #ffffff;
    border-color: rgba(226, 232, 240, 0.9);
}
[data-theme="light"] .deploy-preset-card:hover {
    border-color: #0284c7;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
}
.deploy-preset-head {
    display: flex;
    align-items: center;
    gap: 8px;
}
.deploy-preset-icon {
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.deploy-preset-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.deploy-preset-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}

.deploy-stream-box {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 380px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
[data-theme="light"] .deploy-stream-box {
    background: #f8fafc;
}
.deploy-stream-item {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    transition: background 0.15s ease;
}
[data-theme="light"] .deploy-stream-item {
    background: #ffffff;
}
.deploy-stream-success {
    border-left: 3px solid #10b981;
}
.deploy-stream-failed {
    border-left: 3px solid #ef4444;
}



.install-quick-arg-btn.is-auto {
    background: rgba(2, 132, 199, 0.16);
    border-color: rgba(2, 132, 199, 0.55);
    color: #0284c7;
    font-weight: 700;
}

.install-quick-arg-btn.is-auto:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

.analytics-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.analytics-school { max-width: 230px; }

.seg-group {
    display: inline-flex;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3px;
    gap: 3px;
}

.seg-btn {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 7px;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.seg-btn:hover { color: var(--text); background: var(--bg-hover); }

.seg-btn.active {
    background: var(--accent);
    color: var(--accent-ink);
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 15px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-card .sc-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: .3px;
}

.stat-card .sc-value {
    font-size: 25px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
}

.stat-card .sc-hint { font-size: 11.5px; color: var(--text-faint); }

.stat-card.tone-accent  { border-color: rgba(56, 189, 248, 0.35); }
.stat-card.tone-success { border-color: rgba(52, 211, 153, 0.35); }
.stat-card.tone-warning { border-color: rgba(251, 191, 36, 0.35); }
.stat-card.tone-danger  { border-color: rgba(248, 113, 113, 0.35); }
.stat-card.tone-violet  { border-color: rgba(167, 139, 250, 0.35); }

.rank-list { display: flex; flex-direction: column; gap: 9px; }

.rank-row {
    display: grid;
    grid-template-columns: 26px 1fr auto;
    align-items: center;
    gap: 11px;
}

.rank-no {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    background: var(--bg-input);
    color: var(--text-muted);
    border: 1px solid var(--border-soft);
}

.rank-row:first-child .rank-no { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

.rank-main { min-width: 0; }
.rank-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.rank-sub  { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

.rank-bar {
    margin-top: 6px;
    height: 6px;
    border-radius: 99px;
    background: var(--bg-input);
    overflow: hidden;
}

.rank-bar > span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), var(--violet));
}

.rank-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.chart-cols {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 148px;
    padding-top: 8px;
}

.chart-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    min-width: 0;
    height: 100%;
}

.chart-col .cc-bar {
    width: 100%;
    max-width: 30px;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(180deg, var(--accent), rgba(56, 189, 248, 0.32));
    min-height: 3px;
}

.chart-col.is-empty .cc-bar { background: var(--bg-input); }

.chart-col .cc-label {
    font-size: 10px;
    color: var(--text-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.split-list { display: flex; flex-direction: column; gap: 11px; }

.split-row .sr-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 5px;
}

.split-row .sr-name { font-size: 13px; color: var(--text); font-weight: 600; }
.split-row .sr-value { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.split-bar {
    height: 8px;
    border-radius: 99px;
    background: var(--bg-input);
    overflow: hidden;
}

.split-bar > span { display: block; height: 100%; border-radius: 99px; }

.analytics-empty {
    text-align: center;
    padding: 34px 18px;
    color: var(--text-faint);
    font-size: 13.5px;
}

.list-actions .btn-delete.btn-text {
    width: auto;
    height: auto;
    min-width: 0;
    padding: 7px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.ann-media-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
}

.ann-media-thumb {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    display: grid;
    place-items: center;
    font-size: 22px;
    overflow: hidden;
}

.ann-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ann-media-info { flex: 1; min-width: 0; }

.ann-media-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ann-media-size { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

.ann-media-loop {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}

.ann-media-loop input { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
.ann-media-loop small { color: var(--text-faint); font-size: 11.5px; }

.ann-preview-media {
    margin-top: 14px;
    max-height: 190px;
    border-radius: 10px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.28);
}

.ann-preview-media img { max-width: 100%; max-height: 190px; object-fit: contain; display: block; }
.ann-preview-media .apm-video { padding: 26px; font-size: 34px; }

.app-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 26px 16px 20px;
    margin-top: 28px;
    border-top: 1px solid var(--border-soft);
}

.app-footer .af-main {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
}

.app-footer .af-sub {
    font-size: 11px;
    color: var(--text-faint);
    margin: 0;
}

.app-footer .af-sub a {
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color .15s;
}

.app-footer .af-sub a:hover { color: var(--accent); }

.uninstall-boards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.uninstall-board-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 99px;
    font-size: 12px;
}

.uninstall-board-chip .ubc-name { color: var(--text); font-weight: 600; }
.uninstall-board-chip .ubc-count { color: var(--accent); font-weight: 600; }
.uninstall-board-chip .ubc-time { color: var(--text-faint); font-size: 11px; }

.uninstall-app-card { margin-top: 14px; }

.uninstall-app-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.uninstall-app-head .uai-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.uninstall-app-head .uai-meta {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 3px;
}

.uninstall-arg-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-soft);
}

.uninstall-arg-row .control { flex: 1; min-width: 200px; }

.uninstall-board-rows { display: flex; flex-direction: column; }

.uninstall-board-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
}

.uninstall-board-row:last-child { border-bottom: none; }
.uninstall-board-row .ubr-name { font-size: 13.5px; color: var(--text); font-weight: 600; }

.uninstall-board-row .ubr-meta {
    font-size: 11.5px;
    color: var(--text-faint);
    margin-top: 2px;
    word-break: break-all;
}

.ver-progress-wrap { margin-top: 6px; }

.ver-progress {
    height: 5px;
    border-radius: 99px;
    background: var(--bg-input);
    overflow: hidden;
}

.ver-progress > span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: var(--accent);
    transition: width .3s ease;
}

.ver-progress-text {
    font-size: 10.5px;
    color: var(--text-faint);
    margin-top: 3px;
    text-align: center;
}

.users-io-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 0;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-soft);
}

.import-report {
    margin: 14px 0 4px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
}

.import-report .ir-head {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.import-report .ir-rows { max-height: 260px; overflow-y: auto; }

.import-report .ir-row {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-size: 12.5px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-soft);
}

.import-report .ir-row:last-child { border-bottom: none; }
.import-report .ir-no { color: var(--text-faint); min-width: 46px; }
.import-report .ir-name { color: var(--text); font-weight: 600; min-width: 150px; }
.import-report .ir-msg { color: var(--text-muted); flex: 1; }
.import-report .ir-row.is-ok .ir-msg { color: var(--success); }
.import-report .ir-row.is-fail .ir-msg { color: var(--danger); }

.oturum-yukleniyor {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: grid;
    place-items: center;
    background: var(--bg-app);
}

body:not(.oturum-bekleniyor) .oturum-yukleniyor { display: none; }

.oy-spinner {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    animation: oy-don 0.8s linear infinite;
}

@keyframes oy-don {
    to { transform: rotate(360deg); }
}

.bulk-cmd-group { margin-top: 14px; }

.bulk-cmd-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.bulk-cmd-head .bcg-title { font-size: 14px; font-weight: 700; color: var(--text); }

.bulk-cmd-output {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 260px;
    overflow-y: auto;
    margin: 0 0 10px;
}

.bulk-cmd-boards { display: flex; flex-wrap: wrap; gap: 6px; }

.bulk-cmd-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 99px;
    font-size: 11.5px;
    color: var(--text);
}

.bulk-cmd-chip small { color: var(--text-faint); font-size: 10.5px; }

.package-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.package-row:hover {
    border-color: var(--primary);
}

.package-row-active {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.08);
}

.package-row-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.dispatch-board-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.dispatch-board-row:last-child {
    border-bottom: none;
}

.dispatch-board-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

.install-request-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
    max-height: 200px;
    overflow: auto;
}

.install-request-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12.5px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.08);
}

.install-request-board {
    font-weight: 600;
    color: var(--text);
}

.install-request-user {
    color: var(--text-muted);
}

.install-request-time {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
}

.policy-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
}

.policy-switch {
    position: relative;
    width: 54px;
    height: 30px;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    background: rgba(148, 163, 184, 0.45);
    transition: background .18s;
    flex-shrink: 0;
    padding: 0;
}

.policy-switch-on {
    background: #16a34a;
}

.policy-switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    transition: transform .18s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.policy-switch-on .policy-switch-knob {
    transform: translateX(24px);
}

.board-user-line {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 6px;
    font-size: 12.5px;
    flex-wrap: wrap;
}

.board-user-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.board-user-name {
    font-weight: 600;
    color: var(--text);
}

.board-user-time {
    color: var(--text-muted);
    font-size: 11.5px;
}

.board-user-always {
    color: #a855f7;
    font-weight: 600;
}

.always-unlock-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
}

.always-unlock-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.weekend-banner {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(168, 85, 247, 0.35);
    background: rgba(168, 85, 247, 0.08);
}

.weekend-banner-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

.weekend-banner-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.bulk-target-box {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    padding: 16px;
    margin-bottom: 16px;
}
.bulk-target-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-soft);
}
.bulk-target-title {
    font-size: 13.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.bulk-target-tools {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.bulk-target-tools .control {
    width: auto;
    min-width: 150px;
    max-width: 210px;
    font-size: 12.5px;
    padding-top: 7px;
    padding-bottom: 7px;
}
.bulk-board-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 8px;
    max-height: 288px;
    overflow-y: auto;
    padding: 2px;
}
.bulk-board-list > .faint {
    grid-column: 1 / -1;
    margin: 6px 0;
}
.bulk-board-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    font-size: 12.5px;
    cursor: pointer;
    user-select: none;
    min-width: 0;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.bulk-board-chip:hover { border-color: var(--accent); }
.bulk-board-chip.secili {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.14);
}
.bulk-board-chip.cevrimdisi { opacity: 0.55; }
.bulk-board-chip input {
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}
.bulk-board-chip .bbc-nokta {
    font-size: 8px;
    flex-shrink: 0;
}
.bulk-board-chip .bbc-govde {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.bulk-board-chip .bbc-ad {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bulk-board-chip .bbc-surum {
    font-size: 10.5px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.preset-cmd-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}
.preset-cmd-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.preset-cmd-label {
    flex: 0 0 56px;
    padding-top: 7px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.preset-cmd-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.preset-cmd-btn {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.preset-cmd-btn:hover {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.12);
}
.preset-cmd-btn.tehlikeli {
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}
.preset-cmd-btn.tehlikeli:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.14);
}
.terminal-quick-btn.tehlikeli {
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}
.terminal-quick-btn.tehlikeli:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fff;
}

@media (max-width: 780px) {
    .terminal-bar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }
    .terminal-bar .terminal-title {
        order: 3;
        width: 100%;
        font-size: 11px;
    }
    .terminal-bar > div:last-child {
        flex-wrap: wrap;
        justify-content: flex-end;
        flex: 1;
    }
    .terminal-screen {
        min-height: 180px;
        max-height: 46vh;
        font-size: 12px;
        padding: 10px;
    }
    .terminal-quick-actions {
        padding: 10px;
        gap: 6px;
        max-height: 128px;
        overflow-y: auto;
    }
    .terminal-quick-btn {
        flex: 1 1 calc(50% - 3px);
        text-align: center;
        padding: 8px 6px;
        font-size: 12px;
    }
    .terminal-input-wrap {
        flex-wrap: wrap;
        padding: 10px;
    }
    .terminal-input-wrap .terminal-input {
        flex: 1 1 100%;
        order: 2;
        font-size: 16px;
    }
    .terminal-input-wrap .btn {
        order: 3;
        flex: 1;
    }
    .terminal-prefix { order: 1; }

    .bulk-target-box { padding: 12px; }
    .bulk-target-head { flex-direction: column; align-items: stretch; }
    .bulk-target-tools { display: grid; grid-template-columns: 1fr 1fr; }
    .bulk-target-tools .control { max-width: none; min-width: 0; }
    .bulk-board-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        max-height: 230px;
    }
    .preset-cmd-group { flex-direction: column; gap: 5px; }
    .preset-cmd-label { flex: none; padding-top: 0; }
    .preset-cmd-btn { flex: 1 1 calc(50% - 3px); text-align: center; }

    .analytics-toolbar { flex-wrap: wrap; gap: 8px; }
    .analytics-toolbar .control { flex: 1; max-width: none; }
    .analytics-toolbar .btn { flex: 1 1 100%; }

    .list-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .list-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    .list-actions .btn {
        flex: 1 1 auto;
        min-height: 36px;
    }
    .bulk-cmd-output { font-size: 11.5px; }
    .bulk-cmd-boards { gap: 5px; }
}

@media (max-width: 420px) {
    .bulk-board-list { grid-template-columns: 1fr 1fr; }
    .bulk-target-tools .control { grid-column: 1 / -1; }
    .terminal-quick-btn { flex: 1 1 100%; }
}

.policy-school-block {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
}
.policy-school-block > .policy-row {
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 0;
}
.policy-board-list {
    display: flex;
    flex-direction: column;
    background: var(--bg-input);
    padding: 6px 0;
}
.policy-board-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    border-left: 3px solid transparent;
}
.policy-board-row + .policy-board-row { border-top: 1px solid var(--border-soft); }
.policy-board-row.istisna {
    border-left-color: var(--accent);
    background: rgba(56, 189, 248, 0.06);
}
.policy-board-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    min-width: 0;
}
.policy-board-name .bbc-nokta { font-size: 8px; }
.policy-board-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.policy-board-effective {
    font-size: 11.5px;
    color: var(--text-muted);
    white-space: nowrap;
}
.seg-group-sm .seg-btn {
    padding: 5px 10px;
    font-size: 11.5px;
}

@media (max-width: 680px) {
    .policy-board-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .policy-board-controls { justify-content: space-between; }
    .seg-group-sm { flex: 1; }
    .seg-group-sm .seg-btn { flex: 1; }
}

.board-filter-card {
    margin-bottom: 16px;
    padding: 14px 16px;
}
.board-filter-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.board-filter-row .board-search {
    flex: 1 1 280px;
    min-width: 200px;
}
.board-filter-row .control:not(.board-search) {
    width: auto;
    min-width: 170px;
    flex: 0 0 auto;
}
.board-filter-summary {
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.board-filter-summary:empty { display: none; }

@media (max-width: 780px) {
    .board-filter-card { padding: 12px; }
    .board-filter-row { display: grid; grid-template-columns: 1fr 1fr; }
    .board-filter-row .board-search { grid-column: 1 / -1; min-width: 0; }
    .board-filter-row .control:not(.board-search) { min-width: 0; width: 100%; }
    .board-filter-row .btn { grid-column: 1 / -1; }
}
