/* Armr dashboard: same night-sky palette as armrbot.com. Layout: fixed left sidebar (server switcher, pages, you),
   a slim top bar with breadcrumbs, and a centred settings column of rows: words on the left, the control on the right. */
:root {
  --bg: #09080d; --side: #0e0d14; --card: #121119; --card-2: #16151f; --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .12);
  --text: #ecebf3; --muted: #8e8ba3; --dim: #615e74; --lav: #b9a4ff; --peri: #8fa8ff; --ok: #8ee6b0; --bad: #ff9db8; --warn: #ffd59e;
  --display: "Outfit", "Segoe UI", system-ui, sans-serif; --body: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace; --logo: "Cherry Bomb One", var(--display);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--lav); }
button, input, select, textarea { font: inherit; color: inherit; }
code { font: 500 .9em var(--mono); background: rgba(255,255,255,.06); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
.ic { flex: none; }
:focus-visible { outline: 2px solid var(--lav); outline-offset: 2px; }

#app.loading { display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--lav); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(700px 500px at 20% 0, rgba(143,168,255,.12), transparent 60%), var(--bg); }
.login-card { width: min(420px, 100%); text-align: center; padding: 40px 28px; border-radius: 24px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--card-2), var(--card)); display: grid; gap: 10px; justify-items: center; }
.login-card img { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 0 50px rgba(185,164,255,.45); }
.login-card h1 { font: 600 26px var(--display); margin: 10px 0 0; } .login-card p { color: var(--muted); margin: 0 0 14px; }
.fine { color: var(--dim); font-size: 12.5px; }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,.04); cursor: pointer; font-weight: 500; text-decoration: none; color: var(--text); transition: border-color .15s, background .15s; }
.btn:hover { border-color: rgba(185,164,255,.45); }
.btn.main { border-color: transparent; color: #17112f; background: linear-gradient(135deg, #d9ccff, var(--lav) 55%, var(--peri)); }
.btn.discord { border-color: transparent; color: #fff; background: #5865f2; padding: 11px 20px; }
.btn.danger { color: var(--bad); } .btn.danger:hover { border-color: rgba(255,157,184,.5); }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: default; }
.field, select, textarea { width: 100%; background: rgba(0,0,0,.28); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; }
select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { min-height: 120px; resize: vertical; font: 13px/1.5 var(--mono); }
.field:focus, select:focus, textarea:focus { outline: none; border-color: rgba(185,164,255,.55); }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.1); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--lav); } .switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--lav); outline-offset: 2px; }

/* shell */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100%; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 10px; padding: 14px 12px; background: var(--side);
  border-right: 1px solid var(--line); overflow-y: auto; }
.brandrow { display: flex; align-items: center; gap: 8px; padding: 4px 6px 8px; color: var(--text); text-decoration: none; font: 20px var(--logo); }
.brandrow img { width: 26px; height: 26px; border-radius: 50%; }
.switcher { position: relative; }
.switcher > button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); cursor: pointer; text-align: left; }
.switcher > button:hover { border-color: var(--line-2); }
.gicon { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; font: 600 12px var(--display); background: rgba(185,164,255,.12); color: #dcd4ff; object-fit: cover; }
.gname { min-width: 0; } .gname b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gname span { color: var(--muted); font-size: 12px; }
.switcher .chev { margin-left: auto; color: var(--muted); }
.menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; max-height: 60vh; overflow: auto; padding: 6px; border-radius: 12px;
  background: #15141d; border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 8px; color: var(--text); text-decoration: none;
  background: none; border: 0; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: rgba(255,255,255,.05); }
.menu .sec { padding: 8px 8px 4px; color: var(--dim); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.menu .gicon { width: 26px; height: 26px; border-radius: 8px; font-size: 10px; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--muted); }
.search input { border: 0; background: none; padding: 8px 0; width: 100%; } .search input:focus { outline: none; }
.nav { display: grid; gap: 2px; } .nav .sec { margin: 12px 8px 4px; color: var(--dim); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 9px; color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); background: rgba(255,255,255,.03); }
.nav a.on { color: var(--text); background: rgba(185,164,255,.1); box-shadow: inset 0 0 0 1px rgba(185,164,255,.2); }
.nav a .ic { color: #a99bd6; } .nav a.on .ic { color: var(--lav); }
.nav .badge { margin-left: auto; font-size: 11px; color: var(--dim); }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.me img, .me .gicon { width: 32px; height: 32px; border-radius: 50%; }
.me b { display: block; font-weight: 600; } .me span { color: var(--muted); font-size: 12px; }
.me .btn { margin-left: auto; }

.main { min-width: 0; }
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px; padding: 12px 24px; border-bottom: 1px solid var(--line);
  background: rgba(9,8,13,.85); backdrop-filter: blur(10px); color: var(--muted); font-size: 13.5px; }
.bar b { color: var(--text); font-weight: 500; } .bar .sep { color: var(--dim); }
.bar .menu-btn { display: none; } .bar .right { margin-left: auto; display: flex; gap: 6px; }
.content { max-width: 920px; margin: 0 auto; padding: 36px 24px 80px; }
.head h1 { font: 600 30px var(--display); margin: 0; letter-spacing: -.01em; } .head p { color: var(--muted); margin: 4px 0 0; }
.head { padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; color: var(--muted); cursor: pointer; }
.tabs button.on { background: rgba(255,255,255,.08); color: var(--text); }
.group-title { margin: 26px 0 8px; color: var(--dim); font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, var(--card-2), var(--card)); overflow: hidden; }
.row { display: flex; align-items: center; gap: 18px; padding: 16px 18px; } .row + .row { border-top: 1px solid var(--line); }
.row .words { min-width: 0; flex: 1; } .row .words b { display: block; font-weight: 500; } .row .words span { color: var(--muted); font-size: 13px; }
.row .control { flex: 0 0 min(320px, 45%); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.row.stack { display: grid; gap: 10px; } .row.stack .control { justify-content: flex-start; flex-basis: auto; }
.status { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.status .sq { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #cfc4ff; background: rgba(185,164,255,.08);
  border: 1px solid rgba(185,164,255,.2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); display: inline-block; margin-right: 6px; } .dot.on { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); font-size: 13px; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--rc, var(--muted)); }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; border-radius: 50%; line-height: 1; }
.chip button:hover { color: var(--bad); }
.list { display: grid; } .item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; } .item + .item { border-top: 1px solid var(--line); }
.item .words { min-width: 0; flex: 1; } .item b { font-weight: 600; } .item p { margin: 2px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.tag { font: 500 11px var(--mono); padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); margin-left: 6px; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); display: grid; justify-items: center; gap: 8px; }
.empty .sq { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.empty b { color: var(--text); }
.form { display: grid; gap: 12px; padding: 18px; } .form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 13.5px; } .checks label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* overview */
.hello h1 { font: 600 32px var(--display); margin: 0; } .hello p { color: var(--muted); margin: 4px 0 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.stat { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--card-2), var(--card)); }
.stat span { color: var(--muted); font-size: 12.5px; } .stat b { display: block; font: 600 24px var(--display); margin-top: 2px; font-variant-numeric: tabular-nums; }
.modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.module { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--text);
  background: linear-gradient(180deg, var(--card-2), var(--card)); transition: border-color .15s; }
.module:hover { border-color: rgba(185,164,255,.35); } .module .words span { color: var(--muted); font-size: 12.5px; display: block; }
.module .ic { color: var(--lav); } .module .go { margin-left: auto; color: var(--dim); }

/* toasts */
#toasts { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-radius: 12px; background: #17161f; border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0,0,0,.45); font-size: 13.5px;
  border-left: 3px solid var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; animation: pop .2s ease-out; }
.toast.ok { border-left-color: var(--ok); } .toast.fail { border-left-color: var(--bad); } .toast.warn { border-left-color: var(--warn); }
.toast .m { color: #dcd4ff; background: rgba(185,164,255,.14); border-radius: 4px; padding: 0 3px; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }

/* phones */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 40; transform: translateX(-102%); transition: transform .2s; box-shadow: 20px 0 50px rgba(0,0,0,.5); }
  .side.open { transform: none; }
  .bar .menu-btn { display: inline-flex; } .content { padding: 24px 16px 70px; }
  .row { flex-wrap: wrap; } .row .control { flex: 1 1 100%; justify-content: flex-start; }
  .stats { grid-template-columns: 1fr 1fr; } .modules, .form .two { grid-template-columns: 1fr; }
}

/* fill the window so the sign-in card sits in the middle */
#app { min-height: 100vh; } .login { min-height: 100vh; }
