/* ---------------------------------------------------------------------------
   PRD Tracker — design system
   Dark, modern, professional. Indigo + cyan accents on deep navy.
   --------------------------------------------------------------------------- */
:root {
  color-scheme: dark;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --bg-0: #070a13;
  --bg-1: #0c101d;
  --bg-2: #111726;
  --bg-3: #181f30;
  --bg-4: #1f2740;
  --bg-glass: rgba(17, 23, 38, 0.72);
  --bg-glass-strong: rgba(24, 31, 48, 0.88);

  --border-1: rgba(148, 163, 184, 0.12);
  --border-2: rgba(148, 163, 184, 0.22);
  --border-strong: rgba(148, 163, 184, 0.34);

  --text-1: #eef2ff;
  --text-2: #c9d2e6;
  --text-3: #8e9ab5;
  --text-4: #5c6a87;

  --accent-1: #7c6cff;
  --accent-2: #22d3ee;
  --accent-3: #a78bfa;
  --accent-grad: linear-gradient(135deg, #7c6cff 0%, #22d3ee 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(124, 108, 255, 0.18) 0%, rgba(34, 211, 238, 0.10) 100%);

  --green: #34d399;
  --green-bg: rgba(52, 211, 153, 0.14);
  --amber: #fbbf24;
  --amber-bg: rgba(251, 191, 36, 0.14);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.14);
  --blue: #60a5fa;
  --blue-bg: rgba(96, 165, 250, 0.14);
  --violet: #a78bfa;
  --violet-bg: rgba(167, 139, 250, 0.14);
  --slate: #94a3b8;
  --slate-bg: rgba(148, 163, 184, 0.14);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-3: 0 18px 48px rgba(0, 0, 0, 0.5);

  --sidebar-w: 264px;
  --header-h: 64px;
  --max-content: 1180px;
  --transition: 160ms cubic-bezier(0.2, 0.8, 0.3, 1.1);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(ellipse 60% 40% at 20% -10%, rgba(124, 108, 255, 0.16), transparent),
    radial-gradient(ellipse 50% 35% at 90% 0%, rgba(34, 211, 238, 0.12), transparent);
  background-attachment: fixed;
}

/* ---------- scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 8px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--border-2); }

::selection { background: rgba(124, 108, 255, 0.32); }

/* ---------- links & buttons ---------- */
button, input, select, textarea { font: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 14px; line-height: 1;
  border: none; cursor: pointer; user-select: none;
  padding: 11px 18px; border-radius: var(--radius-md);
  background: var(--bg-3); color: var(--text-1);
  border: 1px solid var(--border-1);
  transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.btn:hover { background: var(--bg-4); border-color: var(--border-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 2px; }

.btn-primary {
  background: var(--accent-grad); color: #0a0d1a; border: none;
  box-shadow: 0 8px 24px rgba(124, 108, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:hover { box-shadow: 0 12px 32px rgba(124, 108, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25); filter: brightness(1.06); }

.btn-ghost { background: transparent; border: 1px solid var(--border-1); }
.btn-ghost:hover { background: var(--bg-3); }

.btn-danger { background: var(--red-bg); color: #fecaca; border: 1px solid rgba(248, 113, 113, 0.25); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.22); border-color: rgba(248, 113, 113, 0.4); }

.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.btn-lg { padding: 15px 26px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 10px; }

.linklike { background: none; border: none; color: var(--accent-1); cursor: pointer; padding: 0; font: inherit; font-weight: 600; }
.linklike:hover { text-decoration: underline; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.field .hint { font-size: 12px; color: var(--text-4); font-weight: 400; text-transform: none; letter-spacing: normal; }

input[type="text"], input[type="search"], input[type="url"], input[type="number"], input[type="date"], select, textarea {
  background: var(--bg-2); color: var(--text-1);
  border: 1px solid var(--border-1); border-radius: var(--radius-md);
  padding: 11px 13px; font-size: 14.5px; line-height: 1.5;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  width: 100%;
}
input[type="text"]:focus, input[type="search"]:focus, input[type="url"]:focus, input[type="number"]:focus, input[type="date"]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.18); background: var(--bg-1);
}
textarea { resize: vertical; min-height: 96px; font-family: var(--font-body); }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent-1); }
select option { background: var(--bg-2); color: var(--text-1); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }

.input-group { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }

/* ---------- badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-draft { background: var(--slate-bg); color: var(--slate); }
.badge-in_review { background: var(--blue-bg); color: var(--blue); }
.badge-approved { background: var(--violet-bg); color: var(--violet); }
.badge-shipped { background: var(--green-bg); color: var(--green); }
.badge-deprecated { background: var(--red-bg); color: var(--red); }
.badge-overdue { background: var(--red-bg); color: var(--red); }
.badge-due-soon { background: var(--amber-bg); color: var(--amber); }
.badge-archived { background: var(--slate-bg); color: var(--text-3); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-3); border: 1px solid var(--border-1);
  color: var(--text-2); font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.chip-accent { background: var(--accent-grad-soft); border-color: rgba(124, 108, 255, 0.35); color: #d9d2ff; }
.chip-x { display: inline-flex; cursor: pointer; border-radius: 999px; }
.chip-x:hover { color: var(--red); }

.priority {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  min-width: 34px; padding: 4px 8px; border-radius: 7px;
}
.priority-P0 { background: rgba(248, 113, 113, 0.18); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.3); }
.priority-P1 { background: rgba(251, 191, 36, 0.16); color: #fcd34d; border: 1px solid rgba(251, 191, 36, 0.3); }
.priority-P2 { background: rgba(96, 165, 250, 0.15); color: #93c5fd; border: 1px solid rgba(96, 165, 250, 0.3); }
.priority-P3 { background: rgba(148, 163, 184, 0.14); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.25); }
.priority-P4 { background: var(--bg-3); color: var(--text-4); border: 1px solid var(--border-1); }

/* ---------- cards ---------- */
.card {
  background: var(--bg-glass);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-1);
}
.card-pad { padding: 20px 22px; }
.card-hover { transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); }
.card-hover:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: var(--shadow-2); }

.stat-card {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: 18px 20px 16px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow-1);
}
.stat-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: var(--accent-grad); opacity: 0.85;
}
.stat-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); display: flex; align-items: center; gap: 7px; }
.stat-value { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.stat-sub { font-size: 12px; color: var(--text-3); }
.stat-sub .up { color: var(--green); }
.stat-sub .down { color: var(--red); }

/* ---------- layout / shell ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.shell-body { display: flex; flex: 1; }
.shell-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  border-right: 1px solid var(--border-1);
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-1) 60%, #0a0e1a 100%);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 18px 14px; gap: 14px;
  z-index: 20;
}
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shell-header {
  height: var(--header-h); flex-shrink: 0;
  display: flex; align-items: center; gap: 14px;
  padding: 0 26px;
  border-bottom: 1px solid var(--border-1);
  background: rgba(7, 10, 19, 0.55); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 15;
}
.shell-content { flex: 1; padding: 28px 26px 60px; max-width: var(--max-content); width: 100%; margin: 0 auto; }

/* sidebar pieces */
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: var(--accent-grad);
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(124, 108, 255, 0.4);
  font-weight: 800; color: #0a0d1a; font-family: var(--font-display); font-size: 17px; letter-spacing: -0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-weight: 700; font-size: 16.5px; letter-spacing: -0.01em; }
.brand-text span { font-size: 11px; color: var(--text-4); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--text-3); font-weight: 600; font-size: 14px;
  border: none; background: transparent; cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-align: left; width: 100%;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.85; }
.nav-item:hover { background: var(--bg-2); color: var(--text-2); }
.nav-item.active { background: linear-gradient(135deg, rgba(124, 108, 255, 0.22), rgba(34, 211, 238, 0.12)); color: var(--text-1); box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.32); }
.nav-item.active svg { opacity: 1; color: var(--accent-3); }
.nav-item .badge-count { margin-left: auto; }

.nav-section { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-4); padding: 8px 12px 4px; }

.tenant-switcher { border: 1px solid var(--border-1); border-radius: var(--radius-md); background: var(--bg-2); overflow: hidden; }
.tenant-switcher-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; width: 100%; background: transparent; border: none; text-align: left; color: inherit; }
.tenant-switcher-head:hover { background: var(--bg-3); }
.tenant-avatar {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--accent-grad-soft);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 12px; color: #dcd6ff;
  box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.3);
}
.tenant-switcher-head .meta { display: flex; flex-direction: column; min-width: 0; }
.tenant-switcher-head .meta strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.tenant-switcher-head .meta span { font-size: 11px; color: var(--text-4); }
.tenant-switcher-menu { border-top: 1px solid var(--border-1); display: flex; flex-direction: column; padding: 4px; }
.tenant-switcher-menu button { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: none; border-radius: 8px; background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; font-weight: 600; text-align: left; }
.tenant-switcher-menu button:hover { background: var(--bg-3); color: var(--text-1); }
.tenant-switcher-menu button.active { background: var(--accent-grad-soft); color: #ffffff; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: var(--radius-md); border: 1px solid var(--border-1); background: var(--bg-2); }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-grad); color: #0a0d1a; font-weight: 800; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; font-family: var(--font-display); }
.user-card .meta { min-width: 0; line-height: 1.3; }
.user-card .meta strong { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.user-card .meta span { font-size: 10.5px; color: var(--text-4); font-family: var(--font-mono); letter-spacing: 0.02em; }

/* header */
.header-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.header-title .crumb { color: var(--text-4); font-weight: 500; }
.header-search { flex: 1; display: flex; position: relative; max-width: 380px; margin-left: auto; }
.header-search input { padding-left: 34px; border-radius: 10px; }
.header-search .search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-4); pointer-events: none; }

/* badges count in nav */
.badge-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--accent-1); color: #0a0d1a;
  font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}

/* toasts */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-3); border: 1px solid var(--border-2);
  padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow-2);
  font-size: 13.5px; font-weight: 600; color: var(--text-1);
  animation: toast-in 0.25s cubic-bezier(0.2, 0.8, 0.3, 1.1);
  max-width: 520px; pointer-events: auto;
}
.toast-success { border-color: rgba(52, 211, 153, 0.4); color: #a7f3d0; }
.toast-error { border-color: rgba(248, 113, 113, 0.4); color: #fca5a5; }
.toast-info { border-color: rgba(124, 108, 255, 0.4); color: #ddd6fe; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.toast.out { animation: toast-out 0.3s ease forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(4, 6, 12, 0.66); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 22px; animation: fade-in 0.18s ease; }
.modal { width: 100%; max-width: 560px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(170deg, var(--bg-2) 0%, var(--bg-1) 100%); border: 1px solid var(--border-2); border-radius: var(--radius-xl); box-shadow: var(--shadow-3); animation: modal-in 0.25s cubic-bezier(0.2, 0.8, 0.3, 1.1); }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px 14px; border-bottom: 1px solid var(--border-1); }
.modal-head h2 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.modal-close { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--border-1); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* danger zone */
.danger-zone { border: 1px solid rgba(248, 113, 113, 0.28); border-radius: var(--radius-lg); padding: 16px 18px; background: rgba(248, 113, 113, 0.06); margin-top: 22px; }
.danger-zone h3 { margin: 0 0 6px; color: #fca5a5; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
.danger-zone p { margin: 0 0 14px; color: var(--text-3); font-size: 13.5px; }

/* empty states */
.empty { text-align: center; padding: 44px 24px; color: var(--text-3); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty-icon { width: 68px; height: 68px; border-radius: 18px; background: var(--accent-grad-soft); display: grid; place-items: center; color: var(--accent-3); }
.empty h3 { margin: 0; font-family: var(--font-display); font-size: 19px; color: var(--text-1); font-weight: 700; }
.empty p { margin: 0; max-width: 460px; font-size: 14px; }

/* spinner */
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--border-2); border-top-color: var(--accent-1); animation: spin 0.75s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: grid; place-items: center; padding: 60px 0; }

/* ---------- landing ---------- */
.landing-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 22px; text-align: center; }
.landing-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(124, 108, 255, 0.12); border: 1px solid rgba(124, 108, 255, 0.28); padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #cfc8ff; letter-spacing: 0.02em; }
.landing-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.landing-h1 { font-family: var(--font-display); font-size: clamp(40px, 6.5vw, 66px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; margin: 26px auto 0; max-width: 900px; background: linear-gradient(180deg, #ffffff 40%, #b7c2dd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.landing-h1 .grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.landing-sub { font-size: clamp(16px, 2vw, 19px); color: var(--text-2); max-width: 640px; margin: 22px auto 0; line-height: 1.6; }
.landing-cta { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.landing-foot { margin-top: 52px; display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; color: var(--text-4); font-size: 13px; font-weight: 500; }
.landing-foot .feat { display: flex; align-items: center; gap: 7px; }
.landing-foot svg { width: 15px; height: 15px; color: var(--green); }

/* ---------- hero / onboarding ---------- */
.onboard-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.onboard-card { width: 100%; max-width: 520px; background: linear-gradient(170deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--border-2); border-radius: var(--radius-xl); padding: 32px; box-shadow: var(--shadow-3); }
.onboard-card .step-tag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-3); margin-bottom: 12px; }
.onboard-card h1 { font-family: var(--font-display); font-size: 27px; margin: 0 0 8px; letter-spacing: -0.02em; line-height: 1.15; }
.onboard-card p { color: var(--text-3); margin: 0 0 22px; font-size: 14.5px; line-height: 1.6; }

/* feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 20px; }
.feature-tile { background: var(--bg-2); border: 1px solid var(--border-1); border-radius: var(--radius-lg); padding: 18px; }

/* section header */
.section-head { display: flex; align-items: flex-end; gap: 14px; margin: 0 0 18px; }
.section-head h1 { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.section-head .sub { color: var(--text-3); font-size: 14px; margin-top: 6px; }
.section-head .spacer { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.divider { border-top: 1px solid var(--border-1); margin: 20px 0; }

/* ---------- data tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-1); border-radius: var(--radius-lg); background: var(--bg-glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data thead th {
  text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-4);
  padding: 11px 16px; border-bottom: 1px solid var(--border-1); background: rgba(7, 10, 19, 0.4);
}
table.data tbody tr { border-bottom: 1px solid var(--border-1); transition: background var(--transition); }
table.data tbody tr:last-child { border-bottom: none; }
table.data tbody tr:hover { background: rgba(124, 108, 255, 0.06); }
table.data td { padding: 12px 16px; color: var(--text-2); vertical-align: middle; }
table.data td.small { font-size: 12px; color: var(--text-4); }
table.data .row-title { color: var(--text-1); font-weight: 700; }
table.data .mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }

/* ---------- filters / view toggles ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toggle-group { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border-1); border-radius: 11px; padding: 3px; gap: 3px; }
.toggle-group button { border: none; background: transparent; color: var(--text-3); font-weight: 700; font-size: 12.5px; padding: 7px 13px; border-radius: 8px; cursor: pointer; transition: all var(--transition); display: inline-flex; align-items: center; gap: 7px; }
.toggle-group button:hover { color: var(--text-2); }
.toggle-group button.active { background: var(--bg-4); color: var(--text-1); box-shadow: var(--shadow-1); }
.toggle-group button.active svg { color: var(--accent-3); }

.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-2); border: 1px solid var(--border-1); color: var(--text-2);
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
.filter-chip:hover { border-color: var(--border-2); color: var(--text-1); }
.filter-chip.active { background: var(--accent-grad-soft); border-color: rgba(124, 108, 255, 0.45); color: #e4dfff; }
.filter-chip svg { width: 14px; height: 14px; }

/* card grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.prd-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius-lg); background: linear-gradient(165deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--border-1); cursor: pointer; transition: all var(--transition); }
.prd-card:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: var(--shadow-2); }
.prd-card .card-top { display: flex; align-items: center; gap: 8px; }
.prd-card h3 { margin: 0; font-size: 15.5px; line-height: 1.4; letter-spacing: -0.01em; }
.prd-card .summary { font-size: 12.5px; color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.prd-card .card-meta { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-1); font-size: 11.5px; color: var(--text-4); flex-wrap: wrap; }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 16px; align-items: start; }
.kanban-col { background: var(--bg-1); border: 1px solid var(--border-1); border-radius: var(--radius-lg); min-height: 420px; display: flex; flex-direction: column; }
.kanban-col-head { display: flex; align-items: center; gap: 8px; padding: 13px 14px 10px; border-bottom: 1px solid var(--border-1); }
.kanban-col-head .dot { width: 9px; height: 9px; border-radius: 50%; }
.kanban-col-head h3 { margin: 0; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); }
.kanban-col-head .count { margin-left: auto; font-size: 11.5px; font-weight: 800; background: var(--bg-3); border-radius: 999px; padding: 2px 9px; color: var(--text-3); }
.kanban-col-body { padding: 10px; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; max-height: 64vh; }
.kanban-mini { background: var(--bg-2); border: 1px solid var(--border-1); border-radius: 10px; padding: 11px 12px; cursor: pointer; transition: all var(--transition); }
.kanban-mini:hover { border-color: var(--border-2); transform: translateY(-1px); background: var(--bg-3); }
.kanban-mini h4 { margin: 0 0 7px; font-size: 13px; line-height: 1.4; }
.kanban-mini .foot { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-4); }

/* details page */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.detail-main { min-width: 0; }
.detail-aside { display: flex; flex-direction: column; gap: 16px; }
.detail h1 { font-family: var(--font-display); font-size: 28px; letter-spacing: -0.02em; margin: 6px 0 8px; line-height: 1.15; }
.detail .summary { color: var(--text-2); font-size: 14.5px; margin: 0 0 16px; }
.eyebrow { display: flex; align-items: center; gap: 9px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-4); }

.req-list { display: flex; flex-direction: column; gap: 9px; }
.req-item { display: flex; gap: 13px; align-items: flex-start; background: var(--bg-2); border: 1px solid var(--border-1); border-radius: var(--radius-md); padding: 13px 14px; transition: all var(--transition); }
.req-item.done { border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.06); }
.req-item .check { flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border-2); display: grid; place-items: center; cursor: pointer; transition: all var(--transition); margin-top: 2px; color: transparent; }
.req-item .check:hover { border-color: var(--green); color: rgba(52, 211, 153, 0.4); }
.req-item.done .check { background: var(--green); border-color: var(--green); color: #05220f; }
.req-item .req-body { flex: 1; min-width: 0; }
.req-item .req-title { font-weight: 700; font-size: 14px; }
.req-item.done .req-title { color: var(--text-3); text-decoration: line-through; }
.req-item .req-meta { font-size: 12px; color: var(--text-4); margin-top: 3px; }
.req-item .req-criteria { font-size: 13px; color: var(--text-2); background: var(--bg-1); border-radius: 8px; padding: 9px 11px; margin-top: 8px; border-left: 3px solid var(--accent-1); }
.req-item .req-actions { display: flex; gap: 7px; flex-shrink: 0; align-self: center; }

.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border-1); }
.comment:last-child { border-bottom: none; }
.comment .avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; background: var(--bg-4); display: grid; place-items: center; font-weight: 700; color: var(--text-1); font-size: 12.5px; border: 1px solid var(--border-1); font-family: var(--font-display); }
.comment .comment-body { flex: 1; min-width: 0; }
.comment .comment-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.comment .comment-head strong { font-size: 13.5px; }
.comment .comment-head span { font-size: 11.5px; color: var(--text-4); }
.comment .comment-text { color: var(--text-2); font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }

/* activity feed */
.activity-feed { display: flex; flex-direction: column; }
.activity-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-1); align-items: flex-start; }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 0; }
.activity-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--border-1); display: grid; place-items: center; color: var(--text-3); flex-shrink: 0; }
.activity-icon svg { width: 14px; height: 14px; }
.activity-body { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.activity-body .meta { font-size: 11.5px; color: var(--text-4); margin-top: 3px; }

/* workflow bar */
.workflow-bar { display: flex; align-items: center; gap: 6px; background: var(--bg-2); border: 1px solid var(--border-1); border-radius: var(--radius-md); padding: 6px; }
.workflow-step { display: flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 8px; border: none; background: transparent; color: var(--text-3); font-weight: 600; font-size: 12.5px; cursor: pointer; transition: all var(--transition); }
.workflow-step:hover { color: var(--text-1); background: var(--bg-3); }
.workflow-step.current { background: var(--accent-grad-soft); color: #fff; box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.4); }
.workflow-step .step-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.workflow-step.current .step-dot { opacity: 1; box-shadow: 0 0 10px var(--accent-1); }

/* progress bar */
.progress { background: var(--bg-3); border-radius: 999px; height: 8px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent-grad); border-radius: 999px; transition: width 0.4s ease; }

/* analytics bars */
.bar-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 42px; align-items: center; gap: 12px; padding: 6px 0; }
.bar-row .bar-label { font-size: 12px; color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.bar-row .bar-track { height: 16px; background: var(--bg-3); border-radius: 6px; overflow: hidden; }
.bar-row .bar-fill { height: 100%; border-radius: 6px; background: var(--accent-grad); min-width: 3px; transition: width 0.5s ease; }
.bar-row .bar-count { font-family: var(--font-mono); font-size: 12px; text-align: right; color: var(--text-2); }

/* misc */
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.ta-right { text-align: right; }
.ta-center { text-align: center; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* responsive */
@media (max-width: 1080px) {
  .shell-sidebar { width: 218px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .stat-value { font-size: 28px; }
}
@media (max-width: 820px) {
  .shell-body { flex-direction: column; }
  .shell-sidebar { width: 100%; height: auto; position: sticky; top: 0; flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px; border-right: none; border-bottom: 1px solid var(--border-1); overflow-x: auto; }
  .brand { flex-shrink: 0; }
  .brand-text { display: none; }
  .nav { flex-direction: row; gap: 6px; flex-wrap: nowrap; overflow-x: auto; }
  .nav-item { flex-direction: column; gap: 3px; font-size: 10.5px; padding: 8px 10px; width: auto; align-items: center; white-space: nowrap; }
  .nav-item svg { width: 15px; height: 15px; }
  .nav-section { display: none; }
  .sidebar-foot { display: none; }
  .tenant-switcher { flex: 1; min-width: 0; }
  .header-search { display: none; }
  .shell-content { padding: 18px 16px 48px; }
  .form-row { grid-template-columns: 1fr; }
  .detail-aside { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: minmax(240px, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-row.three { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-head .spacer { margin-left: 0; }
}
