:root {
  color-scheme: dark;
  --bg:#050505;
  --bg-soft:#090a0b;
  --panel:#10100f;
  --panel-2:#151411;
  --panel-3:#1a1710;
  --line:#33270b;
  --line-soft:#24201a;
  --gold:#f8bd24;
  --gold-2:#ffdd6b;
  --gold-3:#8e6410;
  --ink:#f4f0e8;
  --muted:#a8a29a;
  --faint:#756f66;
  --green:#28d368;
  --blue:#2e91ff;
  --orange:#ff8a24;
  --red:#ff4e42;
  --shadow:0 18px 70px rgba(0,0,0,.55);
  --radius:8px;
}

* { box-sizing:border-box; }
html, body {
  min-height:100%;
  overflow-x:hidden;
}
body {
  margin:0;
  background:
    radial-gradient(circle at 8% 84%, rgba(248,189,36,.16), transparent 22%),
    radial-gradient(circle at 80% 6%, rgba(248,189,36,.08), transparent 26%),
    linear-gradient(180deg, #030303, #070604 62%, #030303);
  color:var(--ink);
  font:14px/1.45 "Aptos", "Segoe UI", "Noto Sans", "Liberation Sans", sans-serif;
  letter-spacing:0;
}

body[data-auth="ok"] {
  background:
    radial-gradient(circle at 2% 74%, rgba(248,189,36,.13), transparent 22%),
    radial-gradient(circle at 86% 4%, rgba(248,189,36,.08), transparent 24%),
    linear-gradient(180deg, #030303, #060606 48%, #030303);
}

body:after {
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
  opacity:.18;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size:42px 42px;
  mask-image:linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

body.busy button[data-action],
body.busy input,
body.busy select,
body.busy textarea {
  cursor:progress;
}

button, input, select, textarea {
  font:inherit;
  letter-spacing:0;
}

button {
  cursor:pointer;
  transition:border-color .14s ease, color .14s ease;
}

button:hover { transform:none; }

button:active,
button.action-running {
  filter:brightness(1.08);
  box-shadow:0 0 0 3px rgba(248,189,36,.12), inset 0 1px 8px rgba(0,0,0,.42);
}

button.action-running {
  position:relative;
  cursor:progress;
}

button.icon-only.action-running,
button.mini-button.action-running,
button.play-button.action-running,
button.icon-row-button.action-running {
  color:transparent !important;
}

button.action-running::after {
  content:"";
  width:14px;
  height:14px;
  margin-left:8px;
  border:2px solid rgba(255,255,255,.32);
  border-top-color:var(--gold);
  border-radius:50%;
  animation:buttonSpin .72s linear infinite;
}

button.icon-only.action-running::after,
button.mini-button.action-running::after,
button.play-button.action-running::after,
button.icon-row-button.action-running::after {
  position:absolute;
  inset:50% auto auto 50%;
  width:13px;
  height:13px;
  margin:0;
  transform:translate(-50%, -50%);
  border-width:1.5px;
}

@keyframes buttonSpin {
  to { transform:rotate(360deg); }
}

button:focus-visible {
  outline:2px solid rgba(248,189,36,.86);
  outline-offset:2px;
  box-shadow:0 0 0 4px rgba(248,189,36,.14);
}

.skip-link {
  position:absolute;
  left:14px;
  top:-48px;
  z-index:300;
  padding:10px 14px;
  border:1px solid rgba(248,189,36,.65);
  border-radius:8px;
  background:#080808;
  color:#ffd86a;
  font-weight:800;
  text-decoration:none;
  transition:top .16s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  top:14px;
  outline:2px solid rgba(248,189,36,.9);
  outline-offset:2px;
}

button:disabled {
  cursor:not-allowed;
  opacity:.48;
}

.login-field:focus-within,
.token-field:focus-within,
.search-box:focus-within,
.profile-search:focus-within,
.proxy-search:focus-within,
.masked-key:focus-within,
.webhook-line:focus-within {
  border-color:rgba(248,189,36,.72);
  box-shadow:0 0 0 3px rgba(248,189,36,.12);
}

.disabled-control {
  opacity:.58;
}

.disabled-control input {
  cursor:not-allowed;
}

.inline-warn {
  margin-bottom:12px;
  border-color:rgba(248,189,36,.24);
  background:rgba(248,189,36,.06);
}

input, select, textarea {
  width:100%;
  min-width:0;
  border:1px solid #2b2b2b;
  background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  color:var(--ink);
  border-radius:var(--radius);
  padding:10px 12px;
  outline:none;
}

textarea {
  min-height:120px;
  resize:vertical;
}

input:focus, select:focus, textarea:focus {
  border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(248,189,36,.14);
}

label {
  display:grid;
  gap:7px;
  color:#d6d0c5;
}

small { color:var(--muted); }

.login-screen {
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(390px, 560px) minmax(680px, 1fr);
  gap:28px;
  padding:44px 60px;
  position:relative;
  z-index:1;
}

body[data-auth="ok"] .login-screen { display:none; }
body:not([data-auth="ok"]) .app-shell { display:none; }

.login-card,
.login-hero,
.profile-modal,
.panel,
.metric-card,
.table-card,
.side-card,
.form-card,
.kanban-column,
.settings-card {
  border:1px solid rgba(248,189,36,.24);
  background:
    linear-gradient(180deg, rgba(255,255,255,.038), rgba(255,255,255,.01)),
    linear-gradient(135deg, rgba(22,20,16,.92), rgba(5,5,5,.97));
  border-radius:10px;
  box-shadow:var(--shadow), inset 0 1px 0 rgba(255,255,255,.045);
}

.login-card {
  display:grid;
  align-content:center;
  gap:22px;
  padding:48px 54px;
  min-height:calc(100vh - 88px);
}

.login-brand,
.brand-block {
  display:flex;
  align-items:center;
  gap:12px;
}

.login-brand {
  flex-direction:column;
  text-align:center;
  margin-bottom:16px;
}

.login-brand img {
  width:min(370px, 100%);
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 0 22px rgba(248,189,36,.34));
}

.login-brand strong,
.brand-block strong {
  color:var(--gold-2);
  font-weight:900;
  font-size:30px;
  line-height:1;
}

.login-brand span,
.brand-block span {
  color:#c99a24;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
}

.login-card h1 {
  margin:0;
  text-align:center;
  font-size:34px;
}

.login-card p {
  margin:0;
  color:#c7c0b6;
  text-align:center;
  max-width:430px;
}

.token-field {
  display:grid;
  grid-template-columns:1fr 54px;
  gap:8px;
}

.login-error {
  min-height:22px;
  max-height:46px;
  overflow:auto;
  word-break:break-word;
  font-size:12px;
  color:var(--red);
}

.login-hero {
  position:relative;
  overflow:hidden;
  padding:64px 62px;
  min-height:calc(100vh - 88px);
  background:
    linear-gradient(90deg, rgba(4,4,4,.98), rgba(4,4,4,.72) 44%, rgba(4,4,4,.08)),
    radial-gradient(circle at 76% 48%, rgba(248,189,36,.26), transparent 25%),
    image-set(url("/dashboard/phantompass-ghost.webp") type("image/webp"), url("/dashboard/phantompass-ghost.png") type("image/png")) right 7% bottom 7% / min(760px, 58vw) auto no-repeat,
    linear-gradient(135deg, #030303, #0d0b06 58%, #030303);
}

.login-hero:before,
.side-nav:before {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.28;
  background-image:
    linear-gradient(rgba(248,189,36,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248,189,36,.09) 1px, transparent 1px);
  background-size:64px 64px;
  mask-image:radial-gradient(circle at 70% 30%, #000, transparent 72%);
}

.hero-copy {
  position:relative;
  z-index:2;
  max-width:620px;
}

.mobile-visual-copy {
  display:none;
}

.hero-copy h2 {
  margin:0 0 18px;
  font:800 48px/1.12 Georgia, "Times New Roman", serif;
}

.hero-copy h2 span {
  color:var(--gold-2);
}

.hero-copy p {
  margin:0;
  color:#beb6aa;
  font-size:18px;
}

.phantom-scene {
  display:none;
}

.orbit {
  position:absolute;
  border:1px solid rgba(248,189,36,.42);
  border-radius:50%;
  filter:drop-shadow(0 0 12px rgba(248,189,36,.25));
}

.orbit-a { inset:8% 6% 18% 12%; transform:rotate(-12deg); }
.orbit-b { inset:22% 0 4% 0; transform:rotate(27deg); }

.hooded-figure {
  position:absolute;
  inset:8% 10% 0 14%;
}

.hood {
  position:absolute;
  left:24%;
  top:4%;
  width:50%;
  height:62%;
  background:linear-gradient(135deg, #f4bf28 0 10%, #171511 26%, #050505 78%);
  clip-path:polygon(50% 0, 83% 17%, 100% 63%, 78% 100%, 22% 100%, 0 63%, 17% 17%);
  filter:drop-shadow(0 0 18px rgba(248,189,36,.55));
}

.visor {
  position:absolute;
  left:38%;
  top:32%;
  width:22%;
  height:7%;
  background:var(--gold-2);
  border-radius:40% 40% 55% 55%;
  box-shadow:0 0 20px rgba(248,189,36,.85);
}

.shield {
  position:absolute;
  left:31%;
  top:51%;
  width:38%;
  height:40%;
  background:linear-gradient(135deg, #1a1408, #050505);
  border:3px solid var(--gold);
  border-radius:18px 18px 60px 60px;
  box-shadow:0 0 28px rgba(248,189,36,.36);
}

.feature-strip {
  position:absolute;
  left:38px;
  right:38px;
  bottom:32px;
  z-index:2;
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.feature-strip span {
  border:1px solid rgba(248,189,36,.22);
  border-radius:var(--radius);
  padding:18px 16px;
  background:linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018)), rgba(0,0,0,.46);
  color:#e7dac4;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

.pct-0 { width:0%; }
.pct-5 { width:5%; }
.pct-10 { width:10%; }
.pct-15 { width:15%; }
.pct-20 { width:20%; }
.pct-25 { width:25%; }
.pct-30 { width:30%; }
.pct-35 { width:35%; }
.pct-40 { width:40%; }
.pct-45 { width:45%; }
.pct-50 { width:50%; }
.pct-55 { width:55%; }
.pct-60 { width:60%; }
.pct-65 { width:65%; }
.pct-70 { width:70%; }
.pct-75 { width:75%; }
.pct-80 { width:80%; }
.pct-85 { width:85%; }
.pct-90 { width:90%; }
.pct-95 { width:95%; }
.pct-100 { width:100%; }

.palette-0 { background:var(--green); }
.palette-1 { background:var(--blue); }
.palette-2 { background:var(--gold); }
.palette-3 { background:var(--orange); }
.palette-4 { background:var(--red); }
.palette-5 { background:#b7b0a6; }
