:root {
  --bg: #06030c;
  --panel: rgba(20, 11, 38, .72);
  --panel-solid: #140b26;
  --panel-2: #1c1035;
  --line: rgba(155, 92, 255, .18);
  --line-strong: rgba(155, 92, 255, .38);
  --text: #f0eaff;
  --muted: #9a8fbd;
  --accent: #9b5cff;
  --accent-hi: #c4a1ff;
  --accent-2: #4fd1ff;
  --glow: 0 0 22px rgba(155, 92, 255, .45);
  --ok: #3ddc97;
  --warn: #ffc857;
  --bad: #ff5c7a;
  --orange: #ff9f45;
  --radius: 14px;
  --head: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  color: var(--text);
  font: 14.5px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  /* starfield + faint circuit grid, like the banner */
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #c9b3ff 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 32%, #ffffff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 72%, #b691ff 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 84%, #ffffff 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 8%, #d9c8ff 50%, transparent 51%),
    radial-gradient(900px 520px at 85% -10%, rgba(120, 50, 255, .22), transparent 65%),
    radial-gradient(700px 500px at -10% 110%, rgba(79, 209, 255, .08), transparent 60%),
    linear-gradient(rgba(155, 92, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 92, 255, .045) 1px, transparent 1px);
  background-size: 420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px, auto, auto, 44px 44px, 44px 44px;
  background-attachment: fixed;
}
[hidden] { display: none !important; }
a { color: var(--accent-hi); }
h1, h2, h3 { font-family: var(--head); letter-spacing: .02em; }
h1 { font-size: 28px; line-height: 1.15; margin: 0; }
h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }

/* Icons */
.ic { width: 18px; height: 18px; flex-shrink: 0; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  background: linear-gradient(135deg, #a26bff, #6b2fe6); color: #fff; border: 1px solid rgba(196, 161, 255, .4);
  padding: 9px 16px; border-radius: 10px; font: inherit; font-weight: 600; text-decoration: none;
  box-shadow: 0 4px 18px rgba(124, 58, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .18); transition: transform .1s, filter .15s, border-color .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: wait; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .links a:focus-visible, .tabs button:focus-visible, .seg button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn.ghost { background: rgba(255, 255, 255, .03); box-shadow: none; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--line-strong); background: rgba(155, 92, 255, .1); }
.btn.danger { background: linear-gradient(135deg, #ff6f8a, #c22f55); border-color: rgba(255, 143, 164, .4); box-shadow: 0 4px 18px rgba(255, 92, 122, .3); }
.btn.ghost.danger { background: transparent; color: var(--bad); box-shadow: none; }
.btn.ghost.danger:hover { background: rgba(255, 92, 122, .1); border-color: rgba(255, 92, 122, .4); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.icon-only { padding: 7px; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; }
label.inline { flex-direction: row; align-items: center; gap: 10px; }
input, select, textarea {
  font: inherit; color: var(--text); background: rgba(6, 3, 12, .7); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 11px; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(155, 92, 255, .2); }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
input[type=color] { padding: 3px; height: 41px; width: 64px; cursor: pointer; }
textarea { resize: vertical; }

/* Main screen (public website) */
.site { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); background: rgba(8, 4, 18, .72); backdrop-filter: blur(14px); }
.topbar-in, .hero, .block, .footer-in { width: min(1160px, 100%); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.topbar-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.topbar .brand { padding: 0; font-size: 21px; }
.topbar .brand img { width: 36px; height: 36px; border-radius: 10px; }
.top-links { display: flex; gap: 4px; flex: 1; }
.top-links a { font-weight: 500; color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 9px; transition: color .15s, background .15s; }
.top-links a:hover { color: var(--text); background: rgba(155, 92, 255, .1); }
.top-links a.active { color: #fff; background: rgba(155, 92, 255, .18); box-shadow: inset 0 -2px 0 var(--accent); }
.top-links a:focus-visible, .account-menu summary:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.account { margin-left: auto; }

/* Account menu in the corner */
.account-menu { position: relative; }
.account-menu summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border-radius: 99px; cursor: pointer; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-weight: 600; transition: border-color .15s, background .15s; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover, .account-menu[open] summary { border-color: var(--line-strong); background: rgba(155, 92, 255, .12); }
.account-menu summary img { width: 32px; height: 32px; border-radius: 50%; }
.account-menu summary span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; }
.account-menu[open] .chev { transform: rotate(180deg); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--panel-solid); box-shadow: 0 20px 50px rgba(0, 0, 0, .55), var(--glow); animation: fade .15s ease-out; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head b, .menu-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; border: 0; background: none; font: inherit; font-weight: 500; color: var(--text); text-decoration: none; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: rgba(155, 92, 255, .14); }
.menu .danger-item { color: var(--bad); }
.menu .danger-item:hover { background: rgba(255, 92, 122, .1); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: 40px; padding-top: 88px; padding-bottom: 72px; }
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; animation: rise .6s cubic-bezier(.2, .8, .2, 1); }
.hero-title { font-size: clamp(38px, 6vw, 64px); line-height: 1.04; margin: 0; letter-spacing: .01em; }
.glow-text { background: linear-gradient(90deg, #c4a1ff, #9b5cff 45%, #4fd1ff); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(155, 92, 255, .45)); }
.hero-sub { margin: 0; max-width: 540px; font-size: 17px; color: var(--muted); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; margin-top: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.hero-stats b { display: flex; align-items: center; font: 700 24px var(--head); }
.hero-stats span { font-size: 13px; color: var(--muted); }
.hero-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; animation: rise .8s .1s cubic-bezier(.2, .8, .2, 1) backwards; }
.hero-art::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(155, 92, 255, .45), transparent 65%); filter: blur(20px); }
.orbit { position: absolute; inset: 4%; border-radius: 50%; border: 1px dashed rgba(155, 92, 255, .35); animation: turn 40s linear infinite; }
.orbit::after { content: ""; position: absolute; top: 12%; left: 12%; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 14px var(--accent-2); }
@keyframes turn { to { transform: rotate(360deg); } }
.dmc-badge { position: absolute; right: 14%; bottom: 14%; width: 26%; aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--bg); box-shadow: 0 0 0 2px var(--accent), 0 0 30px rgba(155, 92, 255, .6); background: var(--bg); }
.block-sub { margin: -14px 0 24px; color: var(--muted); max-width: 560px; }
.footer-made { display: flex; align-items: center; gap: 8px; }
.footer-made img { width: 22px; height: 22px; border-radius: 50%; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.logo-ring {
  position: relative; width: 62%; aspect-ratio: 1; padding: 4px; border-radius: 28%;
  background: conic-gradient(from var(--a), #9b5cff, #4fd1ff, #c4a1ff, #6b2fe6, #9b5cff);
  box-shadow: 0 0 60px rgba(155, 92, 255, .55); animation: spin 5s linear infinite;
}
.logo-ring img { width: 100%; height: 100%; display: block; border-radius: 26%; }
@keyframes spin { to { --a: 360deg; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* Sections */
.block { padding-top: 48px; padding-bottom: 48px; }
.block-title { font-size: clamp(26px, 3.5vw, 34px); margin: 8px 0 26px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(8px); transition: border-color .2s, transform .2s, box-shadow .2s; }
.feature:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 0 30px rgba(155, 92, 255, .18); }
.feature b { font: 700 17px var(--head); letter-spacing: .02em; margin-top: 4px; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.action {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px; cursor: pointer; text-align: left; font: inherit; color: var(--text); text-decoration: none;
  border-radius: 18px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(8px); transition: border-color .15s, background .15s, transform .15s;
}
.action:hover { border-color: var(--line-strong); background: rgba(40, 22, 76, .75); transform: translateY(-2px); }
.action:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.action b { display: block; font-family: var(--head); font-size: 17px; letter-spacing: .03em; }
.action-icon { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; color: var(--accent-hi); background: linear-gradient(135deg, rgba(155, 92, 255, .35), rgba(155, 92, 255, .08)); border: 1px solid var(--line-strong); }
.action-icon .ic { width: 22px; height: 22px; }
.badge { font: 600 11px var(--head); letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 99px; color: var(--accent-2); border: 1px solid rgba(79, 209, 255, .4); background: rgba(79, 209, 255, .08); }

/* Report / Support pages */
.svc { padding-top: 56px; animation: rise .5s cubic-bezier(.2, .8, .2, 1); }
.svc-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.svc-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; color: var(--accent-hi); background: linear-gradient(135deg, rgba(155, 92, 255, .4), rgba(155, 92, 255, .08)); border: 1px solid var(--line-strong); box-shadow: var(--glow); }
.svc-icon .ic { width: 30px; height: 30px; }
.svc-title { font-size: clamp(32px, 5vw, 46px); margin: 4px 0 0; }
.svc .hero-sub { margin-bottom: 28px; }
.svc-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.svc-grid .card { margin: 0; }
.svc-side { display: flex; flex-direction: column; gap: 16px; }
.svc-side p { margin: 0; }
.svc-form { padding: 22px; overflow: hidden; }
.svc-form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.svc-form fieldset :is(input, select, textarea) { opacity: .55; cursor: not-allowed; }
.svc-locked { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; color: #bfefff; background: rgba(79, 209, 255, .08); border: 1px solid rgba(79, 209, 255, .35); }
.btn.btn-locked, .btn.btn-locked:disabled { opacity: 1; cursor: not-allowed; filter: none; transform: none; color: var(--muted); background: repeating-linear-gradient(-45deg, rgba(155, 92, 255, .12) 0 10px, rgba(155, 92, 255, .05) 10px 20px); border: 1px dashed var(--line-strong); box-shadow: none; }
.svc-dmc { width: 24px; height: 24px; border-radius: 50%; }
.svc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; color: var(--muted); }
.svc-list li { display: flex; gap: 10px; align-items: flex-start; }
.svc-list .ic { color: var(--ok); margin-top: 3px; }

/* Footer */
.footer { margin-top: auto; border-top: 1px solid var(--line); background: rgba(8, 4, 18, .6); }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; color: var(--muted); font-size: 13px; }
.brand-sm { display: flex; align-items: center; gap: 10px; font: italic 700 16px var(--head); letter-spacing: .14em; color: var(--text); }
.brand-sm img { width: 26px; height: 26px; border-radius: 8px; }
.bot-status { display: flex; align-items: center; gap: 4px; }

/* Shell */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.nav {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 20px 14px;
  background: linear-gradient(180deg, rgba(16, 8, 32, .92), rgba(8, 4, 16, .92)); border-right: 1px solid var(--line); backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; text-decoration: none; color: var(--text); font: italic 700 24px var(--head); letter-spacing: .14em; text-shadow: var(--glow); }
.brand img { width: 42px; height: 42px; border-radius: 12px; box-shadow: var(--glow); }
.links { display: flex; flex-direction: column; gap: 14px; flex: 1; overflow-y: auto; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font: 600 11px var(--head); text-transform: uppercase; letter-spacing: .14em; color: #6f6493; padding: 0 12px 4px; }
.links a { display: flex; align-items: center; gap: 11px; color: var(--muted); text-decoration: none; padding: 9px 12px; border-radius: 10px; border: 1px solid transparent; font-weight: 500; transition: background .15s, color .15s; }
.links a:hover { color: var(--text); background: rgba(155, 92, 255, .08); }
.links a.active { color: #fff; background: linear-gradient(90deg, rgba(155, 92, 255, .28), rgba(155, 92, 255, .06)); border-color: rgba(155, 92, 255, .35); box-shadow: inset 3px 0 0 var(--accent), 0 0 18px rgba(155, 92, 255, .15); }
.links a.active .ic { color: var(--accent-hi); filter: drop-shadow(0 0 6px var(--accent)); }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02); font-weight: 600; }
.me img { width: 34px; height: 34px; border-radius: 50%; }
.me span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { padding: 32px; max-width: 1320px; width: 100%; min-width: 0; }
main > section { animation: fade .25s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* Page header */
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, rgba(155, 92, 255, .35), rgba(155, 92, 255, .08)); border: 1px solid var(--line-strong); box-shadow: var(--glow); color: var(--accent-hi); }
.page-icon .ic { width: 26px; height: 26px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 26px 0 12px; }

/* Cards & layout */
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 10px 30px rgba(0, 0, 0, .25);
}
.card.flush { padding: 0; overflow: hidden; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.card.row { flex-direction: row; align-items: flex-end; }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.sticky-col { position: sticky; top: 24px; }
.label-row { font: 600 12px var(--head); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.grid .card { margin: 0; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); margin-bottom: 16px; }
.log-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.log-grid label > span { color: var(--text); }
.log-grid small { color: var(--muted); font-weight: 400; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.save-bar { position: sticky; bottom: 0; padding: 16px 0; margin-top: 8px; background: linear-gradient(transparent, var(--bg) 40%); }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(79, 209, 255, .08); border: 1px solid rgba(79, 209, 255, .35); color: #bfefff; font-size: 13.5px; }

/* Home */
.welcome {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px; padding: 26px 28px; margin-bottom: 18px;
  border-radius: 20px; border: 1px solid var(--line-strong);
  background: radial-gradient(600px 220px at 0% 0%, rgba(155, 92, 255, .32), transparent 70%),
    radial-gradient(500px 200px at 100% 100%, rgba(79, 209, 255, .12), transparent 70%), var(--panel);
  box-shadow: 0 0 50px rgba(155, 92, 255, .15);
}
.welcome h1 { font-size: 32px; margin: 2px 0 8px; }
.welcome-av { width: 76px; height: 76px; border-radius: 50%; border: 3px solid rgba(155, 92, 255, .6); box-shadow: var(--glow); flex-shrink: 0; }
.welcome-logo { position: absolute; right: -30px; top: 50%; width: 220px; transform: translateY(-50%) rotate(-8deg); opacity: .18; border-radius: 40px; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.guild-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; background: rgba(6, 3, 12, .55); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.guild-chip img { width: 24px; height: 24px; border-radius: 50%; }
.guild-chip:not(:has(img:not([hidden]))) { padding-left: 12px; }
.eyebrow { font: 600 12px var(--head); text-transform: uppercase; letter-spacing: .16em; color: var(--accent-hi); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.stat .ic { width: 22px; height: 22px; color: var(--accent-hi); }
.stat-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: rgba(155, 92, 255, .14); flex-shrink: 0; }
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stat b { font: 700 19px var(--head); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.tile .ic { width: 28px; height: 28px; color: var(--accent-hi); margin-bottom: 6px; filter: drop-shadow(0 0 6px rgba(155, 92, 255, .6)); }
.tile b { font: 700 16px var(--head); }
.tile:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--glow); }

/* Tabs & segmented filter */
.tabs, .seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(6, 3, 12, .7); border: 1px solid var(--line); flex-wrap: wrap; }
.tabs button, .seg button { display: inline-flex; align-items: center; gap: 7px; font: 600 13.5px Inter, system-ui, sans-serif; color: var(--muted); background: none; border: 0; padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.tabs button:hover, .seg button:hover { color: var(--text); }
.tabs button.active, .seg button.active { color: #fff; background: linear-gradient(135deg, rgba(155, 92, 255, .5), rgba(107, 47, 230, .5)); box-shadow: 0 0 14px rgba(155, 92, 255, .3); }
.count { font-size: 11.5px; padding: 1px 7px; border-radius: 99px; background: rgba(255, 255, 255, .1); }

/* Sent announcements */
.ann-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.ann-card { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.ann-card:hover { border-color: var(--line-strong); box-shadow: var(--glow); }
.ann-card .dc { margin: 0; border-radius: 0; max-height: 360px; overflow: hidden; flex: 1; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.ann-card footer { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.ann-card footer .meta { flex: 1; min-width: 0; }
.ann-card footer b { display: block; }

/* Infractions */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { flex: 1; min-width: 220px; flex-direction: row; align-items: center; gap: 0; position: relative; }
.search .ic { position: absolute; left: 11px; color: var(--muted); }
.search input { padding-left: 36px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 760px; }
.table th { text-align: left; font: 600 11.5px var(--head); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: rgba(155, 92, 255, .05); }
.table td { padding: 12px 14px; border-bottom: 1px solid rgba(155, 92, 255, .08); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(155, 92, 255, .05); }
.table .id { color: var(--muted); font-variant-numeric: tabular-nums; }
.table .reason { max-width: 380px; overflow-wrap: anywhere; }
.table .empty-row { text-align: center; color: var(--muted); padding: 36px; }
.type { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px 4px 8px; border-radius: 99px; border: 1px solid; white-space: nowrap; }
.type .ic { width: 14px; height: 14px; }
.type-warn { color: var(--warn); border-color: rgba(255, 200, 87, .4); background: rgba(255, 200, 87, .08); }
.type-mute { color: var(--accent-2); border-color: rgba(79, 209, 255, .4); background: rgba(79, 209, 255, .08); }
.type-kick { color: var(--orange); border-color: rgba(255, 159, 69, .4); background: rgba(255, 159, 69, .08); }
.type-ban { color: var(--bad); border-color: rgba(255, 92, 122, .45); background: rgba(255, 92, 122, .08); }
.type-automod { color: var(--accent-hi); border-color: rgba(155, 92, 255, .45); background: rgba(155, 92, 255, .1); }
.pill { display: inline-block; font-size: 11.5px; padding: 1px 7px; margin-left: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: var(--muted); }

/* Lists */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.av { width: 42px; height: 42px; border-radius: 50%; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); white-space: nowrap; }
.badge .ic { width: 13px; height: 13px; }
.badge.ok { color: var(--ok); border-color: rgba(61, 220, 151, .45); background: rgba(61, 220, 151, .08); }
.badge.no { color: var(--warn); border-color: rgba(255, 200, 87, .4); background: rgba(255, 200, 87, .06); }

/* Role chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 230px; overflow: auto; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); cursor: pointer; font-size: 13px; user-select: none; transition: all .12s; }
.chip span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip span:hover { border-color: var(--line-strong); color: var(--text); }
.chip input:checked + span { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 20%, transparent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent-2); }

/* Activity meters: animated striped bars */
.item.act { flex-wrap: wrap; }
.badge.loa { color: var(--accent-2); border-color: rgba(79, 209, 255, .45); background: rgba(79, 209, 255, .08); }
.badge.off { color: var(--accent-hi); border-color: var(--line-strong); background: rgba(155, 92, 255, .1); }
.off-notice { margin-bottom: 16px; }
.dialog { width: min(420px, calc(100vw - 32px)); padding: 22px; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--panel-solid); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), var(--glow); }
.dialog::backdrop { background: rgba(4, 2, 10, .7); backdrop-filter: blur(3px); }
.dialog form { display: flex; flex-direction: column; gap: 14px; }
.dialog p { margin: -6px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.act-name { min-width: 140px; font-weight: 600; }
.act-end { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.meter { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 4px; }
.meter > span:first-child { display: flex; align-items: center; gap: 6px; }
.meter .ic { width: 14px; height: 14px; }
.bar { height: 10px; border-radius: 99px; background: rgba(6, 3, 12, .8); overflow: hidden; border: 1px solid var(--line); }
.bar div {
  height: 100%; border-radius: 99px;
  background: repeating-linear-gradient(45deg, var(--accent) 0 10px, #b88aff 10px 20px);
  background-size: 28px 28px; animation: stripes 1s linear infinite, grow .8s ease-out;
  box-shadow: 0 0 10px var(--accent);
}
.bar.done div { background-image: repeating-linear-gradient(45deg, var(--ok) 0 10px, #7ff0bf 10px 20px); box-shadow: 0 0 10px var(--ok); }
@keyframes stripes { to { background-position: 28px 0; } }
@keyframes grow { from { width: 0; } }

/* Commands */
.cmd-name { font-family: ui-monospace, Consolas, monospace; color: var(--accent-hi); }

/* Bot control */
.bot-head { display: flex; align-items: center; gap: 16px; }
.bot-head img { width: 76px; height: 76px; border-radius: 50%; box-shadow: var(--glow); border: 2px solid var(--line-strong); }
.big { font: 700 21px var(--head); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: blink 2s ease-in-out infinite; }
.dot.off { background: var(--bad); }
.dot.bot { background: var(--accent); }
.dot.sys { background: var(--accent-2); margin-left: 8px; }
@keyframes blink { 50% { opacity: .45; } }
.legend { color: var(--muted); font-family: Inter, system-ui, sans-serif; font-weight: 500; letter-spacing: 0; }

/* Dev */
canvas { width: 100%; height: 160px; display: block; }
.terminal { margin: 0; height: 400px; overflow: auto; background: #030106; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: 12.5px/1.6 ui-monospace, Consolas, "Cascadia Mono", monospace; color: #d6ccf5; white-space: pre-wrap; word-break: break-word; box-shadow: inset 0 0 30px rgba(155, 92, 255, .06); }
.terminal .err { color: var(--bad); }
.terminal .web { color: var(--accent-2); }
.terminal .sys { color: #b88aff; }

/* Discord-style preview */
.dc { display: flex; gap: 14px; background: #313338; color: #dbdee1; border-radius: 12px; padding: 16px; font-family: "gg sans", "Noto Sans", system-ui, sans-serif; border: 1px solid rgba(255, 255, 255, .06); }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.dc-body { min-width: 0; flex: 1; }
.dc-name { font-weight: 600; color: #fff; }
.dc-app { background: #5865f2; color: #fff; font-size: 10px; padding: 1px 4px; border-radius: 3px; vertical-align: 2px; }
.dc-time { color: #949ba4; font-size: 12px; font-weight: 400; }
.dc-content { white-space: pre-wrap; margin: 2px 0 4px; overflow-wrap: anywhere; }
.dc-embed { display: flex; gap: 12px; max-width: 520px; background: #2b2d31; border-left: 4px solid var(--c); border-radius: 4px; padding: 10px 14px 14px 12px; margin-top: 4px; }
.dc-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.dc-author { font-size: 13px; font-weight: 600; color: #fff; }
.dc-title { font-weight: 700; color: #fff; }
.dc-desc { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dc-image { max-width: 100%; border-radius: 4px; margin-top: 6px; }
.dc-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; }
.dc-footer { font-size: 12px; color: #b5bac1; }

/* Toast */
#toast { visibility: hidden; position: fixed; right: 20px; bottom: 20px; background: var(--panel-2); border: 1px solid var(--accent); padding: 12px 18px; border-radius: 12px; box-shadow: var(--glow); transform: translateY(150%); transition: transform .25s, visibility .25s; z-index: 10; max-width: calc(100vw - 32px); font-weight: 500; }
#toast.show { transform: none; visibility: visible; }
#toast.bad { border-color: var(--bad); box-shadow: 0 0 18px rgba(255, 92, 122, .4); }

/* Messages (owner) */
.chat { padding: 0; gap: 0; overflow: hidden; }
.chat-list { height: min(62vh, 640px); overflow-y: auto; padding: 10px 0; }
.chat-list .empty { margin: 16px; }
.msg { display: flex; gap: 12px; align-items: flex-start; padding: 8px 18px; transition: background .1s; }
.msg:hover { background: rgba(155, 92, 255, .06); }
.msg.replying { background: rgba(79, 209, 255, .08); box-shadow: inset 3px 0 0 var(--accent-2); }
.msg-av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.msg-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; color: #dcd3f5; }
.msg-ref { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.msg-ref span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-ref .ic { width: 14px; height: 14px; }
.msg-img { display: block; max-width: min(280px, 100%); max-height: 220px; border-radius: 8px; margin-top: 6px; }
.bot-tag { font: 600 10px var(--head); letter-spacing: .05em; background: var(--accent); color: #fff; padding: 1px 5px; border-radius: 4px; }
.msg [data-reply] { opacity: 0; transition: opacity .15s; }
.msg:hover [data-reply], .msg [data-reply]:focus-visible, .msg.replying [data-reply] { opacity: 1; }
@media (hover: none) { .msg [data-reply] { opacity: 1; } }
.chat-compose { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: rgba(6, 3, 12, .45); }
.chat-row { display: flex; gap: 10px; align-items: flex-end; }
.chat-row textarea { resize: none; }

/* Phone / tablet */
@media (max-width: 900px) {
  /* minmax(0, …): a plain 1fr column grows to fit the wide menu strip and the whole page scrolls sideways */
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .nav { position: sticky; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px 16px 0; gap: 4px 10px; z-index: 5; }
  .brand { font-size: 20px; }
  .brand img { width: 32px; height: 32px; }
  /* menu: one scrollable row with labels; the fade on the right hints there's more */
  .links { flex-direction: row; order: 3; flex-basis: 100%; overflow-x: auto; gap: 4px; padding-bottom: 8px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .links::-webkit-scrollbar { display: none; }
  .nav-group { flex-direction: row; gap: 4px; }
  .nav-label { display: none; }
  .links a { white-space: nowrap; padding: 8px 12px; font-size: 14px; }
  .links a.active { box-shadow: inset 0 -2px 0 var(--accent), 0 0 18px rgba(155, 92, 255, .15); }
  .me { margin-left: auto; padding: 4px 6px; border: 0; background: none; }
  #me-name { display: none; }
  main { padding: 16px; }
  h1 { font-size: 23px; }
  /* 16px stops iPhones zooming in when a field is tapped */
  input, select, textarea { font-size: 16px; }
  /* page title on its own line, buttons and pickers below it */
  .page-head { gap: 12px; }
  .page-head .grow { flex-basis: calc(100% - 64px); }
  .page-icon { width: 46px; height: 46px; }
  .page-head label.inline { flex: 1 1 100%; }
  .page-head label.inline select { flex: 1; }
  /* infractions: one card per entry instead of a wide table */
  .table { min-width: 0; }
  .table thead { display: none; }
  .table tbody { display: block; }
  .table tr { display: grid; grid-template-columns: auto 1fr auto auto; grid-template-areas: "type id when del" "user user user user" "reason reason reason reason" "mod mod mod mod";
    align-items: center; gap: 6px 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { padding: 0; border: 0; }
  .table td:nth-child(1) { grid-area: id; }
  .table td:nth-child(2) { grid-area: type; }
  .table td:nth-child(3) { grid-area: user; }
  .table td:nth-child(4) { grid-area: reason; max-width: none; }
  .table td:nth-child(5) { grid-area: mod; color: var(--muted); font-size: 13px; }
  .table td:nth-child(5)::before { content: "By "; }
  .table td:nth-child(6) { grid-area: when; color: var(--muted); font-size: 13px; }
  .table td:nth-child(7) { grid-area: del; }
  .table tr:has(.empty-row) { display: block; }
  .search { min-width: 0; flex-basis: 100%; }
  /* weekly requirement: three small fields in a row */
  #quota-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
  #quota-form strong, #quota-form button { grid-column: 1 / -1; }
  .act-end { flex-basis: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .msg { padding: 8px 12px; }
  .msg [data-reply] { font-size: 0; gap: 0; padding: 7px; } /* icon only */
  .chat-list { height: 58vh; }
  .terminal { height: 50vh; }
  .save-bar .btn { width: 100%; }
  .card h3 { flex-wrap: wrap; }
  .card h3 > small { flex-basis: 100%; } /* the grey note goes under the title */
  #toast { left: 16px; right: 16px; bottom: 16px; text-align: center; }
  .split, .grid, .grid.two, .ann-grid { grid-template-columns: 1fr; }
  .sticky-col { position: static; }
  .welcome { padding: 18px; gap: 14px; }
  .welcome h1 { font-size: 22px; }
  .welcome-av { width: 56px; height: 56px; }
  .welcome-logo { width: 140px; }
  .hero { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 32px; gap: 16px; }
  .svc-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; width: min(240px, 70%); margin: 0 auto; }
  .topbar-in, .hero, .block, .footer-in { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 640px) {
  .topbar-in { gap: 10px; }
  .topbar .brand span { display: none; }
  .top-links a { padding: 8px 10px; }
  .account-menu summary span { display: none; }
  .hero-cta { align-self: stretch; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-stats { gap: 24px; }
  .block { padding-top: 28px; padding-bottom: 28px; }
  /* home: two compact columns */
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; gap: 10px; }
  .stat-icon { width: 34px; height: 34px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; }
  .tile .small { display: none; }
  .welcome-logo { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* the slow spinning logo on the main screen stays: small, slow decoration */
  .hero-art .orbit { animation: turn 40s linear infinite !important; }
  .hero-art .logo-ring { animation: spin 5s linear infinite !important; }
}
