/* AGN Ban Appeal Center — elite, calm, credible. Midnight navy, electric blue/cyan, restrained violet.
   Amber = pending/in review. Green/red only for final outcomes. */
:root {
  --bg: #040a1c; --bg2: #071230; --panel: rgba(10, 22, 52, .72); --panel-solid: #0a1634; --panel-2: rgba(14, 30, 68, .78);
  --line: rgba(79, 148, 255, .28); --line-strong: rgba(95, 170, 255, .6); --glow: 0 0 0 1px rgba(80, 150, 255, .18), 0 10px 40px rgba(0, 20, 80, .45);
  --text: #eaf2ff; --muted: #9fb2d6; --dim: #6f82a8;
  --blue: #2f7df6; --blue-2: #1e5fd6; --cyan: #5fd4ff; --violet: #8b6cff; --violet-bg: rgba(90, 60, 200, .18);
  --amber: #f5b53d; --amber-bg: rgba(245, 181, 61, .12); --green: #34d27b; --green-bg: rgba(52, 210, 123, .12); --red: #ff5a67; --red-bg: rgba(255, 90, 103, .12);
  --radius: 16px; --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --display: 'Rajdhani', 'Inter', sans-serif; --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 14.5px/1.55 var(--font); color: var(--text); background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 70% -10%, rgba(47, 125, 246, .28), transparent 60%),
    radial-gradient(900px 500px at 5% 10%, rgba(139, 108, 255, .16), transparent 60%),
    linear-gradient(180deg, #050c24 0%, #040a1c 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}
/* Atmosphere: skyline + perspective grid, fixed and behind everything, never under body text at low contrast. */
body::before { content: ''; position: fixed; inset: auto 0 0 0; height: 46vh; background: url('/assets/city.svg') bottom center / cover no-repeat; opacity: .55; pointer-events: none; z-index: -2; }
body::after { content: ''; position: fixed; inset: auto -20% 0 -20%; height: 30vh; pointer-events: none; z-index: -1; opacity: .35;
  background: linear-gradient(transparent 0 96%, rgba(95, 212, 255, .5) 96%) 0 0 / 100% 28px, linear-gradient(90deg, transparent 0 98%, rgba(95, 212, 255, .35) 98%) 0 0 / 60px 100%;
  transform: perspective(420px) rotateX(62deg); transform-origin: bottom; mask-image: linear-gradient(transparent, #000 70%); }
a { color: var(--cyan); text-decoration: none; } a:hover { text-decoration: underline; }
.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: .01em; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .mono { font-family: var(--mono); font-size: .92em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }

/* ── Top bar ── */
.top { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px); background: rgba(4, 10, 28, .72); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1520px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 10px 20px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 26px/1 var(--display); font-style: italic; color: #fff; text-shadow: 0 0 18px rgba(47, 125, 246, .9); letter-spacing: -.02em; }
.brand img { width: 42px; height: 42px; border-radius: 50%; filter: drop-shadow(0 0 8px rgba(47, 125, 246, .8)); }
.brand small { display: block; font: 600 10px/1.2 var(--font); font-style: normal; letter-spacing: .22em; color: var(--cyan); text-shadow: none; }
.nav { display: flex; gap: 4px; margin-left: 16px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; color: var(--muted); white-space: nowrap; font-weight: 500; }
.nav a:hover { color: var(--text); background: rgba(47, 125, 246, .1); text-decoration: none; }
.nav a.on { color: #fff; background: linear-gradient(180deg, rgba(47, 125, 246, .28), rgba(47, 125, 246, .08)); box-shadow: inset 0 -2px 0 var(--blue); }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--violet)); display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line-strong); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.top .menu-btn { display: none; }

/* ── Layout ── */
.shell { max-width: 1520px; margin: 0 auto; padding: 22px 20px 60px; display: grid; grid-template-columns: 300px minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.shell.wide { grid-template-columns: minmax(0, 1fr); max-width: 1180px; }
.rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 76px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--glow); backdrop-filter: blur(10px); padding: 18px; position: relative; }
.panel.tight { padding: 14px; }
.panel h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.center { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hud::before { content: ''; position: absolute; top: -1px; left: 22px; width: 60px; height: 2px; background: linear-gradient(90deg, var(--cyan), transparent); border-radius: 2px; }

/* ── Hero ── */
.hero { overflow: hidden; padding: 30px 30px 0; min-height: 230px; background: linear-gradient(115deg, rgba(8, 20, 50, .95) 35%, rgba(8, 20, 50, .35)), url('/assets/city.svg') right bottom / 70% auto no-repeat, var(--panel-solid); }
.eyebrow { color: var(--cyan); font: 700 12px/1 var(--font); letter-spacing: .24em; text-transform: uppercase; }
.hero h1 { font: 700 clamp(34px, 5vw, 56px)/1.05 var(--display); margin: 10px 0 8px; }
.hero h1 span { background: linear-gradient(90deg, #4aa3ff, #8fe3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #c9d7f2; font-size: 16px; margin: 0 0 16px; max-width: 620px; }
.tagline { position: absolute; right: 26px; top: 120px; border-left: 2px solid var(--cyan); padding-left: 12px; font-size: 12px; color: #cfe0ff; line-height: 1.4; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 12px -30px 0; border-top: 1px solid var(--line); }
.step { display: flex; align-items: center; gap: 12px; padding: 16px 22px; position: relative; }
.step + .step::before { content: ''; position: absolute; left: -30px; top: 50%; width: 60px; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.num { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; border: 2px solid var(--line-strong); color: #cfe0ff; flex: none; }
.num.on { border-color: var(--blue); color: #fff; box-shadow: 0 0 16px rgba(47, 125, 246, .8), inset 0 0 10px rgba(47, 125, 246, .5); }
.step b { display: block; font-size: 14.5px; } .step small { color: var(--muted); font-size: 12px; }
.step.on small { color: var(--cyan); }

/* ── Buttons & inputs ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); background: rgba(47, 125, 246, .1); color: var(--text); padding: 10px 16px; border-radius: 12px; font: 600 14px var(--font); cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { background: rgba(47, 125, 246, .22); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #3b8bff, #1f5fd8); border-color: #6aa9ff; box-shadow: 0 0 22px rgba(47, 125, 246, .55), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.primary:hover { box-shadow: 0 0 30px rgba(47, 125, 246, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.big { padding: 15px 34px; font-size: 16.5px; border-radius: 999px; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.violet { background: var(--violet-bg); border-color: rgba(139, 108, 255, .6); color: #d9ceff; }
.btn.danger { background: var(--red-bg); border-color: rgba(255, 90, 103, .55); color: #ffc1c6; }
.btn.ok { background: var(--green-bg); border-color: rgba(52, 210, 123, .55); color: #bdf3d5; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
label.f { display: block; margin: 14px 0 6px; font-weight: 600; }
label.f small { font-weight: 400; color: var(--muted); display: block; }
.req::after { content: ' *'; color: var(--cyan); }
input[type=text], input[type=email], input[type=search], input[type=number], input:not([type]), select, textarea {
  width: 100%; background: rgba(3, 10, 30, .75); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 11px 13px; font: 14px var(--font); transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 125, 246, .22); }
.counter { text-align: right; font-size: 11.5px; color: var(--dim); margin-top: 4px; }
.counter.bad { color: var(--amber); }
.err { color: #ffb4bb; font-size: 12.5px; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.code-input { font: 700 30px/1 var(--mono); letter-spacing: .3em; text-align: center; text-transform: uppercase; padding: 16px !important; }

/* ── Chips & status ── */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: rgba(47, 125, 246, .1); color: #cfe0ff; white-space: nowrap; }
.st-pending { color: #ffd98a; background: var(--amber-bg); border-color: rgba(245, 181, 61, .5); }
.st-info { color: #d9ceff; background: var(--violet-bg); border-color: rgba(139, 108, 255, .55); }
.st-ok { color: #9ff0c4; background: var(--green-bg); border-color: rgba(52, 210, 123, .5); }
.st-bad { color: #ffb4bb; background: var(--red-bg); border-color: rgba(255, 90, 103, .5); }
.st-muted { color: var(--muted); background: rgba(160, 175, 210, .08); border-color: rgba(160, 175, 210, .25); }
.pri-critical { color: #ffb4bb; border-color: rgba(255, 90, 103, .5); background: var(--red-bg); }
.pri-high { color: #ffd98a; border-color: rgba(245, 181, 61, .5); background: var(--amber-bg); }
.pri-low { color: var(--muted); }
.status-card { border-radius: 14px; padding: 16px; display: flex; gap: 12px; align-items: flex-start; border: 1px solid; }
.status-card .ic { width: 30px; height: 30px; }
.status-card b { font: 700 22px/1.1 var(--display); display: block; margin-bottom: 4px; }
.status-card.st-pending { box-shadow: 0 0 24px rgba(245, 181, 61, .18), inset 0 0 20px rgba(245, 181, 61, .08); }

/* ── Profile header & counters ── */
.profile { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile .avatar { width: 64px; height: 64px; border-radius: 16px; }
.profile h2 { font: 700 26px/1.1 var(--display); }
.ids { display: flex; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 6px; }
.ids .d { color: #a9b8ff; }
.counters { display: flex; gap: 22px; margin-left: auto; }
.counters div { text-align: center; } .counters b { display: block; font: 700 26px/1 var(--mono); }
.counters .c-ban { color: var(--red); } .counters .c-warn { color: var(--amber); } .counters .c-flag { color: #ffb86b; }
.counters small { color: var(--muted); font-size: 12px; }
.feature { border-color: var(--line-strong); background: linear-gradient(180deg, rgba(47, 125, 246, .14), rgba(10, 22, 52, .75)); }
.feature-top { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.feature-top .badge-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line-strong); background: rgba(47, 125, 246, .15); }
.feature-top h3 { font-size: 19px; color: #9fd0ff; }
.tag { font: 700 10.5px var(--font); letter-spacing: .12em; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--cyan); }
.feature-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: #c7d5f0; }
.feature-points b { color: #fff; }

/* ── Tabs ── */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(10, 22, 52, .7); color: var(--muted); font: 600 13.5px var(--font); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: linear-gradient(180deg, #3b8bff, #1f5fd8); color: #fff; border-color: #6aa9ff; box-shadow: 0 0 18px rgba(47, 125, 246, .45); }
.tabs .count { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .12); }

/* ── Stats, tables, lists ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: rgba(8, 18, 44, .7); }
.stat small { color: var(--muted); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.stat b { display: block; font: 700 24px/1.2 var(--mono); margin-top: 6px; }
.stat.amber { border-color: rgba(245, 181, 61, .5); } .stat.amber b { color: var(--amber); }
.stat.green { border-color: rgba(52, 210, 123, .45); } .stat.green b { color: var(--green); }
.stat.red { border-color: rgba(255, 90, 103, .45); } .stat.red b { color: var(--red); }
.list { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(8, 18, 44, .6); }
.row:hover { border-color: var(--line-strong); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row .sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.row .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); flex: none; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px; border-bottom: 1px solid rgba(79, 148, 255, .12); vertical-align: top; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: rgba(47, 125, 246, .08); }
.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 0; font-size: 13.5px; }
.kv > div { padding: 8px 0; border-bottom: 1px solid rgba(79, 148, 255, .12); }
.kv > div:nth-child(odd) { color: var(--muted); font-size: 12px; }
.kv > div:nth-child(even) { text-align: right; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; border: 1px dashed var(--line); border-radius: 14px; }
.source-note { font-size: 12px; color: var(--amber); display: flex; gap: 6px; align-items: center; margin-top: 8px; }

/* ── Characters / inventory / vehicles ── */
.char-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pill { display: inline-flex; gap: 6px; align-items: center; padding: 6px 11px; border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; background: rgba(8, 18, 44, .7); }
.pill b { font-family: var(--mono); }
.pill.cash b { color: #8ff0b9; } .pill.bank b { color: #9fd0ff; }
.inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.slot { position: relative; border: 1px solid var(--line); border-radius: 12px; background: radial-gradient(circle at 50% 35%, rgba(47, 125, 246, .18), rgba(6, 14, 36, .9) 70%); padding: 8px 6px 7px; text-align: center; min-height: 112px; }
.slot img { width: 52px; height: 52px; object-fit: contain; margin: 4px auto 2px; display: block; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
.slot .amt { position: absolute; top: 5px; right: 7px; font: 700 11px var(--mono); color: var(--cyan); }
.slot .lbl { font-size: 11.5px; line-height: 1.25; }
.slot .meta { font-size: 10.5px; color: var(--dim); margin-top: 2px; }
.veh { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: rgba(8, 18, 44, .65); }
.veh-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.plate { font: 700 13px var(--mono); background: #f2f5ff; color: #0b1a3d; padding: 2px 9px; border-radius: 5px; letter-spacing: .08em; }
.bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); margin-top: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
details.sub summary { cursor: pointer; color: var(--cyan); font-size: 13px; margin-top: 10px; }

/* ── Timeline (rail + status page) ── */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 18px 34px; }
.tl li::before { content: ''; position: absolute; left: 9px; top: 22px; bottom: -2px; width: 2px; background: rgba(95, 170, 255, .25); }
.tl li:last-child::before { display: none; }
.tl .dot { position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(160, 175, 210, .5); background: var(--bg); }
.tl li.done .dot { border-color: var(--cyan); background: radial-gradient(circle, #fff 0 25%, var(--cyan) 30%); box-shadow: 0 0 12px var(--cyan); }
.tl li.done::before { background: linear-gradient(var(--cyan), rgba(95, 170, 255, .3)); }
.tl li.current .dot { border-color: var(--amber); box-shadow: 0 0 12px var(--amber); background: radial-gradient(circle, var(--bg) 0 35%, var(--amber) 40% 55%, var(--bg) 60%); }
.tl li.current b { color: var(--amber); }
.tl b { display: block; font-size: 14px; } .tl small { color: var(--muted); font-size: 12.5px; }
.hsteps { display: flex; align-items: flex-start; gap: 0; }
.hsteps > div { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--dim); }
.hsteps > div::before { content: ''; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: rgba(95, 170, 255, .2); z-index: 0; }
.hsteps > div:first-child::before { display: none; }
.hsteps .n { width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; border: 2px solid rgba(160, 175, 210, .4); background: var(--bg); position: relative; z-index: 1; }
.hsteps .done { color: var(--cyan); } .hsteps .done .n { border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.hsteps .done::before { background: var(--cyan); }
.hsteps .current { color: var(--amber); } .hsteps .current .n { border-color: var(--amber); box-shadow: 0 0 12px var(--amber); }

/* ── Rail cards ── */
.logo-big { display: grid; place-items: center; padding: 8px 0 4px; }
.logo-big img { width: 210px; height: 210px; border-radius: 50%; filter: drop-shadow(0 0 26px rgba(47, 125, 246, .8)); }
.verified { display: flex; gap: 12px; align-items: flex-start; }
.verified .dc { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #5865f2; flex: none; }
.verified b { display: flex; gap: 6px; align-items: center; }
.tick { width: 18px; height: 18px; border-radius: 50%; background: var(--blue); display: inline-grid; place-items: center; box-shadow: 0 0 10px var(--blue); }
.tick .ic { width: 12px; height: 12px; stroke-width: 3; }
.case-copy { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-top: 12px; font: 13px var(--mono); }
.next { list-style: none; padding: 0; margin: 0; }
.next li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding-bottom: 18px; position: relative; }
.next li::before { content: ''; position: absolute; left: 19px; top: 40px; bottom: 4px; width: 2px; background: rgba(95, 170, 255, .25); }
.next li:last-child::before { display: none; }
.next .num { width: 40px; height: 40px; }
.next b { display: block; margin-top: 2px; }
.next p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.respect { background: linear-gradient(180deg, rgba(139, 108, 255, .2), rgba(60, 40, 140, .18)); border-color: rgba(139, 108, 255, .55); }
.respect h3 { color: #d9ceff; }
.foot-tag { text-align: center; font: 700 11px var(--font); letter-spacing: .14em; color: var(--cyan); padding-top: 12px; border-top: 1px solid var(--line); }

/* ── Chat ── */
.chat { display: flex; flex-direction: column; height: 520px; }
.chat.tall { height: calc(100vh - 230px); min-height: 460px; }
.msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 4px 12px; }
.msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; border: 1px solid var(--line); background: rgba(10, 24, 58, .9); font-size: 14px; }
.msg .by { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; display: flex; gap: 8px; }
.msg.me { align-self: flex-end; background: linear-gradient(180deg, rgba(47, 125, 246, .35), rgba(31, 95, 216, .25)); border-color: rgba(106, 169, 255, .6); }
.msg.system { align-self: center; max-width: 92%; background: rgba(95, 212, 255, .07); border-style: dashed; text-align: center; font-size: 13px; color: #cfe0ff; }
.msg.info_request { border-color: rgba(139, 108, 255, .7); background: var(--violet-bg); }
.msg.internal { background: rgba(245, 181, 61, .07); border-color: rgba(245, 181, 61, .4); }
.msg.issuer_context { background: rgba(139, 108, 255, .1); border-color: rgba(139, 108, 255, .5); }
.composer { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 10px; }
.composer textarea { min-height: 48px; max-height: 180px; }
.vis-toggle { display: flex; gap: 6px; margin-bottom: 8px; }
.vis-toggle button { flex: 1; }
.vis-toggle .on-player { background: rgba(47, 125, 246, .35); border-color: #6aa9ff; }
.vis-toggle .on-internal { background: rgba(245, 181, 61, .18); border-color: rgba(245, 181, 61, .7); color: #ffd98a; }

/* ── Wizard ── */
.progress { display: flex; gap: 6px; }
.progress i { flex: 1; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .1); }
.progress i.on { background: linear-gradient(90deg, var(--blue), var(--cyan)); box-shadow: 0 0 10px rgba(95, 212, 255, .6); }
.q { margin-bottom: 6px; }
.q h4 { font-size: 15px; margin-top: 18px; } .q h4 .n { color: var(--cyan); margin-right: 6px; }
.q p.help { margin: 2px 0 6px; color: var(--muted); font-size: 13px; }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.choice label { border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; display: flex; gap: 8px; align-items: center; background: rgba(3, 10, 30, .6); }
.choice input { accent-color: var(--blue); }
.choice label:has(input:checked) { border-color: #6aa9ff; background: rgba(47, 125, 246, .2); box-shadow: 0 0 14px rgba(47, 125, 246, .35); }
.linkrow { display: flex; gap: 8px; }
.saved { font-size: 12px; color: var(--dim); }
.review-block { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.review-block b { color: var(--muted); font-size: 12px; display: block; }
.submit-wrap { text-align: center; margin-top: 18px; }

/* ── Letter / print ── */
.letter { background: #fbfcff; color: #0b1428; border-radius: 12px; padding: 34px 38px; font: 15px/1.65 Georgia, 'Times New Roman', serif; }
.letter h2 { font: 700 22px var(--font); color: #0b1a3d; }
.letter .hdr { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #1f5fd8; padding-bottom: 12px; margin-bottom: 18px; }
.letter .hdr img { width: 56px; }
.letter .meta { font: 13px var(--font); color: #44557a; }

/* ── Modal & toasts ── */
.modal-back { position: fixed; inset: 0; background: rgba(2, 6, 18, .72); backdrop-filter: blur(4px); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { width: min(620px, 100%); max-height: 92vh; overflow: auto; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); padding: 22px; }
.modal h3 { font-size: 18px; margin-bottom: 6px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 16px; box-shadow: var(--glow); transition: .4s; max-width: 380px; }
.toast-bad { border-color: rgba(255, 90, 103, .7); } .toast-ok { border-color: rgba(52, 210, 123, .7); }
.toast.out { opacity: 0; transform: translateY(8px); }
.ai-box { border: 1px solid rgba(139, 108, 255, .55); background: var(--violet-bg); border-radius: 12px; padding: 12px 14px; }
.ai-box .warn { font-size: 12px; color: #d9ceff; font-weight: 700; display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.ai-box pre { white-space: pre-wrap; font: 13.5px/1.55 var(--font); margin: 0; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: var(--cyan); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { height: 90px; border-radius: 14px; background: linear-gradient(90deg, rgba(47, 125, 246, .06), rgba(47, 125, 246, .16), rgba(47, 125, 246, .06)); background-size: 200% 100%; animation: sk 1.4s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ── Staff console ── */
.staff-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 59px); }
.side { border-right: 1px solid var(--line); background: rgba(4, 10, 28, .75); padding: 16px 12px; position: sticky; top: 59px; height: calc(100vh - 59px); overflow-y: auto; }
.side h5 { margin: 16px 10px 6px; font-size: 11px; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.side a:hover { background: rgba(47, 125, 246, .1); color: var(--text); text-decoration: none; }
.side a.on { background: rgba(47, 125, 246, .18); color: #fff; box-shadow: inset 2px 0 0 var(--cyan); }
.side .badge { margin-left: auto; font-size: 11px; background: var(--amber-bg); color: #ffd98a; border-radius: 999px; padding: 1px 8px; }
.role-chip { margin: 0 10px 8px; }
.work { padding: 22px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 18px; align-items: start; }
.sticky { position: sticky; top: 76px; }
.actionbar { display: flex; gap: 8px; flex-wrap: wrap; }
.rules-box { font-size: 12.5px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: rgba(8, 18, 44, .6); }
.rules-box .okc { color: var(--green); } .rules-box .noc { color: var(--amber); }
.intel-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-top: 3px solid; border-image: linear-gradient(90deg, var(--red), var(--violet), var(--blue)) 1; }
.money-top { margin-left: auto; display: flex; gap: 18px; text-align: right; }
.money-top small { display: block; color: var(--muted); font-size: 11px; } .money-top b { font: 700 18px var(--mono); }

@media (max-width: 1280px) {
  .shell { grid-template-columns: 270px minmax(0, 1fr); }
  .shell > .rail.right { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .case-grid { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding: 14px 16px 50px; }
  .rail { position: static; }
  .shell > .rail.left { order: 2; }
  .shell > .rail.right { order: 3; }
  .linkrow { flex-wrap: wrap; }
  .linkrow > input, .linkrow > select { flex: 1 1 180px; min-width: 0; }
  .steps, .feature-points { grid-template-columns: 1fr; }
  .steps { margin: 12px -18px 0; } .hero { padding: 22px 18px 0; } .tagline { display: none; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .counters { margin-left: 0; }
  .nav { display: none; } .nav.open { display: flex; position: absolute; top: 58px; left: 0; right: 0; flex-direction: column; background: var(--panel-solid); padding: 10px; border-bottom: 1px solid var(--line); }
  .top .menu-btn { display: inline-flex; }
  .staff-shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); display: none; }
  .side.open { display: block; }
  .work { padding: 14px 16px; }
  .msg { max-width: 92%; }
  .chat, .chat.tall { height: 70vh; }
  .letter { padding: 22px 18px; }
  .who .name { display: none; }
}
@media print {
  body { background: #fff; color: #000; }
  body::before, body::after, .top, .rail, .no-print, .tabs, #toasts { display: none !important; }
  .shell { display: block; padding: 0; }
  .panel { background: #fff; border: 1px solid #ccd; box-shadow: none; color: #000; backdrop-filter: none; break-inside: avoid; }
  .muted, .dim, .kv > div:nth-child(odd) { color: #445; }
  .letter { padding: 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.review-block, .msg, .row .sub, .kv > div { overflow-wrap: anywhere; }
a.stat { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.stat:hover { border-color: var(--line-strong); text-decoration: none; }
.stat.on { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 18px rgba(95, 212, 255, .25); }
