/* ============================================================
   Trinetra SOC — design tokens (2026-05-17)
   Indigo + violet · light palette · whisper shadows
   The colors echo the Trinetra (third-eye / ajna chakra) palette.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Tiro+Devanagari+Hindi&display=swap');

:root, html, body {
  /* surfaces */
  --bg:            #ffffff;
  --bg-alt:        #f7f8fa;        /* section bands */
  --bg-sunken:     #fafbfc;        /* table zebra / subtle elevation */
  --border:        #e7e9ee;        /* hairlines */
  --border-strong: #d0d4dc;        /* form borders */

  /* text */
  --text:          #1c1f26;        /* near-black, never #000 */
  --text-muted:    #5b6478;
  --text-subtle:   #8a90a0;

  /* brand — indigo carries everything, violet only appears in the gradient */
  --accent:        #4338CA;
  --accent-hover:  #3730A3;
  --accent-deep:   #1E1B4B;
  --accent-violet: #7C3AED;
  --accent-soft:   rgba(67, 56, 202, 0.08);
  --accent-strong: rgba(67, 56, 202, 0.16);

  /* signals (sparingly) */
  --link:          #4338CA;
  --danger:        #dc2626;
  --warn:          #d97706;
  --ok:            #16a34a;

  /* P1-P4 severity (only inside dashboards) */
  --p1: #dc2626;   /* critical */
  --p2: #d97706;   /* high */
  --p3: #ca8a04;   /* medium */
  --p4: #2563eb;   /* low */

  /* type */
  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, 'SF Mono', Monaco, monospace;
  --font-deva:     'Tiro Devanagari Hindi', 'Inter', serif;

  /* shape */
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     14px;
  --radius-pill:   9999px;

  /* shadows — whispers */
  --shadow-card:   0 1px 2px rgba(28, 31, 38, 0.04), 0 4px 14px rgba(28, 31, 38, 0.05);
  --shadow-soft:   0 0 40px rgba(28, 31, 38, 0.04);
  --shadow-brand:  0 6px 20px rgba(67, 56, 202, 0.22);

  /* gradient — indigo→violet, evokes the ajna chakra */
  --grad-brand:    linear-gradient(135deg, var(--accent) 0%, var(--accent-violet) 100%);

  /* transitions */
  --t:             0.15s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }

/* ============================================================
   Primitive components — used across the platform
   ============================================================ */

.t-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 0;
  font: 600 14px/1 var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t), border-color var(--t);
}
.t-btn-primary {
  background: var(--grad-brand);
  color: white;
  box-shadow: var(--shadow-brand);
}
.t-btn-primary:hover { transform: translateY(-1px); }
.t-btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.t-btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.t-btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
}
.t-btn-ghost:hover { color: var(--text); background: var(--bg-alt); }
.t-btn-sm { padding: 6px 12px; font-size: 12px; }
.t-btn-lg { padding: 12px 24px; font-size: 15px; }

.t-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow var(--t), border-color var(--t), transform var(--t);
}
.t-card:hover { box-shadow: var(--shadow-card); }

.t-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font: 500 11px/1 var(--font-sans);
  background: var(--bg-alt);
  color: var(--text-muted);
}
.t-pill.brand    { background: var(--accent-soft); color: var(--accent-deep); }
.t-pill.danger   { background: rgba(220, 38, 38, 0.08); color: var(--danger); }
.t-pill.warn     { background: rgba(217, 119, 6, 0.08); color: var(--warn); }
.t-pill.p1       { background: rgba(220, 38, 38, 0.10); color: var(--p1); font-weight: 700; }
.t-pill.p2       { background: rgba(217, 119, 6, 0.10); color: var(--p2); font-weight: 600; }
.t-pill.p3       { background: rgba(202, 138, 4, 0.10); color: var(--p3); }
.t-pill.p4       { background: rgba(37, 99, 235, 0.08); color: var(--p4); }

.t-input, .t-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: 400 14px/1.4 var(--font-sans);
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--t), box-shadow var(--t);
}
.t-input:focus, .t-select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.t-mono { font-family: var(--font-mono); font-size: 0.92em; }
.t-deva { font-family: var(--font-deva); }
.t-mute { color: var(--text-muted); }
.t-dim  { color: var(--text-subtle); }

.t-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.t-table thead th {
  text-align: left; padding: 12px 14px;
  background: var(--bg-alt);
  color: var(--text-muted); font: 600 11px/1 var(--font-sans);
  text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}
.t-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.t-table tbody tr:hover td { background: var(--accent-soft); }
.t-table tbody tr:last-child td { border-bottom: 0; }

/* Section title block */
.t-section-title { margin-bottom: 16px; }
.t-section-title h2 { font: 600 18px/1.3 var(--font-sans); color: var(--text); }
.t-section-title p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* Toasts (lighter rewrite of console-shell.js tcsToast styling) */
.tcs-toasts { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.tcs-toast {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  min-width: 260px; max-width: 420px;
  box-shadow: var(--shadow-card);
  font-size: 13px;
  color: var(--text);
  animation: tcs-slide 0.22s ease-out;
}
.tcs-toast.error { border-left-color: var(--danger); }
.tcs-toast.warn  { border-left-color: var(--warn); }
.tcs-toast .t { font-weight: 600; }
.tcs-toast .b { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
@keyframes tcs-slide { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
