/* Staff dashboard styles (builds on style.css tokens). Mobile-first. */
.admin-body { background: var(--bg); }
.center-view { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; }
.login-card { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); width: 100%; max-width: 440px; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 2rem 1.5rem; }
.link-btn { background: none; border: 0; color: var(--blue-text); text-decoration: underline; padding: .4rem; font-size: inherit; }

.admin-layout { min-height: 100vh; }
.admin-topbar { position: sticky; top: 0; z-index: 90; background: #060b16; border-bottom: 1px solid var(--line); color: #fff; display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; }
.admin-sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: 272px; max-width: 86vw; background: #060b16; border-right: 1px solid var(--line); color: #e2e8f0; z-index: 120;
  display: flex; flex-direction: column; transform: translateX(-100%); visibility: hidden; transition: transform .28s, visibility .28s; overflow-y: auto;
}
.admin-sidebar.open { transform: none; visibility: visible; }
.admin-scrim { position: fixed; inset: 0; background: rgba(8,16,30,.6); z-index: 110; }
.admin-brand { padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-brand .who { font-size: .82rem; margin-top: .75rem; color: #cbd5e1; word-break: break-all; }
.admin-brand .who b { color: var(--gold); display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.admin-nav { flex: 1; padding: .75rem 0; }
.admin-nav button {
  display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; background: none; border: 0; border-left: 4px solid transparent;
  color: #cbd5e1; padding: .85rem 1.25rem; font-weight: 500; min-height: 48px;
}
.admin-nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav button[aria-current="page"] { background: rgba(255,255,255,.08); color: var(--gold); border-left-color: var(--gold); }
.admin-nav .count { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; font-size: .72rem; padding: .05rem .5rem; font-weight: 700; }
.admin-side-foot { padding: 1rem 1.25rem; display: grid; gap: .6rem; border-top: 1px solid rgba(255,255,255,.1); }
.admin-main { padding: 1.25rem 1rem 4rem; max-width: 1200px; outline: none; }

.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.admin-head h1 { font-size: 1.5rem; }
.admin-head p { color: var(--muted); font-size: .93rem; }
.panel { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.25rem; margin-bottom: 1.25rem; }
.stats { display: grid; gap: .9rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.25rem; }
.stat { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); border-bottom: 4px solid var(--blue); padding: 1.1rem; box-shadow: var(--shadow-sm); }
.stat:nth-child(2n) { border-bottom-color: var(--gold); }
.stat span { display: block; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stat strong { font-size: 1.9rem; font-family: var(--font-serif); color: #fff; }

.tools { display: grid; gap: .6rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
.tools input, .tools select { width: 100%; padding: .65rem .9rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); min-height: 44px; background: #0a1120; color: #fff; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; }
table.data th, table.data td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: .93rem; }
table.data th { background: #0d1626; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); }
table.data td.actions { white-space: nowrap; display: flex; gap: .4rem; flex-wrap: wrap; }
.st { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.st-published, .st-approved { background: #12351f; color: #8be0a6; }
.st-draft, .st-pending { background: #3a2c0c; color: #ffd98a; }
.st-archived, .st-rejected { background: #262f3f; color: #c5cedd; }
.st-new { background: #3b1515; color: #ffb4ab; }
.inbox { display: grid; gap: .9rem; }
.item { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.1rem; border-left: 5px solid var(--line-strong); }
.item.unread { border-left-color: var(--red); }
.item h3 { font-size: 1.02rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.item .body { white-space: pre-wrap; margin: .7rem 0; color: var(--ink); font-size: .95rem; overflow-wrap: anywhere; }
.item .btn-row { gap: .5rem; }
.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--line-strong); }
.btn-danger { background: transparent; color: #ffb4ab; border-color: #7a2b2b; }
.btn-danger:hover { background: #b42318; color: #fff; border-color: #b42318; }
.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translate(-50%, 140%); background: #0f1d36; border: 1px solid var(--line-strong); color: #fff; padding: .8rem 1.3rem; border-radius: 999px; z-index: 900; transition: transform .3s; max-width: 92vw; font-size: .93rem; box-shadow: var(--shadow-lg); }
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: #7a1d14; }
.edit-form h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.edit-form .form-group { margin-bottom: .9rem; }
.edit-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }
.role-note { font-size: .85rem; color: var(--muted); }
.log-row { display: flex; flex-wrap: wrap; gap: .25rem .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.log-row:last-child { border-bottom: 0; }
.log-row time { color: var(--muted); font-size: .8rem; }

@media (min-width: 600px) { .tools { grid-template-columns: 1fr 180px auto; } .stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) {
  .admin-topbar, .admin-scrim { display: none !important; }
  .admin-sidebar { transform: none; visibility: visible; width: 260px; }
  .admin-main { margin-left: 260px; padding: 2rem 2rem 4rem; }
  .stats { grid-template-columns: repeat(4, 1fr); }
}
.toast { opacity: 0; pointer-events: none; }
.toast.show { opacity: 1; }

.img-preview { margin-top: .5rem; min-height: 0; }
.img-preview img { max-height: 160px; border-radius: 10px; border: 1px solid var(--line); object-fit: cover; }
.campus-admin { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.campus-slot { display: grid; gap: .35rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #0b1322; }
.campus-slot .img-preview { aspect-ratio: 16 / 10; display: grid; place-items: center; background: #0a1120; border-radius: 10px; overflow: hidden; color: var(--muted); font-size: .85rem; margin: 0 0 .4rem; }
.campus-slot .img-preview img { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; }
.campus-slot input[type=file] { font-size: .85rem; color: var(--muted); width: 100%; }
.edit-form select, .edit-form input[type=file] { width: 100%; }
@media (min-width: 640px) { .campus-admin { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .campus-admin { grid-template-columns: repeat(3, 1fr); } }
.setup-box { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.setup-box summary { cursor: pointer; font-size: .9rem; color: var(--blue-text); padding: .4rem 0; }
.setup-box form { margin-top: .8rem; }
#bootHelp ul { text-align: left; margin: .8rem 0 0 1.1rem; list-style: disc; color: var(--muted); font-size: .92rem; }
#bootHelp li + li { margin-top: .35rem; }
.live-dot { color: #4ade80; font-size: .78rem; font-weight: 700; margin-left: .35rem; white-space: nowrap; }

.mode-banner { background: linear-gradient(90deg, #3a2c0c, #2a1f08); color: var(--warn-ink); padding: .65rem 1rem; font-size: .9rem; border-bottom: 1px solid rgba(228, 177, 58, .35); }
.mode-banner .link-btn { color: #fff; font-weight: 700; }
@media (min-width: 1000px) { .mode-banner { margin-left: 260px; padding-inline: 2rem; } }
.checklist, .progress { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .4rem; }
.checklist li, .progress li { padding: .55rem .8rem; border-radius: 10px; background: #0b1322; border: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.checklist li.ok, .progress li.ok { border-color: rgba(34, 197, 94, .45); color: #8be0a6; }
.checklist li.bad, .progress li.bad { border-color: rgba(239, 68, 68, .5); color: #ffb4ab; }
.progress li.busy { border-color: rgba(228, 177, 58, .5); color: var(--gold-text); }
.steps { margin: .8rem 0 1rem 1.2rem; display: grid; gap: .45rem; color: var(--muted); font-size: .94rem; list-style: decimal; }
.steps code, .panel code { background: #0a1120; padding: .1rem .4rem; border-radius: 6px; color: #fff; font-size: .85em; }
