/* Copyright 2026 Veloxs AI Inc. All rights reserved. */
/* Nexora design system — warm white / soft cream, high-contrast type, black CTAs. */
:root {
  /* surfaces: warm neutrals, light → lighter for hierarchy */
  --bg: #FAF7F1;          /* app background: warm cream */
  --bg-nav: #F4EFE6;      /* sidebar / navigation */
  --panel: #FFFFFF;       /* cards, modals */
  --panel-2: #F7F3EB;     /* nested panels, inputs, bubbles */
  --line: #E6DFD2;        /* subtle warm border */
  --line-strong: #D8CFBE;

  /* typography: charcoal hierarchy */
  --text: #1C1B18;        /* primary: near-black charcoal */
  --text-2: #57534A;      /* secondary */
  --muted: #8A8474;       /* supporting */

  /* actions */
  --cta: #16150F;         /* primary CTA: near-black */
  --cta-hover: #2E2C24;
  --accent: #B4551F;      /* restrained copper — brand highlight only */
  --accent-2: #1D4ED8;    /* links / focus */

  /* status */
  --ok: #1B7F4D; --warn: #96660A; --bad: #B3261E;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(28, 27, 24, .05), 0 1px 3px rgba(28, 27, 24, .04);
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; background: var(--panel); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 11px; width: 100%; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-2);
  outline-offset: -1px; border-color: var(--accent-2); }
a { color: var(--accent-2); }

/* --- auth --- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-nav) 100%); }
.auth-card { width: 408px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 40px 36px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 6px; font-size: 27px; letter-spacing: 1.5px; font-weight: 800; }
.auth-card .tag { color: var(--text-2); margin-bottom: 26px; font-size: 13.5px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-tabs button { flex: 1; padding: 9px; background: var(--panel-2); color: var(--text-2);
  border: 1px solid var(--line); border-radius: 8px; font-weight: 500; }
.auth-tabs button.active { color: var(--text); background: var(--panel);
  border-color: var(--cta); font-weight: 600; }
.auth-card label { display: block; margin: 14px 0 5px; color: var(--text-2);
  font-size: 13px; font-weight: 500; }
.auth-error { color: var(--bad); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* --- shell --- */
.shell { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg-nav); border-right: 1px solid var(--line);
  padding: 20px 12px; display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font-weight: 800; font-size: 19px; letter-spacing: 2px; padding: 0 10px 16px;
  color: var(--text); }
.brand small { display: block; color: var(--muted); font-size: 9.5px; letter-spacing: 1.6px;
  font-weight: 600; margin-top: 3px; }
.brand span { color: var(--accent); }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 0;
  background: transparent; color: var(--text-2); border-radius: 8px; text-align: left;
  font-size: 14px; width: 100%; font-weight: 500; }
.nav-item .ico { width: 20px; text-align: center; opacity: .85; }
.nav-item:hover { background: rgba(28, 27, 24, .05); color: var(--text); }
.nav-item.active { background: var(--panel); color: var(--text); font-weight: 600;
  box-shadow: inset 2.5px 0 0 var(--cta), var(--shadow); }
.nav-sep { margin: 12px 11px 5px; color: var(--muted); font-size: 10px;
  letter-spacing: 1.5px; font-weight: 600; }

.main { padding: 0 32px 64px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between;
  padding: 15px 0; border-bottom: 1px solid var(--line); margin-bottom: 26px;
  flex-wrap: wrap; gap: 10px; }
.topbar .crumb { color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.topbar .who { display: flex; gap: 12px; align-items: center; font-size: 13px;
  color: var(--text-2); flex-wrap: wrap; }
.topbar select { width: auto; padding: 6px 9px; font-size: 13px; }

.badge { display: inline-block; padding: 2.5px 10px; border-radius: 20px; font-size: 12px;
  border: 1px solid var(--line-strong); color: var(--text-2); background: var(--panel);
  font-weight: 500; }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, white); background: color-mix(in srgb, var(--ok) 7%, white); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, white); background: color-mix(in srgb, var(--warn) 8%, white); }
.badge.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, white); background: color-mix(in srgb, var(--bad) 6%, white); }
.badge.accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, white); background: color-mix(in srgb, var(--accent) 7%, white); }

h2.page-title { font-size: 23px; margin: 0 0 5px; font-weight: 700; letter-spacing: -.2px; }
p.page-sub { color: var(--text-2); margin: 0 0 26px; font-size: 14px; line-height: 1.6;
  max-width: 880px; }

.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 650; }
.card .hint { color: var(--muted); font-size: 13px; line-height: 1.55; }
.stat { font-size: 31px; font-weight: 750; letter-spacing: -.5px; }
.stat-label { color: var(--text-2); font-size: 12.5px; margin-top: 3px; font-weight: 500; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11.5px;
  letter-spacing: .5px; text-transform: uppercase; padding: 8px 10px;
  border-bottom: 1px solid var(--line-strong); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); color: var(--text); }
.table tr:last-child td { border-bottom: 0; }

/* --- buttons: black primary CTAs --- */
.btn { background: var(--cta); color: #FFFFFF; border: 1px solid var(--cta);
  border-radius: 8px; padding: 9px 18px; font-weight: 600; font-size: 14px;
  transition: background .12s, transform .05s; }
.btn:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--panel); color: var(--text);
  border: 1px solid var(--line-strong); }
.btn.secondary:hover { background: var(--panel-2); }
.btn.small { padding: 5px 12px; font-size: 12.5px; }
.btn.danger { background: transparent; border: 1px solid color-mix(in srgb, var(--bad) 50%, white); color: var(--bad); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 6%, white); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; color: var(--text-2); font-size: 12.5px;
  margin-bottom: 5px; font-weight: 550; }
.inline { display: flex; gap: 10px; align-items: end; }
.inline > * { flex: 1; }
.inline > .btn { flex: 0 0 auto; }

.connector { display: flex; flex-direction: column; gap: 6px; padding: 15px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
.connector .name { font-weight: 600; font-size: 14px; }
.connector .cat { color: var(--muted); font-size: 12px; line-height: 1.45; }
.connector.clickable { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.connector.clickable:hover { border-color: var(--cta); box-shadow: var(--shadow); }

.log { background: #211F1A; border: 1px solid #38352C; border-radius: 8px;
  padding: 14px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px;
  white-space: pre-wrap; max-height: 320px; overflow-y: auto; color: #E8E2D4; }

.answer-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px;
  padding: 16px; margin-top: 14px; line-height: 1.6; font-size: 14px; color: var(--text); }
.citation { font-size: 12.5px; color: var(--text-2); padding: 4px 0; }
.empty { color: var(--muted); text-align: center; padding: 36px 12px; font-size: 13.5px; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; align-items: center; }
.reco { border-left: 3px solid var(--cta); }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }
.right { text-align: right; }
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--cta); color: #FFFFFF;
  border: 0; border-radius: 9px; padding: 13px 18px; font-size: 13.5px; max-width: 440px;
  z-index: 50; box-shadow: 0 6px 20px rgba(28, 27, 24, .22); }
code.kbd { background: var(--panel-2); border: 1px solid var(--line-strong);
  padding: 2px 7px; border-radius: 5px; font-size: 12.5px; color: var(--text); }
.field-error { color: var(--bad); font-size: 12px; min-height: 14px; margin-top: 3px; }

/* --- chat --- */
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 420px;
  overflow-y: auto; padding: 4px 2px; min-height: 120px; }
.bubble { max-width: 88%; padding: 11px 14px; border-radius: 12px; font-size: 13.5px;
  line-height: 1.55; border: 1px solid var(--line); }
.bubble.user { align-self: flex-end; background: var(--cta); color: #FFFFFF; border: 0; }
.bubble.agent { align-self: flex-start; background: var(--panel-2); }

/* --- intelligence graph --- */
.graph-svg { width: 100%; height: auto; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 9px; }
.graph-label { fill: #57534A; font-size: 10px; font-family: inherit; }

/* --- responsive --- */
@media (max-width: 1100px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 4px; padding: 12px; border-right: 0;
    border-bottom: 1px solid var(--line); }
  .brand { padding: 0 10px 0 4px; }
  .brand small { display: none; }
  .nav-item { width: auto; padding: 7px 10px; }
  .nav-sep { display: none; }
  .main { padding: 0 16px 48px; }
  .cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cols-4, .cols-3 { grid-template-columns: 1fr; }
  .auth-card { width: 92vw; padding: 28px 22px; }
}
