/* ============================================================
   Telesphire Gateway Console — design system
   Navy + gold brand, Inter type, light console / dark auth
   ============================================================ */
:root {
  --navy-900: #070f1f;
  --navy-800: #0b1d38;
  --navy-700: #0e2347;
  --navy-600: #0f2d5e;
  --navy-550: #162d58;
  --gold: #e6a817;
  --gold-lite: #f5c842;
  --gold-dark: #d4930e;
  --blue: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --sky: #0ea5e9;
  --purple: #8b5cf6;
  --green: #22c55e;
  --green-600: #16a34a;
  --amber: #f59e0b;
  --red: #ef4444;
  --red-300: #f87171;

  --bg: #f0f4fa;
  --ink: #0f1e35;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;

  --card: #fff;
  --line: #d8e2f0;
  --line-2: #dce6f0;
  --line-3: #eef2f9;
  --gold-grad: linear-gradient(135deg, #e6a817 0%, #f5c842 50%, #d4930e 100%);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'SF Mono', 'Fira Code', ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100,116,139,.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,.45); }

@keyframes spin { from { transform: rotate(0) } to { transform: rotate(360deg) } }
@keyframes livePulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,.4) } 50% { opacity: .6; box-shadow: 0 0 0 4px rgba(34,197,94,0) } }

/* ============================================================
   LOGIN
   ============================================================ */
.auth {
  min-height: 100vh; display: flex; overflow: hidden; position: relative;
  background: linear-gradient(135deg, #070f1f 0%, #0b1d38 45%, #0e2550 100%);
}
.auth .orb { position: absolute; border-radius: 50%; pointer-events: none; }
.auth .orb-1 { top: -15%; left: 50%; transform: translateX(-50%); width: 700px; height: 700px; background: radial-gradient(circle, rgba(230,168,23,.08) 0%, transparent 60%); }
.auth .orb-2 { bottom: -20%; left: -10%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(59,130,246,.07) 0%, transparent 60%); }
.auth .orb-3 { bottom: -10%; right: -5%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(230,168,23,.05) 0%, transparent 60%); }
.auth .grid { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px; }

.auth-brand { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 40px; position: relative; z-index: 1; }
.logo-badge {
  border-radius: 32px; background: radial-gradient(circle at 40% 35%, #1a3d6e, #0b1d38);
  border: 1px solid rgba(230,168,23,.45);
  box-shadow: 0 0 60px rgba(230,168,23,.18), 0 0 120px rgba(230,168,23,.06), inset 0 1px 0 rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
}
.logo-badge.lg { width: 160px; height: 160px; margin-bottom: 32px; }
.logo-badge.lg img { width: 130px; height: 130px; object-fit: contain; }
.brand-name { font-size: 2.4rem; font-weight: 900; color: #fff; letter-spacing: -.04em; line-height: 1.1; margin-bottom: 6px; }
.brand-name .tld { color: var(--gold); font-size: 1rem; font-weight: 700; vertical-align: super; letter-spacing: .04em; }
.brand-tag { font-size: .72rem; font-weight: 700; color: rgba(230,168,23,.65); letter-spacing: .22em; text-transform: uppercase; margin-bottom: 20px; }
.brand-pill { display: inline-block; padding: 6px 18px; border-radius: 20px; background: rgba(230,168,23,.08); border: 1px solid rgba(230,168,23,.2); font-size: .72rem; font-weight: 600; color: rgba(230,168,23,.7); letter-spacing: .14em; text-transform: uppercase; }
.brand-center { text-align: center; }

.feature-list { margin-top: 56px; display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px; }
.feature { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.feature .fi { font-size: 1.1rem; color: var(--gold); line-height: 1; }
.feature .fl { font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.75); }
.feature .fs { font-size: .68rem; color: rgba(255,255,255,.3); margin-top: 1px; }

.auth-divider { width: 1px; flex-shrink: 0; position: relative; z-index: 1; background: linear-gradient(180deg, transparent 10%, rgba(255,255,255,.07) 40%, rgba(255,255,255,.07) 60%, transparent 90%); }

.auth-form-wrap { width: 460px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 52px; position: relative; z-index: 1; }
.auth-form-inner { width: 100%; }
.auth-title { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -.03em; margin-bottom: 8px; }
.auth-sub { font-size: .8rem; color: rgba(255,255,255,.35); line-height: 1.5; margin-bottom: 36px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field-label { display: block; font-size: .72rem; font-weight: 600; color: rgba(255,255,255,.45); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.auth-input {
  width: 100%; padding: 13px 16px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: #fff;
  font-family: var(--font); font-size: .88rem; outline: none;
  transition: border .18s, box-shadow .18s;
}
.auth-input::placeholder { color: rgba(255,255,255,.28); }
.auth-input:focus { border-color: rgba(230,168,23,.5); box-shadow: 0 0 0 3px rgba(230,168,23,.1); }
.auth-error { font-size: .75rem; color: var(--red-300); padding: 10px 14px; border-radius: 8px; background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); }
.btn-gold {
  border: none; cursor: pointer; color: #fff; font-family: var(--font); font-weight: 800;
  background: var(--gold-grad); border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(230,168,23,.16), 0 8px 28px rgba(230,168,23,.4);
  text-shadow: 0 1px 2px rgba(0,0,0,.2); transition: all .25s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-gold:hover { filter: brightness(1.05); }
.btn-gold:disabled { background: rgba(230,168,23,.3); color: rgba(255,255,255,.5); box-shadow: none; cursor: not-allowed; }
.auth-submit { margin-top: 8px; padding: 15px; font-size: .9rem; width: 100%; }
.auth-foot { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.07); font-size: .68rem; color: rgba(255,255,255,.2); text-align: center; line-height: 1.7; }

/* ============================================================
   CONSOLE SHELL
   ============================================================ */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
  background: linear-gradient(180deg, #0b1d38 0%, #0e2347 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: 4px 0 24px rgba(11,29,56,.22);
  display: flex; flex-direction: column; overflow: hidden;
  transition: width .25s cubic-bezier(.4,0,.2,1);
}
body.side-collapsed .sidebar { width: 64px; }
.side-logo { padding: 22px 20px; border-bottom: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-badge.sm { width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; box-shadow: 0 0 22px rgba(230,168,23,.2), inset 0 1px 0 rgba(255,255,255,.07); }
.logo-badge.sm img { width: 40px; height: 40px; object-fit: contain; }
.side-logo-text { overflow: hidden; }
.side-logo-text .n { font-size: 1rem; font-weight: 800; color: #fff; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.side-logo-text .n .tld { color: var(--gold); font-size: .58rem; font-weight: 600; vertical-align: super; letter-spacing: .04em; }
.side-logo-text .s { font-size: .6rem; font-weight: 600; color: rgba(230,168,23,.65); letter-spacing: .18em; text-transform: uppercase; margin-top: 1px; white-space: nowrap; }
body.side-collapsed .side-logo-text { display: none; }

.side-nav { flex: 1; padding: 16px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.nav-group-label { font-size: .6rem; font-weight: 700; color: rgba(255,255,255,.2); letter-spacing: .18em; text-transform: uppercase; padding: 0 8px; margin: 12px 0 6px; }
.nav-group:first-child .nav-group-label { margin-top: 0; }
body.side-collapsed .nav-group-label { display: none; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  border: none; cursor: pointer; background: transparent; color: rgba(255,255,255,.42);
  font-family: var(--font); font-size: .82rem; font-weight: 500; text-align: left; position: relative;
  transition: all .15s;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: rgba(255,255,255,.7); }
.nav-item.active { background: rgba(230,168,23,.12); color: var(--gold); font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px; border-radius: 0 2px 2px 0; background: var(--gold); box-shadow: 0 0 8px rgba(230,168,23,.6); }
.nav-item svg { flex-shrink: 0; }
body.side-collapsed .nav-item { justify-content: center; padding: 10px; }
body.side-collapsed .nav-item .nav-label { display: none; }

.side-foot { border-top: 1px solid rgba(255,255,255,.06); padding: 12px; }
.side-collapse-btn {
  width: 100%; display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  padding: 6px 8px; border-radius: 8px; border: none; background: transparent; color: rgba(255,255,255,.25);
  cursor: pointer; font-size: .72rem; font-family: var(--font); transition: all .15s;
}
.side-collapse-btn:hover { background: rgba(255,255,255,.05); color: rgba(255,255,255,.5); }
body.side-collapsed .side-collapse-btn { justify-content: center; }
body.side-collapsed .side-collapse-btn span { display: none; }
.side-collapse-btn svg { transition: transform .25s; }
body.side-collapsed .side-collapse-btn svg { transform: rotate(180deg); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px 8px 4px; }
body.side-collapsed .side-user { display: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #3b82f6); display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; color: #fff; flex-shrink: 0; text-transform: uppercase; }
.side-user .su-name { overflow: hidden; }
.side-user .su-out { margin-left: auto; }
.side-user .u { font-size: .75rem; font-weight: 600; color: rgba(255,255,255,.75); white-space: nowrap; }
.side-user .r { font-size: .62rem; color: rgba(255,255,255,.3); white-space: nowrap; text-transform: capitalize; }
.signout-btn { margin-left: auto; padding: 4px 9px; border-radius: 6px; border: 1px solid rgba(239,68,68,.3); background: rgba(239,68,68,.07); color: var(--red-300); font-family: var(--font); font-size: .68rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.signout-btn:hover { background: rgba(239,68,68,.14); }

.main { flex: 1; margin-left: 240px; transition: margin-left .25s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; min-width: 0; }
body.side-collapsed .main { margin-left: 64px; }

.topbar { height: 56px; background: rgba(240,244,250,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; padding: 0 36px; position: sticky; top: 0; z-index: 40; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: .78rem; }
.crumbs .c0 { color: var(--slate-500); font-weight: 500; }
.crumbs .sep { color: var(--slate-300); }
.crumbs .c1 { color: var(--ink); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.live-badge { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 20px; background: #f0fdf4; border: 1px solid #bbf7d0; }
.live-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: livePulse 2s infinite; }
.live-badge .t { font-size: .68rem; font-weight: 700; color: var(--green-600); letter-spacing: .05em; }
.clock { font-size: .72rem; color: var(--slate-400); }

.content { flex: 1; padding: 32px 36px; display: flex; flex-direction: column; gap: 22px; }
.foot { padding: 16px 36px; border-top: 1px solid var(--line-2); font-size: .68rem; color: #b0bdd0; font-weight: 500; letter-spacing: .04em; }

/* ============================================================
   CARDS
   ============================================================ */
.card { background: var(--card); border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(15,34,65,.04), 0 8px 28px rgba(15,34,65,.05); overflow: hidden; }
.card-head { padding: 20px 28px; border-bottom: 1px solid var(--line-3); display: flex; align-items: flex-start; gap: 12px; }
.card-ic { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-ic.blue { background: #eff6ff; border: 1px solid #bfdbfe; color: var(--blue); }
.card-ic.purple { background: #faf5ff; border: 1px solid #e9d5ff; color: var(--purple); }
.card-ic.green { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--green); }
.card-ic.gold { background: rgba(230,168,23,.1); border: 1px solid rgba(230,168,23,.25); color: var(--gold-dark); }
.card-title { font-size: .92rem; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.card-desc { font-size: .75rem; color: var(--slate-500); margin-top: 2px; line-height: 1.5; }
.card-body { padding: 20px 28px; }
.card-body.flush { padding: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* ============================================================
   MATRIX HERO
   ============================================================ */
.hero { border-radius: 20px; overflow: hidden; position: relative; background: linear-gradient(135deg, #0b1d38 0%, #0f2d5e 55%, #162d58 100%); box-shadow: 0 20px 60px rgba(11,29,56,.25), 0 4px 16px rgba(11,29,56,.12); }
.hero .grid-tex { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 40px 40px; }
.hero .glow-1 { position: absolute; right: 5%; top: -40%; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(230,168,23,.12) 0%, transparent 65%); pointer-events: none; }
.hero .glow-2 { position: absolute; left: -5%; bottom: -50%; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(59,130,246,.09) 0%, transparent 65%); pointer-events: none; }
.hero-head { padding: 28px 36px 0; position: relative; z-index: 1; }
.hero-status { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.hero-status .d { width: 8px; height: 8px; border-radius: 50%; }
.hero-status .d.warn { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.hero-status .d.ok { background: var(--green); box-shadow: 0 0 8px var(--green); }
.hero-status .d.bad { background: var(--red); box-shadow: 0 0 8px var(--red); }
.hero-status .l { font-size: .68rem; font-weight: 700; color: rgba(230,168,23,.7); letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1.2; }
.hero .lead { margin: 8px 0 0; font-size: .8rem; color: rgba(255,255,255,.38); line-height: 1.6; max-width: 480px; }

.stat-row { padding: 24px 36px; display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; position: relative; z-index: 1; }
.stat { padding: 18px 20px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); position: relative; overflow: hidden; }
.stat .v { font-size: 2rem; font-weight: 800; color: #fff; letter-spacing: -.04em; line-height: 1; margin-bottom: 8px; }
.stat .v.empty { color: rgba(255,255,255,.15); }
.stat .l { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.stat.blue .l { color: var(--blue); } .stat.blue::after { background: radial-gradient(circle at 80% 20%, rgba(59,130,246,.05) 0%, transparent 60%); }
.stat.purple .l { color: var(--purple); } .stat.purple::after { background: radial-gradient(circle at 80% 20%, rgba(139,92,246,.05) 0%, transparent 60%); }
.stat.sky .l { color: var(--sky); } .stat.sky::after { background: radial-gradient(circle at 80% 20%, rgba(14,165,233,.05) 0%, transparent 60%); }
.stat.slate .l { color: var(--slate-400); } .stat.slate::after { background: radial-gradient(circle at 80% 20%, rgba(148,163,184,.05) 0%, transparent 60%); }
.stat::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.stat .v.mono { font-size: 1rem; font-family: var(--mono); font-weight: 700; }

.cta-row { margin: 0 36px 36px; padding: 26px 30px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(230,168,23,.2); display: flex; align-items: center; justify-content: space-between; gap: 32px; position: relative; z-index: 1; }
.cta-left { display: flex; align-items: center; gap: 16px; }
.cta-ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: rgba(230,168,23,.12); border: 1px solid rgba(230,168,23,.25); display: flex; align-items: center; justify-content: center; color: var(--gold); }
.cta-title { font-size: .95rem; font-weight: 700; color: #fff; letter-spacing: -.01em; margin-bottom: 4px; }
.cta-desc { font-size: .75rem; color: rgba(255,255,255,.35); line-height: 1.55; }
.cta-btn { flex-shrink: 0; padding: 14px 34px; font-size: .85rem; min-width: 220px; }
.cta-btn.ok { background: linear-gradient(135deg, #16a34a, #15803d); box-shadow: none; }
.cta-btn:disabled { background: rgba(230,168,23,.2); }
.hero-alert-wrap { margin-top: -16px; padding: 14px 36px 24px; position: relative; z-index: 1; }
.hero-alert { border-radius: 10px; padding: 11px 16px; font-size: .77rem; display: flex; align-items: center; gap: 10px; line-height: 1.5; }
.hero-alert.warn { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); border-left: 3px solid var(--amber); color: rgba(255,255,255,.55); }
.hero-alert.bad { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.28); border-left: 3px solid var(--red); color: rgba(255,255,255,.6); }
.hero-alert.ok { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.28); border-left: 3px solid var(--green); color: rgba(255,255,255,.6); }
.hero-alert .mono { color: rgba(255,255,255,.8); }

/* ============================================================
   ENDPOINT + STATUS CARDS
   ============================================================ */
.endpoint { display: flex; border-radius: 10px; border: 1px solid #dce4f0; overflow: hidden; background: #f6f9ff; }
.endpoint .url { flex: 1; padding: 13px 18px; font-family: var(--mono); font-size: .85rem; color: var(--blue-700); font-weight: 500; overflow-x: auto; white-space: nowrap; }
.endpoint .copy { padding: 13px 18px; border: none; border-left: 1px solid #dce4f0; background: #eef4ff; color: var(--blue-700); font-family: var(--font); font-size: .72rem; font-weight: 700; cursor: pointer; transition: all .15s; min-width: 70px; display: flex; align-items: center; gap: 5px; }
.endpoint .copy:hover { background: #e0eaff; }
.endpoint .copy.copied { background: #f0fdf4; color: var(--green-600); }
.endpoint-meta { margin-top: 10px; font-size: .71rem; color: var(--slate-400); }
.endpoint-meta strong { color: var(--slate-600); font-weight: 600; }

.status-list { display: flex; flex-direction: column; gap: 10px; }
.status-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-radius: 9px; background: #f8faff; border: 1px solid var(--line-3); }
.status-row .sl { font-size: .78rem; color: var(--slate-600); font-weight: 500; }
.status-row .sr { display: flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 600; }
.status-row .sr .d { width: 6px; height: 6px; border-radius: 50%; }
.d-ok { background: var(--green); box-shadow: 0 0 5px var(--green); } .t-ok { color: var(--green); }
.d-warn { background: var(--amber); box-shadow: 0 0 5px var(--amber); } .t-warn { color: var(--amber); }
.d-bad { background: var(--red); box-shadow: 0 0 5px var(--red); } .t-bad { color: var(--red); }

/* ============================================================
   MATRIX TABLE
   ============================================================ */
.table-scroll { overflow-x: auto; }
table.matrix { width: 100%; border-collapse: collapse; font-size: .78rem; }
table.matrix thead tr { background: #f6f9ff; }
table.matrix th { padding: 11px 12px; text-align: center; font-size: .65rem; font-weight: 600; color: var(--slate-400); letter-spacing: .08em; border-bottom: 2px solid var(--line-3); }
table.matrix th.port-h { text-align: left; padding: 11px 28px; font-weight: 700; color: var(--blue-700); letter-spacing: .12em; text-transform: uppercase; width: 76px; }
table.matrix td { padding: 8px 12px; text-align: center; color: var(--ink); font-size: .74rem; border-bottom: 1px solid #f1f5fb; font-family: var(--mono); }
table.matrix td.port { padding: 8px 28px; text-align: left; font-weight: 700; color: var(--blue-700); font-size: .76rem; font-family: var(--font); }
table.matrix td.empty { color: #cbd7e6; }
table.matrix tbody tr:hover { background: #f6f9ff; }

/* ============================================================
   BUTTONS / BADGES / ALERTS (console)
   ============================================================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 10px; cursor: pointer; font-family: var(--font); font-weight: 700; font-size: .82rem; padding: 11px 18px; transition: all .18s; }
.btn.gold { color: #fff; background: var(--gold-grad); box-shadow: 0 0 0 4px rgba(230,168,23,.16), 0 8px 24px rgba(230,168,23,.35); text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.btn.gold:hover { filter: brightness(1.05); }
.btn.gold:disabled { background: rgba(230,168,23,.25); color: rgba(255,255,255,.6); box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--slate-600); box-shadow: 0 1px 2px rgba(15,34,65,.04); }
.btn.ghost:hover { background: #f6f9ff; }
.btn.danger { background: #fff; border: 1px solid #fecaca; color: #dc2626; }
.btn.danger:hover { background: #fef2f2; }
.btn.ok-solid { background: linear-gradient(135deg,#16a34a,#15803d); color: #fff; }
.btn.sm { padding: 7px 12px; font-size: .72rem; border-radius: 8px; }
.spinner { animation: spin .8s linear infinite; }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .02em; }
.badge.role { background: #eff6ff; color: var(--blue-700); border: 1px solid #bfdbfe; }
.badge.ok { background: #f0fdf4; color: var(--green-600); border: 1px solid #bbf7d0; }
.badge.bad { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge.muted { background: #f1f5f9; color: var(--slate-500); border: 1px solid #e2e8f0; }

.flash { border-radius: 10px; padding: 12px 16px; font-size: .8rem; margin-bottom: 4px; }
.flash.ok { background: #f0fdf4; color: var(--green-600); border: 1px solid #bbf7d0; }
.flash.bad { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* forms in console */
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; }
.form-field label { display: block; font-size: .7rem; font-weight: 600; color: var(--slate-500); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 7px; }
.form-field input, .form-field select { width: 100%; padding: 10px 13px; border-radius: 9px; border: 1px solid var(--line); background: #f8faff; color: var(--ink); font-family: var(--font); font-size: .85rem; outline: none; transition: border .15s, box-shadow .15s; }
.form-field input:focus, .form-field select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(230,168,23,.12); background: #fff; }

/* users table */
table.data { width: 100%; border-collapse: collapse; font-size: .82rem; }
table.data th { text-align: left; padding: 11px 20px; font-size: .65rem; font-weight: 700; color: var(--slate-400); letter-spacing: .1em; text-transform: uppercase; background: #f6f9ff; border-bottom: 2px solid var(--line-3); }
table.data td { padding: 12px 20px; border-bottom: 1px solid #f1f5fb; color: var(--slate-600); vertical-align: middle; }
table.data td.mono { font-family: var(--mono); font-size: .76rem; color: var(--slate-400); }
table.data tbody tr:hover { background: #f8faff; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.inline-form { display: inline; }

/* dropzone */
.dropzone { border: 2px dashed var(--line); border-radius: 14px; padding: 30px 18px; text-align: center; cursor: pointer; background: #f8faff; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus { border-color: var(--gold); outline: none; }
.dropzone.drag { border-color: var(--gold); background: rgba(230,168,23,.06); }
.dropzone.busy { opacity: .6; pointer-events: none; }
.dropzone .dz-icon { font-size: 26px; color: var(--gold-dark); }
.dropzone .dz-main { font-weight: 700; margin-top: 8px; color: var(--ink); font-size: .88rem; }
.dropzone .dz-sub { color: var(--slate-400); font-size: .76rem; margin-top: 3px; }
.upload-status { margin-top: 12px; font-size: .8rem; min-height: 1.2em; }
.upload-status.ok { color: var(--green-600); }
.upload-status.bad { color: #dc2626; }
.upload-status.warn { color: var(--amber); }

/* placeholder */
.placeholder { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 400px; }
.placeholder .inner { text-align: center; max-width: 340px; }
.placeholder .pic { width: 72px; height: 72px; border-radius: 20px; background: linear-gradient(135deg,#eff6ff,#dbeafe); border: 1px solid #bfdbfe; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: var(--blue); }
.placeholder .pt { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.placeholder .pd { font-size: .82rem; color: var(--slate-400); line-height: 1.6; }
.placeholder .pill { margin-top: 20px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line-2); font-size: .72rem; color: var(--slate-400); font-weight: 500; }

.mono { font-family: var(--mono); }
.section-title { font-size: 1rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.mt-16 { margin-top: 16px; }
table.data th.right { text-align: right; }
table.data td .row-actions { justify-content: flex-end; }

/* error page */
.error-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg,#070f1f,#0b1d38); }
.error-card { background: var(--card); border-radius: 18px; padding: 34px; max-width: 420px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.error-card .logo-center { margin: 0 auto 18px; }
.error-card h1 { font-size: 1.2rem; margin: 0 0 8px; }
.error-card p { color: var(--slate-500); font-size: .85rem; margin: 0 0 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .auth { flex-direction: column; }
  .auth-brand { display: none; }
  .auth-divider { display: none; }
  .auth-form-wrap { width: 100%; }
  .grid-2 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-btn { width: 100%; }
}
