/* ============================================================
   Mysterious Matters — admin.css

   Rebuilt by subtraction. The previous version had eight bordered
   boxes on one screen, four stacked navigation surfaces, and the
   same nine section links rendered twice — once in the sidebar and
   again in a "Jump to a setting" card directly below it.

   Boxes-in-boxes with every panel at equal visual weight is the
   phpBB/vBulletin signature. Hierarchy here comes from space and
   type instead: one bordered surface (the sidebar edge), hairline
   dividers, and headings that carry the structure.

   All-caps Space Mono is now reserved for numeric metadata only.
   It was the dominant UI voice, and wide-tracked caps everywhere
   is the single loudest dated signal in an interface.
   ============================================================ */

/* ---- Shell: sidebar is a flush rail, not a floating card ---- */
.admin-shell {
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 0;
  padding: 0 0 60px;
}

.admin-nav,
.admin-nav.panel {
  position: sticky;
  align-self: start;
  padding: 0 22px 0 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}

.admin-brand {
  padding: 26px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.admin-brand .eyebrow { display: none; }
.admin-brand h2 {
  margin: 0;
  color: var(--text);
  font: 600 19px/1.25 var(--serif);
  letter-spacing: -.01em;
}
.admin-scope {
  display: block;
  margin-top: 2px;
  color: var(--dim);
  font: 400 13px var(--body);
  letter-spacing: 0;
  text-transform: none;
}
.admin-back {
  display: inline-block;
  margin-top: 14px;
  color: var(--teal2);
  font: 400 13px var(--body);
  letter-spacing: 0;
  text-transform: none;
}
.admin-back:hover { text-decoration: underline; }

/* ---- Filter ---- */
.admin-nav-search { padding: 14px 0 8px; border: 0; }
.admin-nav-search input {
  width: 100%;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, .22);
  color: var(--text);
  font: 400 13.5px var(--body);
  outline: none;
}
.admin-nav-search input:focus { border-color: rgba(95, 208, 207, .55); }
.admin-nav-search input::placeholder { color: var(--dim); }

/* ---- Groups: quiet labels, generous rows ---- */
.admin-nav-list { padding: 4px 0 30px; overflow: visible; }
.admin-nav-group + .admin-nav-group { margin-top: 2px; }
.admin-nav-label {
  display: block;
  padding: 18px 10px 6px;
  color: var(--dim);
  font: 600 11px var(--body);
  letter-spacing: .04em;
  text-transform: none;
}
.admin-nav a:not(.admin-back) {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--muted);
  font: 400 14px var(--body);
  letter-spacing: 0;
  text-transform: none;
}
.admin-nav a:not(.admin-back) > span {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-nav a:not(.admin-back):hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.admin-nav a.active {
  background: rgba(95, 208, 207, .1);
  color: var(--teal2);
  box-shadow: none;
}
.nav-count {
  flex: 0 0 auto;
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--amber);
  color: #1b1309;
  font: 700 10px/1 var(--mono);
}
.admin-nav-empty { margin: 0; padding: 6px 10px 18px; color: var(--dim); font-size: 13.5px; }

/* ---- Main column ---- */
.admin-main { padding: 26px 0 0 30px; min-width: 0; }

/* The old topbar duplicated the sidebar's current section and offered
   "New thread", which nobody wants from a settings panel. */
.admin-topbar { display: none; }

.section-head { align-items: flex-start; margin-bottom: 26px; }
.section-head .eyebrow {
  color: var(--dim);
  font: 400 13px var(--body);
  letter-spacing: 0;
  text-transform: none;
}
.section-head h1 {
  margin: 2px 0 0;
  font: 600 30px/1.15 var(--serif);
  letter-spacing: -.015em;
}
.section-head p { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; max-width: 60ch; }

/* ---- Dashboard ---- */
.dash-lede { margin-bottom: 34px; }
.dash-lede h1 {
  margin: 0 0 8px;
  font: 600 clamp(28px, 3.4vw, 38px)/1.08 var(--serif);
  letter-spacing: -.02em;
}
.dash-lede.has-work h1 { color: var(--amber2); }
.dash-lede p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 58ch; }
.dash-lede-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }

/* Attention: a list, not a grid of cards. */
.dash-attention { display: grid; gap: 0; margin-bottom: 34px; }
.dash-attention a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}
.dash-attention a:first-child { border-top: 1px solid var(--line); }
.dash-attention a:hover { background: rgba(232, 180, 90, .05); }
.dash-attention b { color: var(--amber2); font: 600 24px var(--serif); }
.dash-attention span { color: var(--text); font-size: 15px; }
.dash-attention em { color: var(--dim); font-style: normal; font-size: 14px; }

/* ---- Sections: hairline headings, no boxes ---- */
.dash-block { margin-bottom: 38px; }
.dash-block > h2 {
  margin: 0 0 2px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font: 600 17px var(--serif);
  letter-spacing: -.005em;
}
.dash-note { margin: 14px 0 0; color: var(--dim); font-size: 14px; }

.dash-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(150, 165, 200, .09);
}
.dash-row:last-child { border-bottom: 0; }
.dash-row:hover { background: rgba(255, 255, 255, .022); }
.dash-row-main { min-width: 0; }
.dash-row-main b {
  display: block;
  color: var(--text);
  font: 400 15px var(--body);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-row-main small { display: block; margin-top: 3px; color: var(--dim); font-size: 12.5px; }
.dash-row-side { flex: 0 0 auto; color: var(--dim); font-size: 12.5px; white-space: nowrap; }

/* Numbers are the one place mono still earns its keep. */
.dash-figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.dash-figures div { padding: 16px 4px 16px 16px; background: var(--bg); }
.dash-figures b { display: block; color: var(--text); font: 400 27px var(--mono); letter-spacing: -.02em; }
.dash-figures span { display: block; margin-top: 5px; color: var(--dim); font-size: 12.5px; }

/* ---- Setup checklist: the signature element ----
   A forum with no discussions and one member does not need a
   dashboard reporting zeros. It needs to know what to do next. */
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(150, 165, 200, .09);
}
.checklist li:last-child { border-bottom: 0; }
.checklist i {
  font-style: normal;
  font-size: 14px;
  color: var(--dim);
  line-height: 1.4;
}
.checklist li.done i { color: var(--teal); }
.checklist b { display: block; color: var(--text); font: 400 15px var(--body); }
.checklist li.done b { color: var(--dim); text-decoration: line-through; text-decoration-thickness: 1px; }
.checklist small { display: block; margin-top: 3px; color: var(--dim); font-size: 13px; }
.checklist a { flex: 0 0 auto; color: var(--teal2); font-size: 13.5px; white-space: nowrap; }
.checklist a:hover { text-decoration: underline; }
.checklist-progress {
  margin: 16px 0 0;
  color: var(--dim);
  font-size: 13.5px;
}

/* ---- Health ---- */
.dash-health { display: grid; gap: 0; }
.dash-health p {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 11px 4px;
  border-bottom: 1px solid rgba(150, 165, 200, .09);
  font-size: 14px;
}
.dash-health p:last-child { border-bottom: 0; }
.dash-health span { color: var(--muted); }
.dash-health b { color: var(--text); font-weight: 500; }
.dash-health b.good { color: var(--teal2); }
.dash-health b.warn { color: var(--amber2); }

/* ---- Two-column split where it genuinely helps ---- */
.dash-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: 38px;
  align-items: start;
}

@media (max-width: 1050px) {
  .dash-split { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-nav, .admin-nav.panel {
    position: static;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .admin-main { padding: 22px 0 0; }
  .dash-figures { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .admin-brand { padding: 16px 0 12px; }
  .admin-brand h2 { font-size: 17px; }
  .admin-nav-search { display: none; }
  .admin-nav-list {
    display: flex; gap: 4px; padding: 8px 0;
    overflow-x: auto; scrollbar-width: none;
  }
  .admin-nav-list::-webkit-scrollbar { display: none; }
  .admin-nav-group {
    display: flex; gap: 4px; flex: 0 0 auto; align-items: center;
    margin: 0 !important; padding-right: 6px;
    border-right: 1px solid var(--line);
  }
  .admin-nav-group:last-child { border-right: 0; }
  .admin-nav-label { padding: 0 6px 0 2px; white-space: nowrap; font-size: 11px; }
  .admin-nav a:not(.admin-back) { flex: 0 0 auto; white-space: nowrap; font-size: 13.5px; }
  .dash-lede h1 { font-size: 25px; }
  .dash-lede-actions .btn { flex: 1 1 0; }
  .checklist li { grid-template-columns: 20px minmax(0, 1fr); }
  .checklist a { grid-column: 2; margin-top: 6px; }
  .dash-attention a { grid-template-columns: auto minmax(0, 1fr); }
  .dash-attention em { display: none; }
}
/* ============================================================
   Staff contact inbox
   ============================================================ */

.inbox-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 11px;
  margin-bottom: 14px;
}
.inbox-tabs { display: flex; gap: 3px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.inbox-tabs::-webkit-scrollbar { display: none; }
.inbox-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  white-space: nowrap;
  font: 700 9px var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.inbox-tabs a:hover { background: rgba(95,208,207,.07); color: var(--teal2); }
.inbox-tabs a.on { background: rgba(95,208,207,.11); color: var(--teal2); }
.inbox-tabs a b {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(150,165,200,.16);
  color: var(--text);
  font: 700 9px/1 var(--mono);
}
.inbox-tabs a.on b { background: var(--teal); color: #06201f; }
.inbox-search { flex: 0 0 240px; }
.inbox-search .field { min-height: 34px; padding: 0 11px; font-size: 13px; }

/* ---- List ---- */
.inbox-list { padding: 0; }
.inbox-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}
.inbox-row:last-child { border-bottom: 0; }
.inbox-row:hover { background: rgba(95,208,207,.05); }
.inbox-row.selected { background: rgba(95,208,207,.09); box-shadow: inset 2px 0 0 var(--teal); }

/* Unread is carried by weight and a dot, not colour alone. */
.inbox-dot {
  width: 8px; height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: transparent;
}
.inbox-row.is-unread .inbox-dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(232,180,90,.14);
}
.inbox-main { min-width: 0; }
.inbox-main b {
  display: block;
  color: var(--muted);
  font: 500 15px var(--serif);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.inbox-row.is-unread .inbox-main b { color: var(--text); font-weight: 700; }
.inbox-main small {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font: 700 8px var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.inbox-side { display: grid; justify-items: end; gap: 6px; text-align: right; }
.inbox-side small { color: var(--dim); font: 700 8px var(--mono); white-space: nowrap; }

.chip {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  color: var(--dim);
  font: 700 7px var(--mono);
  font-style: normal;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.chip.pri-urgent { border-color: rgba(239,125,115,.55); background: rgba(239,125,115,.12); color: #ffaaa2; }
.chip.pri-high   { border-color: rgba(232,180,90,.5);  background: rgba(232,180,90,.1);  color: var(--amber2); }
.chip.pri-low    { opacity: .7; }

.inbox-empty { margin: 0; padding: 30px 18px; color: var(--dim); font-size: 14px; text-align: center; }

/* ---- Detail ---- */
.staff-message {
  padding: 13px 15px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(14,19,34,.6);
}
.staff-message > b { color: var(--amber2); font: 600 14px var(--serif); }
.staff-message > small { margin-left: 8px; color: var(--dim); font: 700 8px var(--mono); }
.staff-message .prose { padding: 8px 0 0; font-size: 15px; }
.staff-message.internal-note {
  border-color: rgba(232,180,90,.34);
  background: rgba(232,180,90,.055);
}
.staff-message.internal-note > b { color: var(--amber); }

.inline-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 12px 0 !important;
  color: var(--muted);
  font: 400 13px var(--body) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.inline-check input { width: 16px; height: 16px; flex: 0 0 16px; margin: 0; }

/* ---- Routing ---- */
.routing-table { padding: 6px 18px 18px; }
.routing-row {
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.routing-row:last-of-type { border-bottom: 0; }
.routing-row legend {
  padding: 0;
  color: var(--teal2);
  font: 700 8px var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.routing-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  padding: 12px 14px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--deep);
}
.routing-groups .inline-check { margin: 0 !important; }
.routing-hint { flex: 1 0 100%; margin: 0; color: var(--dim); font-size: 12px; }

@media (max-width: 780px) {
  .inbox-toolbar { flex-direction: column; align-items: stretch; gap: 9px; }
  .inbox-search { flex: 1 1 auto; }
  .inbox-row { grid-template-columns: 10px minmax(0,1fr); padding: 12px 13px; }
  .inbox-side { grid-column: 2; justify-items: start; flex-direction: row; text-align: left; }
  .inbox-side { display: flex; gap: 9px; align-items: center; margin-top: 6px; }
  .routing-table { padding: 4px 14px 14px; }
}

.contact-blurb {
  margin: 7px 0 0;
  color: var(--dim);
  font: 400 13px var(--body);
}
.contact-blurb:empty { display: none; }

/* ============================================================
   Glass treatment — the admin borrows the front-end's material
   so it doesn't read as a different product.
   ============================================================ */

.admin-shell { gap: 18px; }

.admin-nav.panel {
  background: linear-gradient(180deg, rgba(21,29,48,.7), rgba(12,17,29,.85));
  backdrop-filter: blur(16px);
}

/* ---- Hero: what is waiting, before anything else ---- */
.glass-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 26px 28px;
  margin-bottom: 18px;
  overflow: hidden;
}
.glass-hero:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(95,208,207,.1), transparent 46%, rgba(170,156,255,.08));
  pointer-events: none;
}
.glass-hero.has-work:before {
  background: linear-gradient(115deg, rgba(232,180,90,.13), transparent 48%, rgba(170,156,255,.07));
}
.glass-hero-copy, .glass-hero-actions { position: relative; }
.glass-hero-copy h1 { margin: 5px 0 6px; font: 700 30px/1.1 var(--serif); }
.glass-hero.has-work .glass-hero-copy h1 { color: var(--amber2); }
.glass-hero-copy p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 52ch; }
.glass-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.glass-hero-actions kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0,0,0,.25);
  font: 700 8px var(--mono);
}

/* ---- Two-column body ---- */
.glass-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}
.glass-col-main, .glass-col-side { display: grid; gap: 14px; min-width: 0; }

/* ---- Attention rows ---- */
.attention-list { padding: 5px 11px; }
.attention-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 3px;
  border-bottom: 1px solid rgba(160,180,215,.09);
}
.attention-row:last-child { border-bottom: 0; }
.attention-row:hover { background: rgba(232,180,90,.05); }
.attention-row b {
  display: grid;
  place-items: center;
  height: 34px;
  border-radius: 9px;
  background: rgba(232,180,90,.13);
  color: var(--amber2);
  font: 700 17px var(--serif);
}
.attention-row span { color: var(--text); font-size: 14px; }
.attention-row em { color: var(--dim); font-style: normal; }

/* ---- Generic glass rows ---- */
.glass-rows { padding: 5px 12px; }
.glass-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 3px;
  border-bottom: 1px solid rgba(160,180,215,.09);
}
.glass-row:last-child { border-bottom: 0; }
.glass-row:hover { background: rgba(95,208,207,.045); }
.glass-row-main { min-width: 0; }
.glass-row-main b {
  display: block;
  color: var(--text);
  font: 500 14px var(--serif);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.glass-row-main small {
  display: block;
  margin-top: 3px;
  color: var(--dim);
  font: 700 7.5px var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.glass-tag {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(95,208,207,.35);
  border-radius: 999px;
  color: var(--teal2);
  font: 700 7px var(--mono);
  font-style: normal;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---- Setting grid: every section visible at once ----
   The palette handles "I know what it's called". This handles
   "I'll know it when I see it". */
.setting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 4px 18px;
  padding: 15px 18px 18px;
}
.setting-group { min-width: 0; }
.setting-group-name {
  display: block;
  padding: 8px 0 6px;
  color: var(--teal2);
  font: 700 7.5px var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.setting-group a {
  display: block;
  padding: 6px 8px;
  margin-left: -8px;
  border-radius: 7px;
  color: var(--muted);
  font: 400 13.5px var(--body);
}
.setting-group a:hover { background: rgba(95,208,207,.07); color: var(--teal2); }

/* ---- Topbar ---- */
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(21,29,48,.72), rgba(12,17,29,.86));
  backdrop-filter: blur(14px);
}
.admin-topbar b { display: block; color: var(--text); font: 600 17px var(--serif); }
.admin-topbar span {
  display: block;
  margin-top: 3px;
  color: var(--dim);
  font: 700 7.5px var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.admin-topbar > div:last-child { display: flex; gap: 8px; flex: 0 0 auto; }

.status-list b.warn { color: var(--amber2); }

@media (max-width: 1050px) {
  .glass-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 780px) {
  .glass-hero { padding: 18px; gap: 16px; }
  .glass-hero-copy h1 { font-size: 24px; }
  .glass-hero-actions { width: 100%; }
  .glass-hero-actions .btn { flex: 1 1 0; }
  .glass-hero-actions kbd { display: none; }
  .setting-grid { grid-template-columns: 1fr 1fr; padding: 12px 14px 15px; }
  .admin-topbar { flex-direction: column; align-items: stretch; padding: 12px 14px; }
  .admin-topbar > div:last-child .btn { flex: 1 1 0; }
  .attention-row { grid-template-columns: 40px minmax(0,1fr) auto; }
}
