:root {
    --zone-ink: #071015;
    --zone-panel: rgba(8, 20, 25, .91);
    --zone-panel-soft: rgba(15, 35, 41, .82);
    --zone-line: rgba(119, 224, 214, .22);
    --zone-cyan: #6ee7df;
    --zone-amber: #f4b942;
    --zone-red: #ef665b;
    --zone-text: #edf8f7;
    --zone-muted: #a8c2c2;
}

* { box-sizing: border-box; }

body.admin-zone {
    min-height: 100vh;
    margin: 0;
    color: var(--zone-text);
    background-color: var(--zone-ink);
    background-image:
        linear-gradient(90deg, rgba(3, 10, 13, .9) 0%, rgba(3, 10, 13, .63) 48%, rgba(3, 10, 13, .25) 100%),
        url('/assets/images/admin/no-go-zone-professor.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.admin-zone::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        repeating-linear-gradient(90deg, transparent 0 79px, rgba(110, 231, 223, .025) 80px),
        repeating-linear-gradient(0deg, transparent 0 79px, rgba(110, 231, 223, .02) 80px);
}

.zone-topbar {
    display: flex;
    min-height: 74px;
    padding: 0 clamp(1rem, 4vw, 3.5rem);
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--zone-line);
    background: rgba(4, 13, 17, .83);
    backdrop-filter: blur(16px);
}

.zone-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: var(--zone-text);
    text-decoration: none;
    font-weight: 900;
    letter-spacing: .12em;
}

.zone-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #17130b;
    background: var(--zone-amber);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    font-size: .72rem;
}

.zone-status {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--zone-muted);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.zone-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #57d68d;
    box-shadow: 0 0 12px #57d68d;
}

.zone-back {
    padding: .65rem .9rem;
    color: var(--zone-text);
    border: 1px solid var(--zone-line);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 750;
}

.zone-back:hover,
.zone-back:focus-visible { border-color: var(--zone-cyan); color: var(--zone-cyan); }

.zone-auth-shell {
    display: grid;
    width: min(1120px, calc(100% - 2rem));
    min-height: calc(100vh - 74px);
    margin: 0 auto;
    grid-template-columns: minmax(0, 500px) 1fr;
    align-items: center;
    gap: clamp(2rem, 6vw, 6rem);
    padding: 3rem 0;
}

.zone-card,
.zone-panel {
    border: 1px solid var(--zone-line);
    background: linear-gradient(145deg, rgba(14, 34, 40, .96), rgba(5, 16, 21, .94));
    box-shadow: 0 28px 80px rgba(0, 0, 0, .44);
    backdrop-filter: blur(20px);
}

.zone-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.4rem, 4vw, 2.6rem);
    border-radius: 18px;
}

.zone-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: repeating-linear-gradient(135deg, var(--zone-amber) 0 16px, #14191b 16px 32px);
}

.zone-classification,
.zone-eyebrow {
    margin: 0 0 .8rem;
    color: var(--zone-amber);
    font-size: .73rem;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.zone-card h1 {
    max-width: 12ch;
    margin: 0 0 .8rem;
    font-size: clamp(2.25rem, 5vw, 4rem);
    line-height: .98;
    letter-spacing: -.04em;
}

.zone-card > p:not(.zone-eyebrow):not(.zone-classification) {
    color: var(--zone-muted);
    line-height: 1.65;
}

.zone-auth-form { display: grid; gap: .7rem; margin-top: 1.5rem; }
.zone-auth-form label { color: #dcebea; font-size: .84rem; font-weight: 800; }

.zone-auth-form input {
    width: 100%;
    min-height: 50px;
    padding: .75rem .9rem;
    color: #fff;
    background: rgba(0, 0, 0, .28);
    border: 1px solid rgba(168, 194, 194, .3);
    border-radius: 8px;
    font: inherit;
}

.zone-auth-form input:focus {
    outline: 3px solid rgba(110, 231, 223, .17);
    border-color: var(--zone-cyan);
}

.zone-auth-form input[name="code"] {
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: .4em;
    text-align: center;
}

.zone-button {
    min-height: 48px;
    margin-top: .65rem;
    padding: .75rem 1.1rem;
    color: #091518;
    background: linear-gradient(135deg, var(--zone-cyan), #51b9c5);
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.zone-button:hover,
.zone-button:focus-visible { filter: brightness(1.1); transform: translateY(-1px); }

.zone-auth-error,
.zone-message {
    padding: .85rem 1rem;
    border: 1px solid rgba(239, 102, 91, .45);
    border-radius: 8px;
    color: #ffd7d3;
    background: rgba(130, 29, 25, .28);
}

.professor-note {
    max-width: 390px;
    align-self: end;
    justify-self: end;
    margin-bottom: 3rem;
    padding: 1.1rem 1.25rem;
    color: #dcebea;
    background: rgba(5, 16, 21, .75);
    border-left: 3px solid var(--zone-amber);
    border-radius: 0 10px 10px 0;
    backdrop-filter: blur(12px);
}

.professor-note strong { display: block; margin-bottom: .3rem; color: #fff; }
.professor-note p { margin: 0; color: var(--zone-muted); line-height: 1.55; }

.zone-dashboard {
    width: min(1440px, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3.5rem) 0;
}

.zone-dashboard-head {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.zone-dashboard-head h1 { margin: .2rem 0 0; font-size: clamp(2rem, 4vw, 3.5rem); }
.zone-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.zone-actions form { margin: 0; }

.zone-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: .65rem .9rem;
    color: #fff;
    background: rgba(15, 35, 41, .9);
    border: 1px solid var(--zone-line);
    border-radius: 8px;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    text-decoration: none;
}

.zone-action.danger { border-color: rgba(239, 102, 91, .5); color: #ffd0cd; }
.zone-action:hover { border-color: var(--zone-cyan); }

.zone-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.zone-metric {
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--zone-line);
    border-radius: 12px;
    background: var(--zone-panel-soft);
    backdrop-filter: blur(14px);
}

.zone-metric span { display: block; color: var(--zone-muted); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.zone-metric strong { display: block; margin-top: .25rem; color: var(--zone-cyan); font-size: 1.7rem; }

.zone-panel { overflow: hidden; border-radius: 16px; }
.zone-panel-title { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--zone-line); }
.zone-panel-title h2 { margin: 0; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.zone-panel-title span { color: var(--zone-muted); font-size: .8rem; }
.zone-table-wrap { overflow-x: auto; }

.zone-score-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

.zone-score-table th,
.zone-score-table td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid rgba(119, 224, 214, .1); }
.zone-score-table th { color: var(--zone-amber); background: rgba(0, 0, 0, .22); font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; }
.zone-score-table tbody tr:hover { background: rgba(110, 231, 223, .045); }
.zone-score-table code { color: var(--zone-cyan); }

.zone-delete {
    padding: .45rem .65rem;
    color: #ffd0cd;
    background: rgba(130, 29, 25, .3);
    border: 1px solid rgba(239, 102, 91, .38);
    border-radius: 6px;
    cursor: pointer;
}

.zone-message { margin-bottom: 1rem; }
.zone-message.success { color: #cbf8dc; border-color: rgba(87, 214, 141, .42); background: rgba(27, 105, 60, .28); }
.zone-empty { padding: 2rem; color: var(--zone-muted); text-align: center; }

@media (max-width: 800px) {
    body.admin-zone { background-position: 68% center; }
    .zone-auth-shell { grid-template-columns: 1fr; align-content: center; }
    .professor-note { justify-self: stretch; margin: 0; }
    .zone-dashboard-head { align-items: flex-start; flex-direction: column; }
    .zone-metrics { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .zone-status { display: none; }
    .zone-brand { font-size: .82rem; }
    .zone-auth-shell, .zone-dashboard { width: min(100% - 1rem, 1440px); }
    .zone-card { border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .zone-button { transition: none; }
}
