/* The admin console. Light is neutral greys and white (monochrome, as the social app's mono glass); dark matches the social app; the system font stack is used. */
:root {
  --bg: #F5F5F6; --surface: #FFFFFF; --surface-2: #ECECEE; --ink: #1A1A1C; --muted: #6B6B70; --line: #E1E1E4;
  --danger: #C8321F; --accent: #FFC531; --on-accent: #1A1A1C; --scrim: rgb(0 0 0 / .32);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1C1E; --surface: #262628; --surface-2: #2F2F32; --ink: #F2F1EE; --muted: #A3A19C; --line: #3B3B3F;
    --danger: #FF6B5B; --on-accent: #1C1C1E; --scrim: rgb(0 0 0 / .55);
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2 { margin: 0; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1.45em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
a { color: var(--ink); text-underline-offset: 2px; }

button { font: inherit; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--accent); color: var(--on-accent); font-weight: 650; }
button.secondary { background: var(--surface-2); color: var(--ink); border-color: var(--line); }

.signin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.card { width: min(100%, 360px); display: grid; gap: 14px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.card h1 { font-size: 22px; }

.frame { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { display: flex; flex-direction: column; gap: 16px; padding: 20px 14px; border-right: 1px solid var(--line); background: var(--surface); }
.brand { margin: 0 10px; font-weight: 700; }
.nav { display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--surface-2); font-weight: 650; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.who { display: grid; gap: 4px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.who .handle { font-weight: 650; }
.who .role { color: var(--muted); }
.who button { margin-top: 8px; }
.main { min-width: 0; padding: 28px clamp(16px, 4vw, 40px); }
.title { margin-bottom: 18px; font-size: 22px; }

.roles { width: 100%; border-collapse: collapse; }
.roles th, .roles td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.roles th { color: var(--muted); font-size: 13px; font-weight: 600; }

dialog.ceremony { width: min(90vw, 340px); display: grid; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); }
dialog.ceremony::backdrop { background: var(--scrim); }
dialog.ceremony h2 { font-size: 18px; }

@media (max-width: 720px) {
  /* One top bar: brand and account on the first row, the section icons on the second; the page takes the rest. */
  .frame { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .side { position: sticky; top: 0; z-index: 1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 12px 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { flex: 1 1 auto; margin: 0 6px; }
  .nav { order: 3; display: flex; flex: 1 0 100%; overflow-x: auto; gap: 2px; }
  .nav-item span { display: none; }
  .nav-item { padding: 0 12px; }
  .who { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; border: 0; }
  .who .role, .who .muted { display: none; }
  .who button { margin: 0; }
  .main { padding: 20px 16px; }
}
