/* TALON brand fonts — self-hosted (CSP blocks fonts.googleapis.com).
   Latin subset only; weights 500/700 share one variable-font file each. */
@font-face{
    font-family:'Space Grotesk';font-style:normal;font-weight:500 700;font-display:swap;
    src:url('/assets/fonts/space-grotesk-latin.woff2') format('woff2');
  }
@font-face{
    font-family:'JetBrains Mono';font-style:normal;font-weight:500 700;font-display:swap;
    src:url('/assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  }
  :root{
    --bg:#0a0e15; --panel:#111824; --border:#1e2a3a; --text:#e8edf4; --muted:#8b97a8;
    --pos:#34d399; --neg:#fb7185; --neu:#a3a3a3; --link:#60a5fa; --focus:#93c5fd;
    /* "Aurora" brand spectrum — blue→violet, promoted from the AI accent. */
    --brand-1:#6f97ff; --brand-2:#b388ff;
    --brand-grad:linear-gradient(90deg,var(--brand-1),var(--brand-2));
    --font-display:'Space Grotesk',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
    --font-mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  }
  body.light{
    --bg:#eef1f7; --panel:#ffffff; --border:#e2e6ee; --text:#141a24; --muted:#5d6b7e;
    --pos:#16a34a; --neg:#dc2626; --neu:#4b5563; --link:#2563eb; --focus:#1d4ed8;
    --brand-1:#3b5bdb; --brand-2:#7c3aed;
  }
  *{box-sizing:border-box}
  .brand-logo{height:30px;width:auto;display:block}
  body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;transition:background .2s,color .2s}
  h1,h2,h3,.brand h1,.section-head h2,.page-title,.tile-title{font-family:var(--font-display);letter-spacing:-.01em}
  .mono,.delta,code{font-family:var(--font-mono);font-feature-settings:"tnum" 1}
  .wrap{max-width:1200px;margin:0 auto;padding:18px}
  .topbar{position:sticky;top:0;z-index:50;background:linear-gradient(180deg,rgba(10,15,22,.98),rgba(10,15,22,.82));
    border-bottom:1px solid rgba(31,42,55,.9);backdrop-filter:blur(10px)}
  body.light .topbar{background:linear-gradient(180deg,rgba(249,250,251,.98),rgba(249,250,251,.92));border-bottom:1px solid var(--border)}
  .topbar-inner{max-width:1200px;margin:0 auto;padding:12px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px}
  .brand{display:flex;align-items:center;gap:10px;min-width:240px}
  .logo{width:34px;height:34px;border-radius:12px;border:1px solid rgba(255,255,255,.12);
    background:radial-gradient(circle at 30% 30%,rgba(96,165,250,.55),rgba(96,165,250,.08));
    box-shadow:0 10px 25px rgba(0,0,0,.35)}
  body.light .logo{border-color:rgba(15,23,42,.08);box-shadow:0 10px 20px rgba(148,163,184,.4)}
  .brand h1{margin:0;font-size:18px;letter-spacing:.2px;line-height:1.1}
  .brand .sub{font-size:12px;color:var(--muted);margin-top:2px}
  .top-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
  .pill{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border-radius:999px;border:1px solid var(--border);
    background:rgba(255,255,255,.05);font-size:12px;color:var(--text);white-space:nowrap}
  body.light .pill{background:rgba(255,255,255,.9)}
  .btn,a.btn{display:inline-flex;align-items:center;gap:8px;color:var(--text);text-decoration:none;padding:8px 10px;
    border:1px solid var(--border);border-radius:999px;background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.02));
    box-shadow:0 10px 25px rgba(0,0,0,.15);cursor:pointer;font-size:13px}
  body.light .btn,body.light a.btn{background:linear-gradient(180deg,rgba(255,255,255,1),rgba(248,250,252,1));box-shadow:0 8px 16px rgba(148,163,184,.35)}
  .btn:hover,a.btn:hover{border-color:#2b3a4b;filter:brightness(1.03)}
  body.light .btn:hover,body.light a.btn:hover{border-color:#9ca3af;filter:brightness(1.01)}
  .btn:focus,a.btn:focus{outline:2px solid var(--focus);outline-offset:2px}
  /* Primary = solid aurora brand gradient. Dark theme's gradient is light, so it
     takes dark ink; light theme's gradient is deep, so it takes white text. */
  .btn.primary{background:var(--brand-grad);border-color:transparent;color:#0a0e15;font-weight:700}
  body.light .btn.primary{background:var(--brand-grad);border-color:transparent;color:#fff}
  .btn.primary:hover,body.light .btn.primary:hover{filter:brightness(1.07);border-color:transparent}
  .btn.link{background:transparent;box-shadow:none;border-color:rgba(255,255,255,.12);color:var(--link)}
  body.light .btn.link{border-color:rgba(15,23,42,.12)}
  .btn.link:hover{text-decoration:underline;filter:none}
  .btn:disabled,.btn[disabled]{opacity:.5;cursor:not-allowed}
  .card{position:relative;border:1px solid var(--border);border-radius:16px;padding:14px;margin:14px 0;
    background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.015));box-shadow:0 14px 30px rgba(0,0,0,.28)}
  body.light .card{background:#ffffff;box-shadow:0 10px 24px rgba(148,163,184,.35)}
  /* Brand accent bar across the top of content cards. Hero card is excluded —
     it owns its ::before for the TALON logo watermark (see layout_start.php). */
  .card:not(.page-hero-card)::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;
    border-radius:16px 16px 0 0;background:var(--brand-grad);opacity:.9;pointer-events:none}
  .muted{color:var(--muted)}
  .error{background:rgba(248,113,113,.10);border:1px solid rgba(248,113,113,.25);color:#fecaca;padding:12px;border-radius:14px;margin:14px 0}
  table{border-collapse:collapse;width:100%;overflow:hidden;border-radius:16px}
  th,td{border:1px solid var(--border);padding:10px;vertical-align:top}
  th{background:linear-gradient(90deg,rgba(111,151,255,.10),rgba(179,136,255,.04));text-align:left;font-weight:800;letter-spacing:.2px}
  body.light th{background:linear-gradient(90deg,rgba(59,91,219,.08),rgba(124,58,237,.03))}
  tbody tr:nth-child(odd) td:not(.cell-warn){background:rgba(255,255,255,.015)}
  tbody tr:nth-child(even) td:not(.cell-warn){background:rgba(255,255,255,.03)}
  tbody tr:hover td:not(.cell-warn){background:rgba(96,165,250,.08)}

  body.light tbody tr:nth-child(odd) td:not(.cell-warn){background:#ffffff}
  body.light tbody tr:nth-child(even) td:not(.cell-warn){background:#f9fafb}
  body.light tbody tr:hover td:not(.cell-warn){background:#e5f0ff}
  a{color:var(--link);text-decoration:none}
  a:hover{text-decoration:underline}
  .delta{font-weight:900}
  .delta.pos{color:var(--pos)} .delta.neg{color:var(--neg)} .delta.neu{color:var(--neu)}
  .cell-warn{background:rgba(234,179,8,.24)}
  body.light .cell-warn{background:rgba(250,204,21,.32)}
  .section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:16px 0 10px}
  .section-head h2{margin:0;font-size:18px}
  .chart-wrap{padding:12px;border:1px solid var(--border);border-radius:16px;background:rgba(255,255,255,.02)}
  body.light .chart-wrap{background:#ffffff}
  canvas{width:100%;height:340px;display:block}
  select,input,button{background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:12px;padding:8px 10px}
  body.light select,body.light input,body.light button{background:#ffffff}
  select:focus,input:focus,button:focus{outline:2px solid var(--focus);outline-offset:2px}
  .tag-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:11px;border:1px solid var(--border);background:rgba(255,255,255,.05)}
  code{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.10);padding:2px 6px;border-radius:8px;color:var(--text);font-size:11px}

  /* Filters card layout (matches dashboard_view.php style) */
  .filters-row{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
  .filters-row label{font-size:12px;color:var(--muted);display:block;margin-bottom:4px}
  .filters-row .field{min-width:170px}


/* ===== Auth credential card styling (matches old section) ===== */
.auth-settings .card{
  background: rgba(15, 22, 32, .85);
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
}
.auth-settings .card-lg{ padding: 22px; }

.auth-settings .card-title{ margin:0; font-size: 26px; letter-spacing: .2px; }
.auth-settings .card-sub{ margin: 6px 0 0 0; color: var(--muted); }

.auth-settings .section{ margin-top: 14px; }
.auth-settings .section-title{ font-weight: 700; margin-bottom: 6px; }
.auth-settings .section-sub{ color: var(--muted); margin-bottom: 12px; font-size: 13px; }

.auth-settings .cluster-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.auth-settings .cluster-pill{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(148,163,184,.06);
  cursor: pointer;
}
.auth-settings .cluster-pill:hover{ background: rgba(96,165,250,.10); }
.auth-settings .cluster-pill input{ width: 16px; height: 16px; }

.auth-settings .field-input{
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
}

.auth-settings .actions-row{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
/* Inherit the global aurora primary (defined above) for brand consistency. */
.auth-settings .btn.primary{
  background: var(--brand-grad);
  border-color: transparent;
}
.auth-settings .footnote{
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}
