/* LuaWarden studio theme — halloween default, cloud / graphite / navy available. */
:root, html[data-theme="cloud"] { color-scheme: light;
  --bg:#f8f7fb; --paper:#fff; --paper2:#fbf9fe; --ink:#2c2438; --muted:#776c86; --line:#e8e1ee;
  --primary:#7553d2; --soft:#f1ecfb; --ring:#dfd1f6; --radial:#ebe1fa; --shadow:0 14px 45px #48326012; }
html[data-theme="halloween"] { color-scheme: dark;
  --bg:#0d0911; --paper:#17101d; --paper2:#201528; --ink:#f8edf9; --muted:#b89eae; --line:#3c2947;
  --primary:#f07a2b; --soft:#2a1930; --ring:#6a4426; --radial:#5a263c; --shadow:0 18px 55px rgba(0,0,0,.28); }
html[data-theme="graphite"] { color-scheme: dark;
  --bg:#16141c; --paper:#221e29; --paper2:#2a2532; --ink:#f1ebf6; --muted:#bcafc9; --line:#443a51;
  --primary:#b69cf2; --soft:#302739; --ring:#615274; --radial:#2d2341; --shadow:0 14px 45px #0003; }
html[data-theme="navy"] { color-scheme: dark;
  --bg:#141c2b; --paper:#1c2838; --paper2:#243348; --ink:#f0f5ff; --muted:#b0bfd3; --line:#394a61;
  --primary:#a5bbef; --soft:#27364a; --ring:#4d6485; --radial:#263955; --shadow:0 14px 45px #0003; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--ink); background: var(--bg);
  font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
input, select, textarea { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea { resize: vertical; }
label { display: block; font-size: 12px; font-weight: 650; color: var(--muted); margin: 0 0 6px; }
::selection { background: color-mix(in srgb, var(--primary) 30%, transparent); }

/* ---------- login / register pages ---------- */
.page { min-height: 100svh; position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column;
  background: radial-gradient(ellipse 50% 48% at 52% 48%, var(--radial) 0%, transparent 76%), var(--bg); }
.page:before { content: ""; inset: 0; position: absolute; z-index: -2; pointer-events: none;
  background-image: linear-gradient(color-mix(in srgb, var(--primary) 4%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--primary) 4%, transparent) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: linear-gradient(transparent, #000 22%, #000 70%, transparent); }
.orb { position: absolute; pointer-events: none; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent); z-index: -1; }
.orb.one { height: 660px; width: 660px; top: calc(48% - 330px); left: calc(50% - 330px); box-shadow: 0 0 0 58px color-mix(in srgb, var(--primary) 4%, transparent), 0 0 0 122px color-mix(in srgb, var(--primary) 3%, transparent); }
.orb.two { height: 160px; width: 160px; left: 6%; bottom: 9%; border-color: color-mix(in srgb, var(--primary) 12%, transparent); box-shadow: 0 0 0 32px color-mix(in srgb, var(--primary) 3%, transparent); }

header.top { height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 0 clamp(18px, 5vw, 78px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 63%, transparent); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 11px; font-size: 21px; letter-spacing: -.8px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.brand b { color: var(--primary); }
.lw { height: 40px; width: 40px; display: grid; place-items: center; color: var(--primary); }
.lw svg { height: 40px; width: 40px; filter: drop-shadow(0 4px 8px color-mix(in srgb, var(--primary) 26%, transparent)); }
.head-links { display: flex; align-items: center; gap: 25px; font-size: 12px; color: var(--muted); font-weight: 600; }
.head-links a { text-decoration: none; }
.head-links a:hover { color: var(--primary); }
.header-badge { padding: 9px 13px; color: var(--primary); background: var(--soft); border: 1px solid var(--line); border-radius: 100px; font-size: 11px; font-weight: 750; letter-spacing: .2px; }

main.center { width: min(1100px, calc(100% - 32px)); margin: auto; padding: 76px 0 72px; flex: 1; display: grid; align-content: center; justify-items: center; gap: 27px; }
.above { text-align: center; max-width: 540px; }
.eyebrow { font-size: 10px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--primary); font-weight: 850; margin-bottom: 13px; }
.above h1 { font-size: clamp(29px, 4.4vw, 48px); line-height: 1.09; margin: 0; letter-spacing: -1.9px; }
.above p { max-width: 450px; margin: 14px auto 0; color: var(--muted); line-height: 1.65; font-size: 14px; }

.card { width: min(430px, 100%); border: 1px solid var(--line); background: var(--paper); border-radius: 24px; box-shadow: var(--shadow); position: relative; padding: 36px clamp(22px, 4vw, 36px) 30px; text-align: center; }
.icon-wrap { width: 90px; height: 90px; border-radius: 26px; background: var(--soft); border: 1px solid var(--line); display: grid; place-items: center; margin: 0 auto 18px; }
.icon-wrap svg { width: 61px; height: 61px; }
.card h2 { font-size: 27px; letter-spacing: -1.1px; line-height: 1.18; margin: 0; }
.card h2 span { color: var(--primary); }
.subtitle { color: var(--muted); margin: 9px 0 27px; font-size: 13px; }
.card form { text-align: left; margin: 0; }
.card form label { text-align: left; }
.card .btn.primary { width: 100%; margin-top: 4px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.security { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 20px 0 17px; font-size: 11px; color: var(--muted); }
.security svg { width: 14px; height: 14px; stroke: var(--primary); fill: none; stroke-width: 1.7; }
.rule { height: 1px; background: var(--line); margin-bottom: 18px; }
.legal { color: var(--muted); font-size: 11px; margin: 0; line-height: 1.75; }
.legal a { color: var(--primary); text-underline-offset: 3px; }
.note { color: var(--muted); font-size: 10px; margin: 16px 0 0; }
.alt { font-size: 12px; color: var(--muted); margin: 14px 0 0; }
.alt a { color: var(--primary); }

.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(850px, 100%); gap: 14px; margin-top: 4px; }
.benefit { background: color-mix(in srgb, var(--paper) 72%, transparent); border: 1px solid var(--line); border-radius: 15px; padding: 17px; display: flex; align-items: flex-start; gap: 11px; }
.benefit svg { width: 21px; height: 21px; stroke: var(--primary); stroke-width: 1.7; fill: none; flex: none; }
.benefit strong { display: block; font-size: 12px; }
.benefit small { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 3px; }

.footer { border-top: 1px solid var(--line); text-align: center; padding: 17px 18px 23px; color: var(--muted); font-size: 11px; }
.footer a { color: var(--primary); text-decoration: none; }

/* ---------- studio pages (legal, bot, api) ---------- */
.frame { max-width: 1200px; margin: auto; padding: 24px 27px; }
.frame .top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0 28px; border-bottom: 1px solid var(--line); }
.frame .brand { font-size: 19px; gap: 12px; }
.lp { width: 39px; height: 39px; display: grid; place-items: center; background: var(--soft); color: var(--primary); border-radius: 12px; font-weight: 900; }
.links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.links a { text-decoration: none; }
.links a:hover { color: var(--ink); }
.hero { padding: 50px 0 32px; }
.hero h1 { font-size: clamp(29px, 4.1vw, 56px); line-height: 1.13; letter-spacing: -1.8px; margin: 12px 0; }
.hero p { max-width: 700px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { padding: 22px; }
.metric small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; }
.metric strong { display: block; font-size: 30px; letter-spacing: -.8px; margin-top: 9px; }
.metric span { font-size: 12px; color: var(--muted); }
.legal-block { padding: 25px; margin: 14px 0; max-width: 950px; }
.legal-block p { line-height: 1.75; color: var(--muted); font-size: 14px; }
.legal-block h2 { color: var(--ink); font-size: 18px; margin: 0 0 10px; }
.panel { border: 1px solid var(--line); border-radius: 19px; background: var(--paper); box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 13px; font-size: 19px; }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 12px;
  background: var(--primary); color: #fff; text-decoration: none; font-weight: 770; font-size: 13px; border: 1px solid var(--primary); min-height: 44px; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { color: var(--ink); background: color-mix(in srgb, var(--paper) 3%, transparent); border-color: var(--line); }
.btn.small { min-height: 36px; padding: 8px 14px; font-size: 12px; border-radius: 10px; }
.btn.danger { background: transparent; border-color: color-mix(in srgb, #e5484d 55%, var(--line)); color: #e5484d; }
.btn:disabled { opacity: .55; cursor: default; }
.pill { display: inline-flex; gap: 7px; align-items: center; border: 1px solid var(--line); color: var(--muted); background: var(--soft); border-radius: 30px; padding: 6px 11px; font-size: 10px; font-weight: 850; letter-spacing: .8px; text-transform: uppercase; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; min-width: 420px; }
td, th { padding: 15px 21px; border-bottom: 1px solid var(--line); }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.note { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; font-size: 12px; color: var(--muted); }
.frame .footer { display: flex; justify-content: space-between; gap: 15px; padding: 34px 0 20px; font-size: 12px; color: var(--muted); flex-wrap: wrap; text-align: left; border-top: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.code { background: var(--paper2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.kmono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.empty { padding: 32px; text-align: center; color: var(--muted); }

/* ---------- dashboard ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100svh; }
.side { border-right: 1px solid var(--line); background: var(--paper2); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100svh; }
.side .brand { font-size: 16px; padding: 6px 10px 16px; }
.side .lw { height: 30px; width: 30px; }
.side .lw svg { height: 30px; width: 30px; }
.side .item { display: block; width: 100%; text-align: left; background: none; border: 1px solid transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: 10px 12px; border-radius: 10px; cursor: pointer; text-decoration: none; }
.side .item:hover { color: var(--ink); background: var(--soft); }
.side .item.on { color: var(--primary); background: var(--soft); border-color: var(--line); }
.spacer { flex: 1; }
.main { padding: 30px clamp(16px, 4vw, 40px) 60px; max-width: 1080px; }
.main h1 { font-size: 24px; letter-spacing: -.7px; margin: 6px 0 4px; }
.lead { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.main .panel { padding: 20px 22px; margin: 0 0 16px; }
.main table { min-width: 0; }
.main td, .main th { padding: 11px 12px; font-size: 13px; }
.main .panel table { margin: 8px 0 0; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.form-row > div { flex: 1; min-width: 140px; }
.form-row button { margin-top: 0; }
.toggles { display: flex; gap: 18px; flex-wrap: wrap; }
.tgl { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink); font-weight: 600; margin: 0; }
.tgl input { width: auto; accent-color: var(--primary); }
.hint { color: var(--muted); font-size: 11.5px; margin: 10px 0 0; line-height: 1.6; }
.statline { display: flex; gap: 26px; margin: 4px 0 18px; }
.statline > div { display: grid; }
.statline b { font-size: 22px; letter-spacing: -.5px; }
.statline span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.msg { border-radius: 10px; padding: 10px 14px; font-size: 12.5px; margin: 12px 0 0; }
.msg.err { background: color-mix(in srgb, #e5484d 12%, transparent); border: 1px solid color-mix(in srgb, #e5484d 40%, transparent); color: color-mix(in srgb, #e5484d 70%, var(--ink)); }
.msg.ok { background: color-mix(in srgb, #2fb46f 12%, transparent); border: 1px solid color-mix(in srgb, #2fb46f 40%, transparent); color: color-mix(in srgb, #2fb46f 65%, var(--ink)); }
.badge { display: inline-block; border-radius: 100px; padding: 3px 9px; font-size: 10.5px; font-weight: 750; letter-spacing: .3px; border: 1px solid var(--line); color: var(--muted); background: var(--paper2); }
.badge.ok { color: #35b56f; border-color: color-mix(in srgb, #35b56f 45%, transparent); background: color-mix(in srgb, #35b56f 10%, transparent); }
.badge.bad { color: #e5484d; border-color: color-mix(in srgb, #e5484d 45%, transparent); background: color-mix(in srgb, #e5484d 10%, transparent); }
.badge.acc { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: var(--soft); }
.badge.off { opacity: .65; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions button { background: var(--paper2); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; font-size: 11.5px; padding: 5px 9px; cursor: pointer; }
.row-actions button:hover { border-color: var(--primary); color: var(--primary); }
.row-actions button.del { color: #e5484d; }
.back { color: var(--muted); text-decoration: none; font-size: 12.5px; }
.back:hover { color: var(--primary); }

@media(max-width: 690px) {
  header.top { height: 70px; } .brand { font-size: 18px; } .lw svg { height: 34px; width: 34px; }
  .head-links a { display: none; } .header-badge { font-size: 10px; padding: 8px 10px; }
  main.center { padding: 46px 0 42px; gap: 22px; } .above h1 { font-size: 33px; letter-spacing: -1.1px; }
  .card { padding: 30px 22px; } .benefits { grid-template-columns: 1fr; gap: 9px; } .benefit { padding: 13px 16px; }
  .orb.one { width: 410px; height: 410px; top: 25%; left: calc(50% - 205px); }
  .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side .brand { padding: 6px 10px; } .side .item { width: auto; } .spacer { display: none; }
  .grid, .grid.cols3 { grid-template-columns: 1fr; } .hero { padding: 32px 0 22px; } .frame { padding: 14px; }
}
@media(prefers-reduced-motion: reduce) { *, *:before, *:after { transition: none !important; } }
