/* ═══════════════════════════════════════════════════════════════════════════
   shared.css — Design tokens and components shared across all portal pages
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds — index.html uses --bg2/3/4/5, overview.html uses --surface/2 */
  --bg:       #0f1117;
  --bg2:      #1a1d27;   --surface:   #1a1d27;
  --bg3:      #1f2233;   --surface2:  #1f2233;
  --bg4:      #242840;
  --bg5:      #2a2f4a;

  /* Borders */
  --border:   rgba(255,255,255,0.08);
  --border2:  rgba(255,255,255,0.12);

  /* Text — index uses --t1/2/3, overview uses --text/text-muted/text-dim */
  --t1:         #e8eaf0;   --text:       #e8eaf0;
  --t2:         #7c859e;   --text-muted: #7c859e;
  --t3:         #4a5168;   --text-dim:   #4a5168;

  /* Accent */
  --accent:    #6366f1;
  --accent2:   #818cf8;
  --accent-bg: rgba(99,102,241,0.10);

  /* Status */
  --green:    #10b981;   --green-bg:  rgba(16,185,129,0.10);
  --amber:    #f59e0b;   --amber-bg:  rgba(245,158,11,0.10);
  --red:      #ef4444;   --red-bg:    rgba(239,68,68,0.10);
  --blue:     #3b82f6;   --blue-bg:   rgba(59,130,246,0.10);
  --purple:   #a78bfa;   --purple-bg: rgba(167,139,250,0.10);

  /* Border radius — index uses --r/r2/r3, overview uses --radius/radius-lg */
  --r:         6px;
  --r2:        1rem;   --radius:    1rem;
  --r3:        1rem;   --radius-lg: 1rem;

  /* Misc */
  --shadow: 0 4px 24px -1px rgba(0,0,0,0.2);

  /* Fonts */
  --sans: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

/* ── Reset & base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--t1);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Microsoft sign-in button ───────────────────────────────────────────────── */
.btn-ms {
  display: flex; align-items: center; gap: 12px;
  background: #2f5496; color: #fff;
  border: none; border-radius: var(--r2);
  padding: 11px 22px; font-size: 15px;
  font-family: var(--sans); cursor: pointer;
  font-weight: 500; transition: background 0.15s;
}
.btn-ms:hover { background: #3a68b5; }
.ms-logo    { width: 20px; height: 20px; }
.ms-logo-lg { width: 32px; height: 32px; display: block; }

/* ── Auth screen ─────────────────────────────────────────────────────────────── */
#auth-screen {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg); gap: 1.5rem;
}
#auth-screen p { color: var(--text-muted); font-size: 0.9rem; }

/* ── Link-style button ──────────────────────────────────────────────────────── */
.btn-link {
  font-family: var(--sans); font-size: 13px; color: var(--t2);
  background: none; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: var(--r); transition: color 0.15s;
}
.btn-link:hover { color: var(--t1); }

/* ── Button system ──────────────────────────────────────────────────────────── */
.btn { font-family: var(--sans); font-size: 13px; font-weight: 500; border: none; border-radius: var(--r); cursor: pointer; padding: 8px 14px; transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); }
.btn-ghost { background: transparent; color: var(--t2); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--t1); border-color: var(--t3); background: var(--bg4); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn-block { justify-content: center; width: 100%; padding: 11px; font-size: 14px; }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid rgba(239,68,68,.25); }
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-warn { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(245,158,11,.25); }
.btn-warn:hover { background: rgba(245,158,11,.2); }

/* ── Shared animations ──────────────────────────────────────────────────────── */
@keyframes fadeIn  { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes blink   { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes slideUp { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
