/* NGL control room — night-violet broadcast desk, lit by the NGL neon (blue → violet → magenta).
   Motion: one power-on sequence on the overview, page/route transitions, and feedback on actions. */
:root {
  --night: #110C22;
  --ink: #17112C;
  --panel: #1F1838;
  --raise: #2A2149;
  --line: #352A5C;
  --line-soft: rgba(255, 255, 255, .06);
  --text: #EEEAFF;
  --muted: #A49CC9;
  --dim: #7C73A6;
  --blue: #4F8BFF;
  --violet: #7A6CFF;
  --magenta: #C04DFF;
  --pink: #FF4F8B;
  --mint: #3DDC97;
  --amber: var(--violet);            /* legacy name used by older views */
  --amber-soft: rgba(122, 108, 255, .16);
  --magenta-soft: rgba(255, 79, 139, .14);
  --neon: linear-gradient(100deg, var(--blue), var(--violet) 48%, var(--magenta));
  --glow: 0 0 0 1px rgba(122, 108, 255, .45), 0 8px 32px -8px rgba(122, 108, 255, .55);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--text); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
a { color: #A99CFF; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -.015em; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
kbd { font: 600 11px var(--body); color: var(--muted); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--ink); }
::selection { background: rgba(122, 108, 255, .45); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.login-bg { position: absolute; inset: -20%; z-index: 0;
  background:
    radial-gradient(40% 35% at 20% 30%, rgba(79, 139, 255, .30), transparent 70%),
    radial-gradient(35% 40% at 80% 25%, rgba(192, 77, 255, .28), transparent 70%),
    radial-gradient(45% 40% at 55% 85%, rgba(122, 108, 255, .25), transparent 70%);
  filter: blur(10px); animation: aurora 18s ease-in-out infinite alternate; }
.login-bg::after { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent); }
@keyframes aurora { to { transform: translate3d(3%, -4%, 0) rotate(6deg) scale(1.08); } }
.login-card { position: relative; z-index: 1; width: min(440px, 100%); display: grid; gap: 18px; justify-items: start;
  background: rgba(23, 17, 44, .72); backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 36px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); animation: rise .6s var(--ease) both; }
.login-avatar { width: 68px; height: 68px; border-radius: 20px; box-shadow: var(--glow); }
.wordmark { font-size: clamp(44px, 9vw, 64px); font-weight: 800; letter-spacing: -.03em;
  background: var(--neon); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sweep 6s ease-in-out infinite alternate; }
@keyframes sweep { to { background-position: 100% 0; } }
.lede { margin: 0; color: var(--muted); max-width: 36ch; }
.btn.discord { display: inline-flex; align-items: center; gap: 12px; justify-content: center; width: 100%; text-decoration: none;
  background: #5865F2; border-color: #5865F2; color: #fff; padding: 14px 18px; font-size: 17px; border-radius: 12px;
  transition: transform .15s var(--ease), box-shadow .2s; }
.btn.discord:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px #5865F2; filter: none; }
.fine { margin: -8px 0 0; font-size: 13px; color: var(--dim); }
.pw-form { display: grid; gap: 10px; width: 100%; }
.login-error { margin: 0; color: var(--pink); }
.login-error:empty { display: none; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 272px 1fr; min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--ink), var(--night)); border-right: 1px solid var(--line); padding: 18px 14px 28px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 16px; }
.brand img { width: 42px; height: 42px; border-radius: 13px; }
.brand strong { font-family: var(--display); font-size: 19px; display: block; line-height: 1.1; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mint); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); animation: beat 2.4s infinite; }
@keyframes beat { 70% { box-shadow: 0 0 0 6px rgba(61, 220, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); } }

.guild-switch { position: relative; display: flex; align-items: center; gap: 10px; margin: 0 4px 16px; padding: 9px 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.guild-switch:hover { border-color: var(--dim); }
.guild-switch img, .guild-switch .ph { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.ph { display: inline-grid; place-items: center; background: var(--raise); color: var(--muted); font-family: var(--display); font-weight: 700; }
.gs-name { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-switch select { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.guild-switch:focus-within { outline: 2px solid var(--violet); outline-offset: 2px; }

.nav { display: grid; gap: 14px; }
.nav-group { display: grid; gap: 1px; }
.nav-label { font-size: 12.5px; color: var(--dim); padding: 4px 12px 4px; }
.nav a { position: relative; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 11px;
  padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: linear-gradient(90deg, rgba(122, 108, 255, .22), rgba(122, 108, 255, .04)); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--neon); }
.nav a svg { color: var(--dim); transition: color .15s; }
.nav a:hover svg, .nav a[aria-current="page"] svg { color: #B6ACFF; }
.tally-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background .3s, box-shadow .3s; }
.tally-dot.on { background: var(--violet); box-shadow: 0 0 8px var(--violet); }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; gap: 14px; align-items: center; padding: 12px 32px;
  background: rgba(17, 12, 34, .78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-soft); }
.crumb { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted); }
.crumb svg { color: #B6ACFF; }
.search-btn { margin-left: auto; display: flex; align-items: center; gap: 10px; width: min(320px, 40vw); padding: 8px 10px 8px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--dim); cursor: pointer; text-align: left; }
.search-btn span { flex: 1; }
.search-btn:hover { border-color: var(--dim); color: var(--muted); }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.user-chip img, .user-chip .ph { width: 28px; height: 28px; border-radius: 50%; }
.user-chip > span { font-size: 14px; font-weight: 700; padding-right: 2px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--raise); color: var(--text); }
.menu-btn { display: none; }
.page { padding: 32px; max-width: 1080px; padding-bottom: 140px; }
.page.enter > * { animation: rise .42s var(--ease) both; }
.page.enter > *:nth-child(2) { animation-delay: 40ms; }
.page.enter > *:nth-child(3) { animation-delay: 80ms; }
.page.enter > *:nth-child(4) { animation-delay: 120ms; }
.page.enter > *:nth-child(n+5) { animation-delay: 160ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- overview ---------- */
.hero { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; }
.hero > img, .hero > .ph { width: 84px; height: 84px; border-radius: 24px; flex: none; font-size: 34px; box-shadow: var(--glow); }
.hero-text { min-width: 0; }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; }
.hero p { margin: 4px 0 0; color: var(--muted); }
.on-air { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: #fff; padding: 3px 10px 3px 8px;
  border-radius: 999px; background: var(--neon); margin-bottom: 8px; }
.on-air i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.readout { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 8px; color: var(--muted); }
.readout b { color: var(--text); font-family: var(--display); font-size: 20px; margin-right: 5px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 34px; }
.stat { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line);
  color: inherit; text-decoration: none; transition: border-color .2s, transform .2s var(--ease); }
a.stat:hover { border-color: rgba(122, 108, 255, .6); transform: translateY(-2px); }
.stat b { font-family: var(--display); font-size: 34px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }
.desk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.desk-head h2 { font-size: 24px; }
.desk-head p { margin: 0; color: var(--dim); font-size: 14px; }

.desk { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  background: linear-gradient(180deg, var(--panel), var(--ink)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.strip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 8px 16px;
  border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); text-align: center; min-height: 240px; }
.strip .ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--raise); color: var(--muted); transition: color .3s, background .3s; }
.strip.on .ico { color: #fff; background: rgba(122, 108, 255, .28); }
.strip .nm { font-family: var(--display); font-weight: 700; font-size: 14.5px; line-height: 1.15; min-height: 34px; }
.groove { flex: 1; width: 4px; border-radius: 2px; background: var(--night); position: relative; min-height: 38px; }
.groove::after { content: ""; position: absolute; left: -9px; width: 22px; height: 10px; border-radius: 3px; background: var(--line); bottom: 6px;
  transition: bottom .45s var(--ease), background .3s; }
.strip.on .groove::after { bottom: calc(100% - 16px); background: var(--muted); }
.tally { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--night); cursor: pointer;
  transition: background .25s, box-shadow .25s, border-color .25s, transform .12s; }
.tally:hover { border-color: var(--dim); }
.tally:active { transform: scale(.92); }
.strip.on .tally { background: var(--neon); border-color: #9a8bff; box-shadow: 0 0 24px rgba(140, 100, 255, .8), inset 0 -4px 0 rgba(0, 0, 0, .18); }
.tally[disabled] { cursor: default; }
.strip.flash .tally { animation: ping .5s var(--ease); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(160, 120, 255, .9); } 100% { box-shadow: 0 0 0 16px rgba(160, 120, 255, 0); } }
.strip .open { font-size: 13px; color: var(--dim); text-decoration: none; padding: 2px 8px; border-radius: 6px; }
.strip .open:hover { color: var(--text); background: var(--raise); }
.desk.power-on .strip .tally { animation: power .5s var(--ease) both; animation-delay: calc(var(--i) * 45ms + 200ms); }
.desk.power-on .strip .groove::after { transition-delay: calc(var(--i) * 45ms + 200ms); }
@keyframes power { 0% { filter: brightness(.2); transform: scale(.85); } 60% { filter: brightness(1.6); } 100% { filter: none; transform: none; } }

/* ---------- module pages ---------- */
.head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 26px; }
.head-title { display: flex; gap: 16px; align-items: flex-start; }
.head-ico { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 15px; color: #fff; background: var(--neon); box-shadow: var(--glow); }
.head h1 { font-size: clamp(30px, 4vw, 40px); font-weight: 800; }
.head p { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.section { border-top: 1px solid var(--line-soft); padding: 24px 0; }
.section > h2 { font-size: 21px; margin-bottom: 14px; }
.fields { display: grid; gap: 18px; max-width: 700px; }
.field label.lbl { display: block; font-weight: 700; margin-bottom: 6px; }
.field .help { font-size: 14px; color: var(--dim); margin-top: 5px; }
.field.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; }
.field.row label.lbl { margin: 0; font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; color: var(--text);
  transition: border-color .15s, box-shadow .15s; }
textarea.input { min-height: 96px; resize: vertical; }
.input:hover { border-color: var(--dim); }
.input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(122, 108, 255, .25); outline: none; }
input[type=color].input { height: 44px; padding: 4px; width: 90px; }

.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 13px; background: var(--line); transition: background .25s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted);
  transition: transform .3s cubic-bezier(.3, 1.5, .5, 1), background .25s; }
.switch input:checked + span { background: var(--neon); }
.switch input:checked + span::after { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.master { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); padding: 10px 14px; border-radius: 999px; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--raise); border: 1px solid var(--line); border-radius: 999px; padding: 3px 6px 3px 11px; font-size: 14px; animation: pop .2s var(--ease); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 50%; }
.chip button:hover { color: var(--pink); }
.chip .sw { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }

.btn { border: 1px solid var(--line); background: var(--raise); padding: 9px 16px; border-radius: var(--r-sm); cursor: pointer; font-weight: 700;
  transition: border-color .15s, transform .12s, filter .15s; }
.btn:hover { border-color: var(--dim); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--neon); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--pink); }
.btn.small { padding: 5px 10px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: wait; }

.savebar {
  position: fixed; left: calc(50% + 136px); bottom: 22px; transform: translate(-50%, 160%); transition: transform .35s var(--ease);
  display: flex; gap: 14px; align-items: center; background: rgba(31, 24, 56, .92); backdrop-filter: blur(12px);
  border: 1px solid rgba(122, 108, 255, .6); border-radius: var(--r-md);
  padding: 10px 12px 10px 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5), var(--glow); z-index: 20; width: min(560px, calc(100% - 24px)); }
.savebar:not(.show) { visibility: hidden; transition: transform .35s var(--ease), visibility 0s .35s; }
.savebar.show { transform: translate(-50%, 0); }
.savebar span { flex: 1; }

.list { display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; transition: border-color .15s, transform .15s var(--ease); }
a.item:hover { border-color: rgba(122, 108, 255, .6); transform: translateX(3px); }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 700; }
.item .s { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item img { width: 34px; height: 34px; border-radius: 50%; }
.empty { color: var(--muted); padding: 18px; border: 1px dashed var(--line); border-radius: var(--r-md); }
.form { display: grid; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; margin-top: 12px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.note { background: var(--amber-soft); border-left: 3px solid var(--violet); padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 18px; }
.note.bad { background: var(--magenta-soft); border-color: var(--pink); }
code { background: var(--ink); padding: 1px 6px; border-radius: 4px; font-size: .92em; }

.skeleton { min-height: 58px; border-color: var(--line-soft); background: linear-gradient(90deg, var(--panel) 0%, var(--raise) 50%, var(--panel) 100%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skeleton.tall { min-height: 220px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.rank { font-family: var(--display); font-weight: 800; width: 38px; text-align: right; color: var(--muted); }
.rank.top { background: var(--neon); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bar { height: 6px; background: var(--line); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--neon); border-radius: 3px; animation: fill .9s var(--ease) both; transform-origin: left; }
@keyframes fill { from { transform: scaleX(0); } }
.tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--raise); color: var(--muted); }
.tag.live { background: var(--pink); color: white; }
.tag.on { background: var(--amber-soft); color: #B6ACFF; }

/* announcement preview mimics a Discord message */
.compose { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.preview { background: #313338; border-radius: var(--r-md); padding: 16px; font-family: "gg sans", "Segoe UI", system-ui, sans-serif; color: #dbdee1; }
.preview .who { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.preview .who img { width: 36px; height: 36px; border-radius: 50%; }
.preview .who b { color: #f2f3f5; }
.preview .box { border-left: 4px solid var(--violet); background: #2b2d31; border-radius: 8px; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; }
.preview .box h3 { font-family: inherit; font-size: 17px; color: #f2f3f5; margin-bottom: 6px; }
.preview .box img { max-width: 100%; border-radius: 6px; margin-top: 10px; }
.preview .box .ft { font-size: 12px; color: #949ba4; margin-top: 8px; }
.preview .lnk { display: inline-block; margin-top: 10px; background: #4e5058; color: #fff; padding: 6px 14px; border-radius: 4px; font-size: 14px; }

/* analytics + member pages */
.seg { display: inline-flex; gap: 4px; margin-bottom: 16px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; }
.seg .btn { border-color: transparent; background: transparent; }
.seg .btn.primary { background: var(--neon); }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.chart-head h2 { font-size: 16px; color: var(--muted); font-family: var(--body); font-weight: 700; letter-spacing: 0; }
.chart-head b { font-family: var(--display); font-size: 26px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .axis { fill: var(--dim); font-size: 11px; font-family: var(--body); }
.chart rect { transform-box: fill-box; transform-origin: 50% 100%; animation: grow .6s var(--ease) both; }
.chart rect:hover { filter: brightness(1.3); }
@keyframes grow { from { transform: scaleY(0); } }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 10px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; display: grid; }
.tile b { font-family: var(--display); font-size: 22px; }
.tile span { color: var(--muted); font-size: 13px; }

/* command palette */
.palette { position: fixed; inset: 0; z-index: 50; background: rgba(8, 5, 18, .6); backdrop-filter: blur(6px); display: grid; justify-items: center; align-items: start; padding-top: 14vh; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.pal-box { width: min(620px, calc(100% - 24px)); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .8), var(--glow); overflow: hidden; animation: rise .2s var(--ease); }
.pal-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--dim); }
.pal-input { flex: 1; background: none; border: 0; outline: none; font-size: 17px; color: var(--text); }
.pal-list { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.pal-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--muted); }
.pal-list li span { flex: 1; color: var(--text); }
.pal-list li small { color: var(--dim); }
.pal-list li img { width: 22px; height: 22px; border-radius: 50%; }
.pal-list li.active { background: rgba(122, 108, 255, .2); color: #B6ACFF; }
.pal-empty { color: var(--dim) !important; cursor: default !important; }

#toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 60; }
.toast { background: rgba(31, 24, 56, .95); backdrop-filter: blur(10px); border: 1px solid var(--line); border-left: 4px solid var(--mint);
  padding: 11px 14px; border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); max-width: 380px; animation: slidein .3s var(--ease); }
.toast.bad { border-left-color: var(--pink); }
@keyframes slidein { from { opacity: 0; transform: translateX(24px); } }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 22% 0 0; z-index: 40; transform: translateX(-102%); transition: transform .3s var(--ease); height: 100%; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55); }
  .menu-btn { display: inline-grid; }
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .search-btn { width: auto; } .search-btn span, .search-btn kbd, .user-chip > span { display: none; }
  .compose, .form .two, .charts, .two-col { grid-template-columns: 1fr; }
  .head { flex-direction: column; }
  .savebar { left: 50%; }
  .hero > img, .hero > .ph { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
