/* Vexora dashboard — dark-first glass design with a light theme. */
:root {
  --bg: #080914;
  --bg-2: #0d0f1f;
  --panel: #12152a;
  --panel-2: #181c36;
  --glass: rgba(255, 255, 255, .045);
  --glass-2: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #eceefb;
  --muted: #8f95b8;
  --accent: #7c5cff;
  --accent-2: #38bdf8;
  --accent-soft: rgba(124, 92, 255, .16);
  --grad: linear-gradient(135deg, #7c5cff 0%, #38bdf8 100%);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .13);
  --bad: #fb7185;
  --bad-soft: rgba(251, 113, 133, .14);
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --glow: 0 0 0 1px rgba(124, 92, 255, .5), 0 8px 30px rgba(124, 92, 255, .35);
  --display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  --radius: 16px;
  --side: 288px;
  /* names the older markup still uses */
  --fog: var(--bg);
  --teal: var(--accent);
  --teal-dark: #a591ff;
  --teal-soft: var(--accent-soft);
  --amber: var(--warn);
  --amber-soft: var(--warn-soft);
  --rust: var(--bad);
  --rust-soft: var(--bad-soft);
  --ink: #05060d;
  --ink-2: var(--panel);
  --ink-text: #c8cbe6;
}
:root[data-theme="light"] {
  --bg: #f3f4fb;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f7f8fd;
  --glass: rgba(255, 255, 255, .8);
  --glass-2: rgba(20, 24, 70, .05);
  --line: rgba(20, 24, 70, .11);
  --line-2: rgba(20, 24, 70, .2);
  --text: #14173a;
  --muted: #5d6385;
  --accent: #6b46ff;
  --accent-soft: rgba(107, 70, 255, .1);
  --ok: #059669;
  --ok-soft: rgba(5, 150, 105, .1);
  --warn: #b45309;
  --warn-soft: rgba(245, 158, 11, .14);
  --bad: #e11d48;
  --bad-soft: rgba(225, 29, 72, .09);
  --shadow: 0 10px 30px rgba(30, 35, 90, .12);
  --glow: 0 0 0 1px rgba(107, 70, 255, .45), 0 8px 24px rgba(107, 70, 255, .25);
  --teal-dark: #5b35f0;
  --ink: #14173a;
  --ink-text: #3d4263;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
:root[data-theme="light"] { color-scheme: light; }
body {
  margin: 0; color: var(--text); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 600px at 8% -10%, rgba(124, 92, 255, .22), transparent 60%),
    radial-gradient(800px 600px at 100% 0%, rgba(56, 189, 248, .14), transparent 55%),
    radial-gradient(700px 500px at 60% 110%, rgba(124, 92, 255, .12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -.02em; line-height: 1.15; }
a { color: var(--teal-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(124, 92, 255, .4); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 8px; }
.boot { padding: 48px 20px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--glass); border-radius: 12px; padding: 9px 16px; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--text); min-height: 40px; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: var(--glass-2); border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 22px rgba(124, 92, 255, .4); }
.btn.primary:hover { filter: brightness(1.1); box-shadow: 0 8px 28px rgba(124, 92, 255, .55); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.small { padding: 4px 12px; min-height: 32px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; }
.btn.big { padding: 14px 26px; font-size: 16px; border-radius: 14px; }

/* ---- login ---- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); position: relative; overflow: hidden; }
.login::before, .login::after { content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; pointer-events: none; }
.login::before { width: 520px; height: 520px; background: #7c5cff; top: -140px; left: -120px; animation: drift 14s ease-in-out infinite alternate; }
.login::after { width: 460px; height: 460px; background: #0ea5e9; bottom: -160px; right: -100px; animation: drift 17s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.12); } }
.login-copy { padding: clamp(28px, 7vw, 100px); display: flex; flex-direction: column; justify-content: center; gap: 22px; position: relative; z-index: 1; }
.logo { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 800; font-size: 20px; text-decoration: none; color: var(--text); }
.logo i, .logo img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 6px 20px rgba(30, 110, 255, .5); }
.login-copy h1 { font-size: clamp(36px, 5.4vw, 68px); max-width: 13ch; letter-spacing: -.035em; }
.login-copy h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-copy p { color: var(--muted); max-width: 46ch; margin: 0; font-size: 17px; }
.login-copy .btn.primary { align-self: flex-start; }
.login-copy .transcript-entry { align-self: flex-start; }
.owner-login-wrap { display: flex; align-items: center; gap: 8px; margin-top: -12px; font-size: 12px; color: var(--muted); }
.owner-login-link { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text); background: var(--glass); text-decoration: none; font-size: 12px; font-weight: 600; transition: border-color .15s, background .15s; }
.owner-login-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.login-error { background: var(--bad-soft); color: var(--bad); padding: 10px 14px; border-radius: 12px; max-width: 46ch; border: 1px solid var(--bad); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { border: 1px solid var(--line-2); background: var(--glass); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; font-weight: 500; backdrop-filter: blur(8px); }
.login-demo { padding: clamp(24px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; gap: 14px; position: relative; z-index: 1; }
.demo-row { background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(14px); border-radius: var(--radius); padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; box-shadow: var(--shadow); animation: floaty 6s ease-in-out infinite; }
.demo-row:nth-child(2) { animation-delay: -2s; margin-left: 28px; }
.demo-row:nth-child(3) { animation-delay: -4s; }
@keyframes floaty { 50% { transform: translateY(-7px); } }
.demo-row b { display: block; }
.demo-row span { color: var(--muted); font-size: 13px; }
.demo-bar { background: var(--grad); color: #fff; border-radius: var(--radius); padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; box-shadow: 0 10px 34px rgba(124, 92, 255, .5); margin-left: 14px; }

/* ---- shell ---- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--glass); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; z-index: 30; }
:root[data-theme="light"] .side { background: rgba(255, 255, 255, .85); }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 800; font-size: 19px; padding: 4px 8px; text-decoration: none; color: var(--text); }
.brand i, .brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 6px 18px rgba(30, 110, 255, .45); }
.guild-switch { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--glass-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; transition: border-color .15s; }
.guild-switch:hover { border-color: var(--accent); }
.guild-switch > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-switch small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 12px; background: var(--grad); object-fit: cover; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
.search { position: relative; }
.search input { width: 100%; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; padding: 9px 40px 9px 36px; min-height: 40px; transition: border-color .15s, box-shadow .15s; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search::before { content: "⌕"; position: absolute; left: 12px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 18px; pointer-events: none; }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 1px solid var(--line-2); border-radius: 6px; padding: 0 6px; font: 12px var(--body); color: var(--muted); pointer-events: none; }
nav { display: flex; flex-direction: column; gap: 14px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group h3 { font-family: var(--body); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 4px 12px; }
.nav-link { display: flex; align-items: center; gap: 11px; color: var(--ink-text); text-decoration: none; padding: 8px 12px; border-radius: 12px; font-weight: 500; transition: background .15s, color .15s; position: relative; }
:root[data-theme="light"] .nav-link { color: var(--text); }
.nav-link .ico { width: 26px; height: 26px; border-radius: 8px; background: var(--glass-2); display: grid; place-items: center; font-size: 14px; flex: none; }
.nav-link .name { flex: 1; min-width: 0; }
.nav-link:hover { background: var(--glass-2); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .45); }
.nav-link[aria-current="page"] .ico { background: var(--grad); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; font-size: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); }
.side-foot > span { min-width: 0; flex: 1; }
.side-foot a { color: var(--muted); }
.side-foot .who { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { border: 1px solid var(--line-2); background: var(--glass); border-radius: 10px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; flex: none; transition: border-color .15s; }
.icon-btn:hover { border-color: var(--accent); }
.menu-btn { display: none; }
.scrim { display: none; }

.main { padding: 32px clamp(16px, 4vw, 56px) 150px; min-width: 0; animation: rise .35s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.wrap { max-width: 980px; }
.page-head { max-width: 980px; margin-bottom: 24px; display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.page-head .tile { width: 56px; height: 56px; border-radius: 18px; background: var(--grad); display: grid; place-items: center; font-size: 27px; box-shadow: 0 10px 28px rgba(124, 92, 255, .45); flex: none; }
.page-head .titles { min-width: 0; flex: 1 1 320px; }
.page-head h1 { font-size: clamp(28px, 3.6vw, 40px); }
.page-head p { color: var(--muted); margin: 8px 0 0; max-width: 64ch; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.sheet { background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 20px; max-width: 980px; box-shadow: var(--shadow); overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 18px 36px; padding: 22px 26px; border-bottom: 1px solid var(--line); position: relative; transition: background .15s; }
.row:hover { background: rgba(255, 255, 255, .02); }
.row:last-child { border-bottom: 0; }
.row.wide { grid-template-columns: minmax(0, 1fr); }
.row.changed { background: var(--accent-soft); }
.row.changed::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; background: var(--grad); border-radius: 0 6px 6px 0; }
.row .label { font-weight: 600; display: block; font-size: 15px; }
.help { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; max-width: 48ch; }
.control { min-width: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.control > * { max-width: 100%; }
.input, select.input, textarea.input { width: 100%; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; min-height: 42px; transition: border-color .15s, box-shadow .15s, background .15s; }
:root[data-theme="light"] .input, :root[data-theme="light"] select.input, :root[data-theme="light"] textarea.input { background: #fff; }
.input:hover { border-color: var(--line-2); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
select.input option, select.input optgroup { background: var(--panel); color: var(--text); }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.input.number { width: 160px; }
.input::placeholder { color: var(--muted); opacity: .75; }
.hint { font-size: 12.5px; color: var(--muted); }

/* toggle */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 50px; height: 28px; background: var(--line-2); border-radius: 14px; position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.switch input:checked + .track { background: var(--grad); box-shadow: 0 0 16px rgba(124, 92, 255, .55); }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.switch .state { font-weight: 600; min-width: 28px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--glass-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 5px 4px 12px; font-size: 13.5px; font-weight: 500; }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.chip button { border: 0; background: transparent; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; color: var(--muted); line-height: 1; }
.chip button:hover { background: var(--bad-soft); color: var(--bad); }
.chip.warn { border-color: var(--warn); background: var(--warn-soft); }
.tag-entry { display: flex; gap: 8px; width: 100%; }

/* list editors */
.items { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.item { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(0, 0, 0, .16); transition: border-color .15s; }
:root[data-theme="light"] .item { background: var(--panel-2); }
.item:hover { border-color: var(--line-2); }
.item-grid { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
.item-grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.item-actions { display: flex; gap: 8px; justify-content: flex-end; }
.empty { color: var(--muted); font-size: 14px; padding: 10px 0; }
.q-type { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 16px; padding: 16px; width: 100%; background: rgba(0, 0, 0, .14); }
.q-type h4 { margin: 0; font-family: var(--body); font-size: 14px; }
.q-line { display: flex; gap: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 12px; padding: 7px 13px; cursor: pointer; font-weight: 500; background: var(--glass); transition: background .15s, border-color .15s; }
.seg label:hover { border-color: var(--accent); }
.seg label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.seg input { accent-color: var(--accent); }

/* previews (Discord-like) */
.preview { width: 100%; border-radius: 14px; background: #313338; color: #dbdee1; padding: 16px 18px; font-family: "Segoe UI", system-ui, sans-serif; font-size: 14.5px; border: 1px solid rgba(255, 255, 255, .06); }
.preview .cap { color: #949ba4; font-size: 12px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; }
.preview .msg-head b { color: #fff; }
.preview .mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.preview .embed { margin-top: 8px; background: #2b2d31; border-left: 4px solid var(--c, #ed4245); border-radius: 4px; padding: 10px 14px; max-width: 460px; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview .embed .banner { margin-top: 10px; border-radius: 4px; background: #1e1f22; color: #949ba4; min-height: 70px; display: grid; place-items: center; font-size: 12px; overflow: hidden; }
.preview .embed .banner img { width: 100%; display: block; }
.preview .foot { color: #949ba4; font-size: 12px; margin-top: 8px; }
.preview .buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.preview .dbtn { background: #4e5058; color: #fff; border-radius: 4px; padding: 5px 14px; font-size: 14px; }
.preview .etitle { font-weight: 700; color: #fff; margin-bottom: 4px; }

/* bot status: Discord-style status dots + preview */
.sdot { position: relative; display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: #23a55a; }
.sdot.idle { background: #f0b232; }
.sdot.dnd { background: #f23f43; }
.sdot.dnd::after { content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 2px; margin-top: -1px; border-radius: 1px; background: #fff; }
.sdot.invisible, .sdot.offline { background: transparent; box-shadow: inset 0 0 0 2px #80848e; }
.seg:has(.sdot) label { padding-left: 11px; }
.seg:has(.sdot) input { margin-right: 0; }
.preview .member { display: flex; align-items: center; gap: 12px; }
.preview .member .av { position: relative; width: 40px; height: 40px; flex: none; }
.preview .member .av .avatar { border-radius: 50%; display: grid; place-items: center; background: #5865f2; color: #fff; font-weight: 600; object-fit: cover; }
.preview .member .av .sdot { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border: 3px solid #313338; box-sizing: border-box; }
.preview .member .av .sdot.offline, .preview .member .av .sdot.invisible { background: #80848e; box-shadow: none; }
.preview .member .av .sdot.dnd::after { left: 1px; right: 1px; height: 2px; }
.preview .member .who { min-width: 0; }
.preview .member .who b { color: #fff; }
.preview .member .tag { background: #5865f2; color: #fff; border-radius: 4px; font-size: 10px; font-weight: 700; padding: 1px 5px; vertical-align: middle; }
.preview .member .act { color: #b5bac1; font-size: 13.5px; overflow-wrap: anywhere; }
.preview .member .act b { color: #dbdee1; font-weight: 600; }

/* overview */
.hero { position: relative; max-width: 980px; border-radius: 24px; padding: 28px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 220px at 0% 0%, rgba(124, 92, 255, .3), transparent 70%), radial-gradient(420px 200px at 100% 100%, rgba(56, 189, 248, .2), transparent 70%); pointer-events: none; }
.hero > * { position: relative; }
.hero .avatar { width: 84px; height: 84px; border-radius: 24px; font-size: 28px; box-shadow: 0 12px 34px rgba(124, 92, 255, .5); }
.hero h1 { font-size: clamp(28px, 4vw, 42px); }
.hero .sub { color: var(--muted); margin: 6px 0 0; }
.hero .head { flex: 1 1 260px; min-width: 0; }
.stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 0; width: 100%; }
.owner-section .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.owner-section .stat { min-width: 0; padding: 13px 14px; }
.owner-section .stat b { font-size: clamp(21px, 2.2vw, 27px); overflow-wrap: anywhere; }
.section-heading-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.metric-actions { justify-content: space-between; margin-top: 12px; }
.metric-actions .hint { margin: 0; }
.stat { flex: 1 1 180px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
:root[data-theme="light"] .stat { background: rgba(255, 255, 255, .7); }
.stat b { font-family: var(--display); font-size: 28px; display: block; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }
.bar { height: 8px; border-radius: 8px; background: var(--line); margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 8px; background: var(--grad); box-shadow: 0 0 14px rgba(124, 92, 255, .6); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.group-title { max-width: 980px; margin: 30px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-family: var(--body); font-weight: 700; display: flex; align-items: center; gap: 12px; }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cards { max-width: 980px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: transform .18s, border-color .18s, box-shadow .18s, background .18s; position: relative; overflow: hidden; }
.card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(260px 120px at 100% 0%, rgba(124, 92, 255, .22), transparent 70%); opacity: 0; transition: opacity .2s; pointer-events: none; }
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--glow); }
.card:hover::after { opacity: 1; }
.card .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card .ico { width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); border: 1px solid rgba(124, 92, 255, .35); display: grid; place-items: center; font-size: 21px; }
.card b { font-family: var(--display); font-size: 17px; }
.card .s { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 11px; border-radius: 999px; white-space: nowrap; background: var(--glass-2); color: var(--muted); border: 1px solid var(--line); }
.badge.on { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.notice { max-width: 980px; background: var(--warn-soft); border: 1px solid var(--warn); color: var(--text); padding: 14px 18px; border-radius: 14px; margin-bottom: 18px; }

/* server picker */
.picker { max-width: 980px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 20px; }
.pick { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: inherit; transition: transform .18s, border-color .18s, box-shadow .18s; }
.pick:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--glow); }
.pick .avatar { width: 52px; height: 52px; border-radius: 16px; font-size: 17px; }
.pick small { color: var(--muted); display: block; }
.pick-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; max-width: 980px; gap: 12px; flex-wrap: wrap; }

/* skeleton */
.skel { max-width: 980px; display: grid; gap: 14px; }
.skel div { height: 86px; border-radius: 18px; background: linear-gradient(90deg, var(--glass) 0%, var(--glass-2) 50%, var(--glass) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border: 1px solid var(--line); }
.skel div:first-child { height: 150px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* save bar */
.savebar { visibility: hidden; position: fixed; left: calc(var(--side) + 16px); right: 16px; bottom: 18px; max-width: 860px; margin: 0 auto; background: var(--panel-2); color: var(--text); padding: 12px 14px 12px 20px; display: flex; gap: 16px; align-items: center; justify-content: space-between; border: 1px solid var(--accent); border-radius: 18px; box-shadow: var(--glow), var(--shadow); transform: translateY(140%); transition: transform .28s cubic-bezier(.2, .9, .3, 1.1), visibility .28s; z-index: 20; }
.savebar.show { transform: none; visibility: visible; }
.savebar .what { min-width: 0; }
.savebar .what b { display: block; font-family: var(--display); }
.savebar .what span { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.savebar .btns { display: flex; gap: 8px; flex: none; }
.savebar .btn.ghost { color: var(--text); }
.sec-actions { max-width: 980px; margin-top: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* toasts */
#toasts { position: fixed; top: 18px; right: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 60; max-width: min(400px, calc(100vw - 36px)); }
.toast { background: var(--panel-2); color: var(--text); padding: 14px 18px 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; gap: 12px; align-items: flex-start; }
.toast::before { content: "✓"; width: 24px; height: 24px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-weight: 800; flex: none; font-size: 13px; }
.toast.error { border-color: var(--bad); }
.toast.error::before { content: "!"; background: var(--bad-soft); color: var(--bad); }
@media (prefers-reduced-motion: no-preference) { .toast { animation: toast-in .25s cubic-bezier(.2, .9, .3, 1.2); } @keyframes toast-in { from { transform: translateX(24px); opacity: 0; } } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* terms & privacy pages */
.legal { max-width: 780px; margin: 0 auto; padding: 48px 22px 90px; }
.legal h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 8px; }
.legal h2 { font-size: 22px; margin: 38px 0 10px; }
.legal p, .legal li { max-width: 70ch; color: var(--text); }
.legal li { margin: 6px 0; }
.legal .meta { color: var(--muted); }
.legal .fill { background: var(--warn-soft); padding: 0 4px; border-radius: 4px; }
.legal .top { display: inline-block; margin-bottom: 26px; }
.legal code { background: var(--glass-2); padding: 1px 6px; border-radius: 6px; }
.foot-links { font-size: 13px; }
.foot-links a { color: inherit; }

@media (max-width: 960px) {
  .login { grid-template-columns: 1fr; }
  .login-demo { display: none; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(310px, 86vw); z-index: 40; transform: translateX(-104%); transition: transform .25s; background: var(--panel); }
  .side.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .6); }
  .scrim.show { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); z-index: 35; }
  .menu-btn { display: inline-flex; margin-bottom: 16px; }
  .row { grid-template-columns: 1fr; padding: 18px; }
  .savebar { left: 12px; right: 12px; }
  .item-grid { grid-template-columns: 72px minmax(0, 1fr); }
  .item-grid.two { grid-template-columns: 1fr; }
  .hero { padding: 22px; }
}

[hidden] { display: none !important; }

.site-foot { margin-top: 24px; }
.site-foot a { color: var(--muted); text-decoration: underline; }

/* Ticket form questions */
.q-list { display: grid; gap: 8px; }
.q-row { display: grid; grid-template-columns: 26px 1.4fr 1fr 140px auto auto; gap: 8px; align-items: center; }
.q-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--text); font-size: 12px; font-weight: 700; }
.q-req { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.q-cat { display: grid; gap: 6px; }
@media (max-width: 760px) { .q-row { grid-template-columns: 26px 1fr; } .q-row > :not(.q-num) { grid-column: 2; } }
select.input optgroup { font-weight: 700; color: var(--text); background: var(--panel); }
select.input option { font-weight: 400; background: var(--panel); color: var(--text); }

/* Locked "under development" pages */
.dev-lock { position: relative; max-width: 980px; }
.dev-lock .sheet { filter: blur(3px) grayscale(.6); opacity: .45; pointer-events: none; user-select: none; }
.dev-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 80px; gap: 10px; text-align: center; z-index: 2; }
.dev-badge { background: var(--warn-soft); border: 1px solid var(--warn); color: var(--warn); font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 12px 26px; border-radius: 999px; box-shadow: var(--shadow); }
.dev-cover p { color: var(--text); margin: 0; }

/* Bot owner controls */
.owner-panel { display: grid; gap: 10px; }
.owner-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.owner-row .input { flex: 1 1 200px; min-width: 160px; }
.owner-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border, rgba(255,255,255,.15)); border-radius: 999px; cursor: pointer; text-transform: capitalize; }

/* Locked-page cover: keep the message in the middle of the screen */
.dev-cover { display: block; padding-top: 0; }
.dev-cover-inner { position: sticky; top: 38vh; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 0 20px; }
.dev-cover-inner p { max-width: 520px; font-size: 16px; }

/* Bot-owner control center */
.owner-main { max-width: 1120px; margin: 0 auto; width: 100%; }
.owner-topline { display:flex; justify-content:space-between; align-items:center; margin-bottom:22px; }
.owner-entry { margin: 0 0 18px; }
.owner-section { margin-top:18px; }
.owner-section h2 { margin:0 0 14px; font-size:19px; }
.owner-health-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; }
.owner-health-grid > div { border:1px solid var(--line); border-radius:13px; padding:13px; display:grid; gap:5px; }
.owner-health-grid b { font-size:17px; }
.owner-health-grid span,.owner-table-row small { color:var(--muted); font-size:12px; }
.owner-table { display:grid; gap:8px; }
.owner-table-row { display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; min-width:0; }
.owner-table-row > span:nth-child(2) { flex:1; min-width:0; display:grid; gap:3px; }
.owner-table-row strong { white-space:nowrap; font-size:13px; }
.owner-audit-row { display:grid; grid-template-columns:minmax(130px,1fr) minmax(130px,1fr) auto; gap:6px 12px; padding:10px 0; border-bottom:1px solid var(--line); }
.owner-audit-row small { color:var(--muted); }
.owner-audit-row code { grid-column:1/-1; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--muted); font-size:11px; }
@media(max-width:650px) { .owner-audit-row { grid-template-columns:1fr; } .owner-audit-row code { grid-column:auto; } .owner-table-row { flex-wrap:wrap; } }
