/* ═══════════════════════════════════════════════════════════
   PMP MANAGER PRO — Design System
   Paleta: Carbon industrial + Electric Blue + Amber accents
   Tipografía: Syne (display) + IBM Plex Mono (code) + Inter (body)
═══════════════════════════════════════════════════════════ */

:root {
  /* — Brand Colors — */
  --bg-base:        #0a0d14;
  --bg-surface:     #111827;
  --bg-raised:      #1a2236;
  --bg-overlay:     #243045;
  --bg-hover:       #2d3c57;

  --border:         rgba(255,255,255,0.07);
  --border-strong:  rgba(255,255,255,0.14);

  --text-primary:   #f0f4ff;
  --text-secondary: #8fa3c7;
  --text-muted:     #4d6080;

  /* — Accent Palette — */
  --blue:      #3b82f6;
  --blue-glow: rgba(59,130,246,0.25);
  --amber:     #f59e0b;
  --amber-glow:rgba(245,158,11,0.2);
  --green:     #10b981;
  --green-glow:rgba(16,185,129,0.2);
  --red:       #ef4444;
  --red-glow:  rgba(239,68,68,0.2);
  --purple:    #8b5cf6;
  --cyan:      #06b6d4;

  /* — Sidebar — */
  --sidebar-w:    260px;
  --sidebar-bg:   #07090f;
  --sidebar-border: rgba(59,130,246,0.15);

  /* — Spacing — */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* — Typography — */
  --font-display: 'Syne', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;
  --font-body:    'Inter', sans-serif;

  /* — Shadow — */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow:    0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.6);
  --glow-blue: 0 0 30px rgba(59,130,246,0.2);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: #60a5fa; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
input, select, textarea, button { font-family: var(--font-body); }
::selection { background: var(--blue); color: white; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-overlay); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--bg-hover); }

/* ── App Shell ── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s ease;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}
.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: var(--glow-blue);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--text-primary);
  letter-spacing: 2px;
}
.brand-sub {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  font-family: var(--font-mono);
}

.sidebar-nav { flex: 1; padding: 16px 0; }
.nav-section { margin-bottom: 8px; padding-top: 8px; }
.nav-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 20px 4px;
  font-family: var(--font-mono);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.18s;
  position: relative;
  border-radius: 0;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover {
  color: var(--text-primary);
  background: rgba(59,130,246,0.08);
}
.nav-item.active {
  color: var(--blue);
  background: rgba(59,130,246,0.12);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--blue);
  border-radius: 0 2px 2px 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-user {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: background 0.18s;
}
.sidebar-user:hover { background: var(--bg-raised); }
.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}
.user-name { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-role { font-size: 10px; font-family: var(--font-mono); color: var(--blue); }
.logout-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  color: var(--text-muted);
  transition: all 0.18s;
  flex-shrink: 0;
}
.logout-btn:hover { color: var(--red); background: var(--red-glow); }

/* ═══════════════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Bar ── */
.top-bar {
  height: 62px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  position: sticky; top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); padding: 6px;
  border-radius: var(--radius-sm);
  display: none;
}
.page-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
}
.bc-sep { width: 14px; height: 14px; }
.breadcrumb-home { color: var(--text-muted); }
.page-breadcrumb > span:last-child { color: var(--text-primary); font-weight: 600; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.btn-top-new {
  display: flex; align-items: center; gap: 6px;
  background: var(--blue); color: white;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  transition: all 0.18s;
  box-shadow: 0 2px 8px rgba(59,130,246,0.35);
}
.btn-top-new:hover { background: #2563eb; color: white; transform: translateY(-1px); }
.btn-top-new svg { width: 14px; height: 14px; }
.notif-bell {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s;
  border: 1px solid var(--border);
}
.notif-bell:hover { background: var(--bg-raised); color: var(--amber); }

/* ── Page Body ── */
.page-body { padding: 28px; flex: 1; }

/* ═══════════════════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════════════════ */
.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}
.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.mono { font-family: var(--font-mono); }

/* ═══════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-strong); }
.card-sm { padding: 16px; border-radius: var(--radius); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.card-title {
  font-family: var(--font-display);
  font-weight: 700; font-size: 15px;
  color: var(--text-primary);
}

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex; align-items: flex-start; gap: 16px;
  position: relative; overflow: hidden;
  transition: all 0.2s;
}
.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
}
.stat-card.blue::before  { background: var(--blue); }
.stat-card.green::before { background: var(--green); }
.stat-card.amber::before { background: var(--amber); }
.stat-card.red::before   { background: var(--red); }
.stat-card.purple::before{ background: var(--purple); }
.stat-icon {
  width: 44px; height: 44px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon.blue   { background: var(--blue-glow); color: var(--blue); }
.stat-icon.green  { background: var(--green-glow); color: var(--green); }
.stat-icon.amber  { background: var(--amber-glow); color: var(--amber); }
.stat-icon.red    { background: var(--red-glow); color: var(--red); }
.stat-icon.purple { background: rgba(139,92,246,0.2); color: var(--purple); }
.stat-value {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 800;
  line-height: 1; color: var(--text-primary);
}
.stat-label {
  font-size: 12px; color: var(--text-secondary); margin-top: 4px;
  font-weight: 500;
}
.stat-delta {
  font-size: 11px; font-family: var(--font-mono);
  margin-top: 6px; color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   GRID LAYOUTS
═══════════════════════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-main-side { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }

/* ═══════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.pmp-table {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px;
}
.pmp-table thead th {
  background: var(--bg-raised);
  color: var(--text-muted);
  font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 12px 14px;
  text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}
.pmp-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.pmp-table tbody tr:hover { background: var(--bg-raised); }
.pmp-table tbody td { padding: 12px 14px; color: var(--text-secondary); }
.pmp-table tbody td:first-child { color: var(--text-primary); font-weight: 500; }

/* ═══════════════════════════════════════════════════════
   BADGES & PILLS
═══════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  font-family: var(--font-mono); letter-spacing: 0.5px;
}
.badge-blue   { background: var(--blue-glow);  color: var(--blue); }
.badge-green  { background: var(--green-glow); color: var(--green); }
.badge-amber  { background: var(--amber-glow); color: var(--amber); }
.badge-red    { background: var(--red-glow);   color: var(--red); }
.badge-purple { background: rgba(139,92,246,0.2); color: var(--purple); }
.badge-gray   { background: rgba(100,116,139,0.2); color: #94a3b8; }
.badge-cyan   { background: rgba(6,182,212,0.15); color: var(--cyan); }

.health-badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.health-green  { background: var(--green-glow); color: var(--green); }
.health-yellow { background: var(--amber-glow); color: var(--amber); }
.health-red    { background: var(--red-glow);   color: var(--red); }

.priority-badge { font-size: 12px; font-weight: 600; }
.priority-critical { color: var(--red); }
.priority-high     { color: var(--amber); }
.priority-medium   { color: var(--blue); }
.priority-low      { color: var(--green); }

.risk-score {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  font-weight: 700; font-family: var(--font-mono); font-size: 13px;
}
.risk-critical { background: rgba(239,68,68,0.2);   color: var(--red); }
.risk-high     { background: rgba(245,158,11,0.2);  color: var(--amber); }
.risk-medium   { background: rgba(59,130,246,0.15); color: var(--blue); }
.risk-low      { background: rgba(16,185,129,0.15); color: var(--green); }

/* ── Phase Steps ── */
.phase-steps {
  display: flex; align-items: center; gap: 0;
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 4px;
  overflow: hidden;
}
.phase-step {
  flex: 1; text-align: center;
  padding: 8px 12px; font-size: 11px; font-weight: 600;
  color: var(--text-muted); border-radius: var(--radius-sm);
  transition: all 0.2s; white-space: nowrap;
  font-family: var(--font-mono);
}
.phase-step.active { background: var(--blue); color: white; }
.phase-step.done   { background: var(--green-glow); color: var(--green); }

/* ── Progress ── */
.progress-track {
  background: var(--bg-overlay);
  border-radius: 99px; height: 8px;
  position: relative; overflow: visible;
  display: flex; align-items: center;
}
.progress-fill {
  height: 100%; border-radius: 99px;
  transition: width 0.4s ease;
}
.progress-label {
  position: absolute; right: 0; top: 50%;
  transform: translate(calc(100% + 8px), -50%);
  font-size: 11px; font-family: var(--font-mono);
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; border: none;
  transition: all 0.18s; text-decoration: none;
  font-family: var(--font-body);
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--blue); color: white; box-shadow: 0 2px 8px rgba(59,130,246,0.3); }
.btn-primary:hover { background: #2563eb; color: white; transform: translateY(-1px); }
.btn-secondary { background: var(--bg-raised); color: var(--text-secondary); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--bg-overlay); color: var(--text-primary); }
.btn-danger { background: var(--red-glow); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: var(--red); color: white; }
.btn-success { background: var(--green-glow); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ═══════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; margin-bottom: 7px;
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary); letter-spacing: 0.5px;
  text-transform: uppercase; font-family: var(--font-mono);
}
.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-primary); font-size: 14px;
  transition: all 0.18s;
  font-family: var(--font-body);
}
.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }

/* ── Range Input ── */
input[type="range"] {
  -webkit-appearance: none; width: 100%; height: 6px;
  background: var(--bg-overlay); border-radius: 3px; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  background: var(--blue); border-radius: 50%;
  border: 2px solid white;
}

/* ═══════════════════════════════════════════════════════
   KANBAN
═══════════════════════════════════════════════════════ */
.kanban-board {
  display: flex; gap: 16px;
  overflow-x: auto; padding-bottom: 16px;
  min-height: 500px;
}
.kanban-col {
  min-width: 280px; width: 280px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex; flex-direction: column;
}
.kanban-col-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.kanban-col-title {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-secondary);
}
.kanban-count {
  background: var(--bg-overlay);
  color: var(--text-muted);
  font-size: 11px; font-family: var(--font-mono);
  padding: 2px 8px; border-radius: 99px;
}
.kanban-cards { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.kanban-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: grab; transition: all 0.18s;
}
.kanban-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 16px rgba(59,130,246,0.15);
  transform: translateY(-1px);
}
.kanban-card.dragging { opacity: 0.5; cursor: grabbing; }
.kanban-card-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.kanban-card-meta { display: flex; align-items: center; justify-content: space-between; }
.task-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: white;
}

/* ═══════════════════════════════════════════════════════
   RISK MATRIX
═══════════════════════════════════════════════════════ */
.risk-matrix {
  display: grid; grid-template-columns: 24px repeat(5,1fr);
  grid-template-rows: repeat(5,1fr) 24px;
  gap: 4px; padding: 12px;
  background: var(--bg-raised); border-radius: var(--radius);
}
.risk-cell {
  height: 48px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  font-family: var(--font-mono);
  cursor: default; transition: all 0.2s;
}
.risk-cell:hover { transform: scale(1.06); z-index: 2; }
.risk-cell-label { color: var(--text-muted); font-size: 10px; font-family: var(--font-mono); display: flex; align-items: center; justify-content: center; }

/* ═══════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none; align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%; max-width: 640px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}
.modal-lg { max-width: 860px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-title { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; transition: color 0.15s; }
.modal-close:hover { color: var(--red); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════════
   EVM CHART SECTION
═══════════════════════════════════════════════════════ */
.evm-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 14px; margin-bottom: 20px;
}
.evm-kpi {
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.evm-kpi-val {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800;
  line-height: 1;
}
.evm-kpi-label { font-size: 10px; font-family: var(--font-mono); color: var(--text-muted); margin-top: 4px; letter-spacing: 1px; }

/* ═══════════════════════════════════════════════════════
   EMPTY STATES
═══════════════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 13.5px; max-width: 340px; margin: 0 auto 20px; }

/* ═══════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(59,130,246,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 80%, rgba(139,92,246,0.08) 0%, transparent 60%);
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  text-align: center; margin-bottom: 32px;
}
.login-logo-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 28px;
  box-shadow: var(--glow-blue);
}
.login-logo h1 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  letter-spacing: 2px;
}
.login-logo p { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 4px; }
.login-error {
  background: var(--red-glow); border: 1px solid rgba(239,68,68,0.3);
  color: var(--red); border-radius: var(--radius);
  padding: 10px 14px; font-size: 13px; margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════
   GANTT (Simple)
═══════════════════════════════════════════════════════ */
.gantt-bar {
  height: 20px; border-radius: 4px;
  background: var(--blue);
  transition: width 0.3s;
  cursor: pointer; position: relative;
}
.gantt-bar:hover { filter: brightness(1.2); }

/* ═══════════════════════════════════════════════════════
   TABS
═══════════════════════════════════════════════════════ */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px; font-size: 13.5px; font-weight: 600;
  color: var(--text-muted); background: none; border: none;
  border-bottom: 2px solid transparent; cursor: pointer;
  transition: all 0.18s; margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ═══════════════════════════════════════════════════════
   TIMELINE / ACTIVITY
═══════════════════════════════════════════════════════ */
.timeline { position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 20px; top: 0; bottom: 0;
  width: 1px; background: var(--border);
}
.timeline-item {
  display: flex; gap: 16px;
  padding-left: 40px; margin-bottom: 20px; position: relative;
}
.timeline-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--blue);
  position: absolute; left: 16px; top: 5px;
}
.timeline-time { font-size: 11px; font-family: var(--font-mono); color: var(--text-muted); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════
   SEARCH & FILTERS
═══════════════════════════════════════════════════════ */
.toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.search-box {
  position: relative; flex: 1; max-width: 320px;
}
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-muted); }
.search-box input {
  width: 100%; padding: 9px 14px 9px 38px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-primary); font-size: 13.5px;
}
.search-box input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.filter-select {
  padding: 9px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-secondary); font-size: 13px;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════
   FLASH MESSAGES
═══════════════════════════════════════════════════════ */
.flash {
  padding: 12px 18px; border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.flash-success { background: var(--green-glow); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.flash-error   { background: var(--red-glow);   color: var(--red);   border: 1px solid rgba(239,68,68,0.3); }
.flash-warning { background: var(--amber-glow); color: var(--amber); border: 1px solid rgba(245,158,11,0.3); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid-main-side { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .evm-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-260px); }
  .sidebar.open { transform: translateX(0); width: 260px; }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .grid-2, .grid-3, .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .page-body { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .evm-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── Animations ── */
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease forwards; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.pulse { animation: pulse 2s infinite; }

/* ── Tooltip ── */
[data-tip] { position: relative; cursor: help; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--bg-overlay); color: var(--text-primary);
  font-size: 11.5px; padding: 5px 10px; border-radius: 6px;
  white-space: nowrap; z-index: 100;
  border: 1px solid var(--border-strong);
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   PROJECT DETAIL PAGE
═══════════════════════════════════════════ */
.project-hero {
  display: flex; justify-content: space-between; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 2rem; margin-bottom: 1.5rem; gap: 2rem;
}
.hero-code { font-family: var(--font-mono); font-size: 0.75rem; color: var(--blue); letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.hero-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; margin: 0 0 1rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.meta-pill { background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 0.2rem 0.75rem; font-size: 0.75rem; }
.meth-agile   { background: rgba(139,92,246,0.15); color: #a78bfa; border-color: rgba(139,92,246,0.3); }
.meth-hybrid  { background: rgba(245,158,11,0.15); color: var(--amber); border-color: rgba(245,158,11,0.3); }
.meth-predictive { background: rgba(59,130,246,0.15); color: var(--blue); border-color: rgba(59,130,246,0.3); }
.hero-desc { color: var(--text-muted); font-size: 0.9rem; margin-top: 1rem; line-height: 1.6; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; }
.kpi-value { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; margin-bottom: 0.25rem; }
.kpi-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.kpi-sub { font-size: 0.7rem; color: var(--text-muted); }

.project-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
.project-col-main, .project-col-side { display: flex; flex-direction: column; gap: 1rem; }
@media (max-width: 1100px) { .project-grid { grid-template-columns: 1fr; } }

.panel-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.panel-header h3 { margin: 0; font-size: 1rem; }

.sprint-list { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.sprint-row { background: var(--surface-2); border-radius: 8px; padding: 1rem; }
.sprint-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.sprint-name { font-weight: 600; margin-right: 0.5rem; }
.sprint-dates { font-size: 0.75rem; color: var(--text-muted); }
.sprint-progress { display: flex; align-items: center; gap: 1rem; }
.sprint-tasks-count { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.sprint-goal { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; }
.sprint-status { font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 10px; }
.status-active  { background: rgba(16,185,129,0.2); color: #10b981; }
.status-done    { background: rgba(107,114,128,0.2); color: #9ca3af; }
.status-planned { background: rgba(59,130,246,0.2); color: #3b82f6; }

.stakeholder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; padding: 1rem; }
.stakeholder-card { background: var(--surface-2); border-radius: 10px; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.sk-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--purple)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; }
.sk-name { font-weight: 600; }
.sk-role { font-size: 0.8rem; color: var(--blue); }
.sk-org  { font-size: 0.75rem; color: var(--text-muted); }
.sk-bar  { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.75rem; }
.engagement-badge { background: rgba(59,130,246,0.15); color: var(--blue); border-radius: 4px; padding: 0.2rem 0.5rem; font-size: 0.7rem; }

.info-list { padding: 1rem 1.5rem; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.info-row span { color: var(--text-muted); }
.info-row:last-child { border-bottom: none; }

.risk-mini-list { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.risk-mini-row { display: flex; justify-content: space-between; align-items: center; }
.risk-mini-title { font-size: 0.85rem; }
.risk-mini-meta { display: flex; gap: 0.5rem; align-items: center; }
.response-type { font-size: 0.7rem; background: var(--surface-2); padding: 0.15rem 0.4rem; border-radius: 4px; }

.issue-mini-list { padding: 1rem 1.5rem; }
.issue-mini-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }

/* ═══════════════════════════════════════════
   ISSUES PAGE
═══════════════════════════════════════════ */
.stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 900px) { .stats-row { grid-template-columns: repeat(3, 1fr); } }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; text-align: center; }
.stat-card.stat-danger   { border-color: rgba(239,68,68,0.3); }
.stat-card.stat-warning  { border-color: rgba(245,158,11,0.3); }
.stat-card.stat-success  { border-color: rgba(16,185,129,0.3); }
.stat-card.stat-critical { border-color: rgba(239,68,68,0.5); background: rgba(239,68,68,0.05); }
.stat-number { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; }
.stat-label  { font-size: 0.75rem; color: var(--text-muted); }
.stat-card.stat-danger .stat-number   { color: #ef4444; }
.stat-card.stat-warning .stat-number  { color: var(--amber); }
.stat-card.stat-success .stat-number  { color: #10b981; }
.stat-card.stat-critical .stat-number { color: #ef4444; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
.filter-btn { padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.78rem; color: var(--text-muted); text-decoration: none; border: 1px solid transparent; transition: all 0.2s; }
.filter-btn:hover, .filter-btn.active { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.filter-btn.active { color: var(--blue); border-color: var(--blue); }
.filter-sep { color: var(--border); padding: 0 0.25rem; }

.issues-list { display: flex; flex-direction: column; }
.issue-item { display: flex; gap: 1rem; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); align-items: flex-start; transition: background 0.15s; }
.issue-item:hover { background: var(--surface-2); }
.issue-item.issue-overdue { background: rgba(239,68,68,0.04); }
.issue-priority-bar { width: 4px; border-radius: 2px; min-height: 50px; flex-shrink: 0; }
.priority-color-critical { background: #ef4444; }
.priority-color-high     { background: #f97316; }
.priority-color-medium   { background: var(--amber); }
.priority-color-low      { background: #10b981; }
.issue-content { flex: 1; }
.issue-header  { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.issue-id      { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.issue-title   { font-weight: 500; }
.issue-meta    { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.meta-tag      { font-size: 0.72rem; color: var(--text-muted); }
.issue-desc    { font-size: 0.82rem; color: var(--text-muted); }
.issue-actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; flex-shrink: 0; }

/* ═══════════════════════════════════════════
   SPRINTS PAGE
═══════════════════════════════════════════ */
.active-sprint-banner {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem;
}
.asb-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--blue); letter-spacing: 0.15em; margin-bottom: 0.5rem; }
.asb-name  { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.asb-goal  { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.asb-stats { display: flex; gap: 2rem; margin-bottom: 1rem; }
.asb-stat  { text-align: center; }
.asb-stat strong { display: block; font-family: var(--font-mono); font-size: 1.5rem; }
.asb-stat span   { font-size: 0.72rem; color: var(--text-muted); }
.asb-progress { margin-bottom: 1rem; }

.sprint-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; padding: 1.5rem; }
.sprint-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; transition: border-color 0.2s; }
.sprint-card-active  { border-color: rgba(59,130,246,0.4); }
.sprint-card-done    { opacity: 0.6; }
.sc-header  { display: flex; justify-content: space-between; align-items: flex-start; }
.sc-project { font-family: var(--font-mono); font-size: 0.7rem; color: var(--blue); }
.sc-name    { font-weight: 600; margin-top: 0.2rem; }
.sc-status  { display: flex; align-items: center; gap: 0.4rem; }
.sc-goal    { font-size: 0.82rem; color: var(--text-muted); }
.sc-dates   { font-size: 0.78rem; color: var(--text-muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.25rem; }
.sc-task-count { font-size: 0.75rem; color: var(--text-muted); }
.sc-velocity   { display: flex; justify-content: space-between; font-size: 0.8rem; }
.vel-label { color: var(--text-muted); }
.vel-value { font-family: var(--font-mono); color: var(--amber); }
.sc-actions { display: flex; gap: 0.5rem; }
.days-left-badge { background: rgba(245,158,11,0.15); color: var(--amber); padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.72rem; }
.sprint-status-badge { font-size: 0.72rem; padding: 0.15rem 0.5rem; border-radius: 4px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.6;transform:scale(1.3)} }

/* ═══════════════════════════════════════════
   REPORTS PAGE
═══════════════════════════════════════════ */
.section-title { font-family: var(--font-display); font-size: 0.75rem; letter-spacing: 0.15em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 1rem; }
.report-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 800px) { .report-kpis { grid-template-columns: repeat(2, 1fr); } }
.rkpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem; }
.rkpi-big   { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; }
.rkpi-label { font-size: 0.8rem; color: var(--text-muted); margin: 0.25rem 0; }
.rkpi-sub   { font-size: 0.72rem; color: var(--text-muted); }

.reports-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.report-card { min-height: 250px; }
.report-card-wide { grid-column: 1 / -1; }

/* Donut chart */
.health-donut { display: flex; gap: 2rem; align-items: center; padding: 1.5rem; flex-wrap: wrap; }
.donut-chart  { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.circular-chart { transform: rotate(-90deg); }
.circle-track  { fill: none; stroke: var(--surface-2); stroke-width: 3.5; }
.circle-green  { fill: none; stroke: #10b981; stroke-width: 3.5; stroke-linecap: round; }
.circle-yellow { fill: none; stroke: var(--amber); stroke-width: 3.5; stroke-linecap: round; }
.circle-red    { fill: none; stroke: #ef4444; stroke-width: 3.5; stroke-linecap: round; }
.donut-center  { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-num     { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; line-height: 1; }
.donut-label   { font-size: 0.6rem; color: var(--text-muted); }
.donut-legend  { display: flex; flex-direction: column; gap: 0.5rem; }
.dl-item       { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; }
.dl-dot        { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dl-dot.green  { background: #10b981; }
.dl-dot.yellow { background: var(--amber); }
.dl-dot.red    { background: #ef4444; }

/* Bar chart */
.bar-chart-v { display: flex; align-items: flex-end; gap: 0.75rem; padding: 1.5rem; height: 200px; justify-content: center; }
.bar-col     { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; flex: 1; }
.bar-outer   { height: 130px; display: flex; align-items: flex-end; width: 100%; }
.bar-fill    { width: 100%; border-radius: 4px 4px 0 0; transition: height 0.5s ease; min-height: 4px; }
.bar-value   { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; }
.bar-label   { font-size: 0.65rem; color: var(--text-muted); text-align: center; }

/* Risk breakdown */
.risk-breakdown { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.risk-level-row  { display: flex; align-items: center; gap: 1rem; }
.rl-label { display: flex; align-items: center; gap: 0.5rem; width: 120px; font-size: 0.82rem; flex-shrink: 0; }
.rl-bar   { flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.rl-fill  { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.rl-fill.risk-critical { background: #7f1d1d; }
.rl-fill.risk-high     { background: #ef4444; }
.rl-fill.risk-medium   { background: var(--amber); }
.rl-fill.risk-low      { background: #10b981; }
.rl-count { font-family: var(--font-mono); font-size: 0.85rem; width: 30px; text-align: right; }
.risk-total-note { padding: 0 1.5rem 1.5rem; font-size: 0.75rem; color: var(--text-muted); }

/* EVM table */
.evm-bar-wrap { background: var(--surface-2); border-radius: 3px; height: 6px; }
.evm-bar      { height: 6px; border-radius: 3px; }
.evm-legend   { padding: 1rem 1.5rem; font-size: 0.75rem; color: var(--text-muted); }

/* Velocity */
.velocity-chart { display: flex; align-items: flex-end; gap: 0.75rem; padding: 1.5rem; height: 220px; }
.vel-col   { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; flex: 1; }
.vel-bars  { display: flex; gap: 3px; align-items: flex-end; height: 140px; }
.vel-planned { background: rgba(59,130,246,0.3); width: 16px; border-radius: 3px 3px 0 0; }
.vel-actual  { background: #3b82f6; width: 16px; border-radius: 3px 3px 0 0; }
.vel-label   { font-size: 0.65rem; color: var(--text-muted); }
.vel-pct     { font-size: 0.7rem; font-family: var(--font-mono); }
.vel-legend  { display: flex; gap: 1.5rem; padding: 0 1.5rem 1.5rem; font-size: 0.75rem; color: var(--text-muted); }
.vel-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.vel-legend-dot.planned { background: rgba(59,130,246,0.3); }
.vel-legend-dot.actual  { background: #3b82f6; }

/* Risk exposure */
.risk-exposure-list { padding: 1rem 1.5rem; }
.rel-row { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.rel-rank { font-family: var(--font-mono); font-size: 1.2rem; color: var(--text-muted); width: 24px; }
.rel-info { flex: 1; }
.rel-name { font-weight: 500; font-size: 0.9rem; }
.rel-code { font-size: 0.72rem; }
.rel-risks { display: flex; gap: 0.75rem; font-size: 0.78rem; flex-shrink: 0; }

/* PMI tip in reports */
.pmi-report-tip { display: flex; gap: 1.5rem; margin-top: 1.5rem; align-items: flex-start; }
.tip-icon  { font-size: 2rem; flex-shrink: 0; }
.tip-title { font-weight: 600; margin-bottom: 0.5rem; }
.tip-text  { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; }

/* ═══════════════════════════════════════════
   SETTINGS PAGE
═══════════════════════════════════════════ */
.settings-layout  { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 700px) { .settings-layout { grid-template-columns: 1fr; } }
.settings-nav { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.sn-item { width: 100%; background: none; border: none; border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; text-align: left; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; transition: all 0.2s; }
.sn-item:last-child { border-bottom: none; }
.sn-item:hover { background: var(--surface-2); color: var(--text); }
.sn-item.active { background: var(--surface-2); color: var(--blue); border-left: 3px solid var(--blue); }

.stab-panel { display: none; }
.stab-panel.active { display: block; }

.profile-avatar-section { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.5rem; }
.big-avatar { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--purple)); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; flex-shrink: 0; }
.profile-name { font-weight: 600; font-size: 1.1rem; }
.profile-role-badge { background: rgba(59,130,246,0.15); color: var(--blue); padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.75rem; margin-top: 0.25rem; display: inline-block; }

.role-badge { padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.75rem; }
.role-admin  { background: rgba(239,68,68,0.15); color: #ef4444; }
.role-pm     { background: rgba(59,130,246,0.15); color: var(--blue); }
.role-member { background: rgba(16,185,129,0.15); color: #10b981; }
.role-viewer { background: rgba(107,114,128,0.2); color: #9ca3af; }
.row-inactive { opacity: 0.5; }

.form-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.form-footer  { display: flex; justify-content: flex-end; margin-top: 1.5rem; }
.settings-form { padding: 1.5rem; }

/* PMI Reference */
.pmi-ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; padding: 1.5rem; }
.pmi-domain-title { font-family: var(--font-mono); font-size: 0.8rem; color: var(--blue); letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.pmi-items { display: flex; flex-direction: column; gap: 0.4rem; }
.pmi-item { font-size: 0.82rem; color: var(--text-muted); padding: 0.3rem 0; border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.05)); line-height: 1.4; }
.pmi-item strong { color: var(--text); }

.pmi-formulas { display: flex; flex-direction: column; gap: 0.4rem; }
.formula-row  { display: flex; align-items: center; gap: 0.75rem; font-size: 0.82rem; padding: 0.3rem 0; border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.05)); }
.formula-name { font-family: var(--font-mono); color: var(--amber); font-weight: 600; width: 40px; }
.formula-eq   { font-family: var(--font-mono); font-size: 0.78rem; color: var(--blue); width: 120px; }
.formula-desc { color: var(--text-muted); }

.stakeholder-matrix-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.sm-quad { padding: 1rem 0.75rem; border-radius: 6px; font-size: 0.78rem; font-weight: 500; }
.sm-quad small { display: block; font-size: 0.7rem; font-weight: 400; opacity: 0.8; margin-top: 0.2rem; }
.sm-manage  { background: rgba(239,68,68,0.15); color: #ef4444; }
.sm-satisfy { background: rgba(245,158,11,0.15); color: var(--amber); }
.sm-inform  { background: rgba(59,130,246,0.15); color: var(--blue); }
.sm-monitor { background: rgba(107,114,128,0.15); color: #9ca3af; }

/* Alert messages */
.alert { padding: 0.875rem 1.25rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: #10b981; }
.alert-error   { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #ef4444; }

/* btn-xs */
.btn-xs { padding: 0.2rem 0.6rem; font-size: 0.72rem; border-radius: 4px; }
.btn-success { background: rgba(16,185,129,0.2); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.btn-link { font-size: 0.78rem; color: var(--blue); text-decoration: none; }
.btn-link:hover { text-decoration: underline; }
.select-sm { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 0.3rem 0.75rem; border-radius: 6px; font-size: 0.82rem; }

/* ── Layout wrapper (new pages) ── */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.main-wrapper .main-content {
  flex: 1;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
@media (max-width: 768px) {
  .main-wrapper { margin-left: 0; }
}
/* Legacy page-body compat */
.page-body { flex: 1; padding: 28px; }
