/* ═══════════════════════════════════════════════════════
   IntelliPlan · Dark Theme
   Syne (headings) · DM Sans (body) · DM Mono (data)
═══════════════════════════════════════════════════════ */

:root {
  --bg-base:      #0a0e1a;
  --bg-surface:   #0f1628;
  --bg-card:      #141d35;
  --bg-elevated:  #1a2540;
  --bg-hover:     #1f2d4a;

  --border:       rgba(255,255,255,0.07);
  --border-md:    rgba(255,255,255,0.12);
  --border-hi:    rgba(255,255,255,0.20);

  --text-primary:   #e8edf8;
  --text-secondary: #8896b3;
  --text-muted:     #4f5f7a;

  --accent:      #3d7eff;
  --accent-glow: rgba(61,126,255,0.25);
  --accent-dim:  rgba(61,126,255,0.12);
  --teal:        #00d4aa;
  --teal-dim:    rgba(0,212,170,0.12);
  --amber:       #f5a623;
  --amber-dim:   rgba(245,166,35,0.12);
  --red:         #ff4d6d;
  --red-dim:     rgba(255,77,109,0.12);
  --purple:      #a78bfa;
  --purple-dim:  rgba(167,139,250,0.12);

  --s-active:   #00d4aa;
  --s-complete: #3d7eff;
  --s-planning: #8896b3;
  --s-hold:     #f5a623;
  --s-blocked:  #ff4d6d;
  --s-cancel:   #4f5f7a;

  --sidebar-w: 200px;
  --topbar-h:  62px;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);

  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
.sidebar-scroll {
  flex: 1 1 0;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.logo-icon {
  width: 160px; height: 60px;
  display: grid; place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.logo-icon img { width: 160px; height: 60px; object-fit: contain; display: block; }
.logo-text { display: none; }
.logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.3px;
}

.nav-list { padding: 4px 10px; flex: 1; overflow-y: auto; }
.nav-list li { margin-bottom: 1px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.18s;
  position: relative;
}
.nav-link i { width: 17px; text-align: center; font-size: 13px; flex-shrink: 0; }
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-link.active {
  color: var(--accent);
  background: var(--accent-dim);
  font-weight: 600;
}
.nav-link.active::before {
  content: '';
  position: absolute; left: 0; top: 7px; bottom: 7px;
  width: 3px; background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}
.app-ver { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 199;
  backdrop-filter: blur(2px);
}

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

/* ── Topbar ──────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 26px;
  position: sticky; top: 0; z-index: 100;
}
.topbar-title h1 {
  font-family: var(--font-head);
  font-size: 19px; font-weight: 700;
  letter-spacing: -0.3px;
}
.topbar-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.mobile-menu-btn {
  display: none;
  background: none; border: none;
  color: var(--text-secondary);
  font-size: 18px; cursor: pointer; padding: 4px;
}

/* ── Page content ────────────────────────────────────── */
.content { padding: 24px 26px; flex: 1; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none;
  transition: all 0.18s;
  white-space: nowrap; line-height: 1;
}
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #5590ff; box-shadow: 0 0 20px var(--accent-glow); }
.btn-ghost    { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border-md); }
.btn-ghost:hover  { color: var(--text-primary); border-color: var(--border-hi); }
.btn-sm       { padding: 5px 11px; font-size: 12px; }

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 16px;
}
.card-title {
  font-family: var(--font-head);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-secondary);
}
.card-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ── Stat cards ──────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
.stat-card.c-blue::after   { background: var(--accent); }
.stat-card.c-teal::after   { background: var(--teal); }
.stat-card.c-amber::after  { background: var(--amber); }
.stat-card.c-red::after    { background: var(--red); }
.stat-card.c-purple::after { background: var(--purple); }

.stat-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-muted); margin-bottom: 8px;
}
.stat-value {
  font-family: var(--font-head);
  font-size: 26px; font-weight: 800;
  line-height: 1; margin-bottom: 5px;
}
.stat-meta { font-size: 12px; color: var(--text-secondary); }
.stat-bg-icon {
  position: absolute; right: 16px; top: 14px;
  font-size: 32px; opacity: 0.07;
  color: var(--text-primary);
}

/* ── Status & priority badges ────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.badge::before {
  content: ''; width: 5px; height: 5px;
  border-radius: 50%; background: currentColor;
  flex-shrink: 0;
}

.status-active   { background: var(--teal-dim);   color: var(--teal);   }
.status-complete { background: var(--accent-dim);  color: var(--accent); }
.status-planning { background: rgba(136,150,179,.1); color: var(--text-secondary); }
.status-hold     { background: var(--amber-dim);   color: var(--amber);  }
.status-blocked  { background: var(--red-dim);     color: var(--red);    }
.status-cancelled{ background: rgba(79,95,122,.15); color: var(--text-muted); }

.priority-critical { color: var(--red);    font-weight: 700; font-size: 12px; }
.priority-high     { color: var(--amber);  font-weight: 700; font-size: 12px; }
.priority-medium   { color: var(--accent);             font-size: 12px; }
.priority-low      { color: var(--text-muted);          font-size: 12px; }

/* ── Company dot / badge ─────────────────────────────── */
.co-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; flex-shrink: 0;
}

/* ── Progress bars ───────────────────────────────────── */
.progress-track {
  height: 5px; background: rgba(255,255,255,0.06);
  border-radius: 10px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 10px;
  transition: width 0.7s ease; width: 0;
}
.pf-blue   { background: var(--accent); }
.pf-teal   { background: var(--teal); }
.pf-amber  { background: var(--amber); }
.pf-red    { background: var(--red); }

/* ── Tables ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 9px 13px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.14s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-hover); }
tbody td {
  padding: 11px 13px;
  font-size: 13px;
  color: var(--text-secondary);
  vertical-align: middle;
}
.td-main  { color: var(--text-primary) !important; font-weight: 500; }
.td-mono  { font-family: var(--font-mono); font-size: 12px; }
.td-right { text-align: right; }

/* ── Grids ───────────────────────────────────────────── */
.g-kpi   { display: grid; grid-template-columns: repeat(6,1fr); gap: 14px; margin-bottom: 22px; }
.g-mid   { display: grid; grid-template-columns: 2fr 1fr;       gap: 16px; margin-bottom: 16px; }
.g-bot   { display: grid; grid-template-columns: 1fr 1fr 1fr;   gap: 16px; }
.g-2     { display: grid; grid-template-columns: 1fr 1fr;        gap: 16px; }

@media(max-width:1280px){ .g-kpi { grid-template-columns: repeat(3,1fr); } }
@media(max-width:1100px){ .g-mid { grid-template-columns: 1fr; } .g-bot { grid-template-columns: 1fr 1fr; } }
@media(max-width:768px) {
  .g-kpi,.g-bot,.g-2 { grid-template-columns: 1fr 1fr; }
  .g-mid { grid-template-columns: 1fr; }
}
@media(max-width:500px) { .g-kpi,.g-bot,.g-2 { grid-template-columns: 1fr; } }

/* ── Milestone timeline list ─────────────────────────── */
.ms-list { display: flex; flex-direction: column; }
.ms-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.ms-item:last-child { border-bottom: none; }
.ms-dot-col { display: flex; flex-direction: column; align-items: center; padding-top: 3px; }
.ms-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.ms-line { width: 1px; flex: 1; background: var(--border); min-height: 18px; margin-top: 4px; }
.ms-body { flex: 1; min-width: 0; }
.ms-proj { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1px; }
.ms-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ms-date { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ms-overdue { color: var(--red) !important; }

/* ── Budget rows ─────────────────────────────────────── */
.bud-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.bud-row:last-child { border-bottom: none; }
.bud-name  { flex: 1; font-size: 13px; font-weight: 600; }
.bud-bar   { flex: 2; }
.bud-nums  { text-align: right; min-width: 75px; }
.bud-act   { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.bud-tot   { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

/* ── Task status bars ────────────────────────────────── */
.task-bars { display: flex; flex-direction: column; gap: 9px; }
.task-bar-row { display: flex; align-items: center; gap: 10px; }
.task-bar-label { font-size: 12px; color: var(--text-secondary); width: 88px; flex-shrink: 0; }
.task-bar-wrap  { flex: 1; }
.task-bar-count { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); width: 26px; text-align: right; }

/* ── Meetings list ───────────────────────────────────── */
.meet-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.meet-item:last-child { border-bottom: none; }
.meet-date { text-align: center; min-width: 38px; }
.meet-day  { font-family: var(--font-head); font-size: 19px; font-weight: 800; line-height: 1; }
.meet-mon  { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); }
.meet-body { flex: 1; min-width: 0; }
.meet-title{ font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meet-meta { font-size: 11px; color: var(--text-muted); }
.meet-dur  { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

/* ── Time log list ───────────────────────────────────── */
.time-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.time-item:last-child { border-bottom: none; }
.time-body { flex: 1; min-width: 0; }
.time-desc { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time-sub  { font-size: 11px; color: var(--text-muted); }
.time-right{ display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.time-hrs  { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.pill { font-size: 10px; padding: 2px 7px; border-radius: 10px; }
.pill-bill { background: var(--teal-dim); color: var(--teal); }
.pill-int  { background: rgba(79,95,122,.15); color: var(--text-muted); }

/* ── Alert strip ─────────────────────────────────────── */
.alert-strip {
  display: flex; align-items: center; gap: 10px;
  background: var(--red-dim);
  border: 1px solid rgba(255,77,109,.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 13px;
}
.alert-strip i { color: var(--red); flex-shrink: 0; }

/* ── Divider pill ────────────────────────────────────── */
.section-label {
  font-family: var(--font-head);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── Utilities ───────────────────────────────────────── */
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.pt-4 { padding-top: 14px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.justify-between { justify-content: space-between; }
.text-muted { color: var(--text-muted); }
.text-teal  { color: var(--teal); }
.mono       { font-family: var(--font-mono); }
.no-data    { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ── Responsive ──────────────────────────────────────── */
@media(max-width:768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 40px rgba(0,0,0,0.5); }
  .sidebar-overlay.show { display: block; }
  .main { margin-left: 0; }
  .mobile-menu-btn { display: flex; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
}

/* ── Theme & sidebar user additions ───────────────────────────────── */



.sidebar-user {
    display: flex; align-items: center; gap: 9px;
    padding: 10px 0 8px; margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.su-avatar {
    width: 30px; height: 30px; border-radius: 8px;
    display: grid; place-items: center;
    font-family: var(--font-head); font-size: 13px;
    font-weight: 800; color: #fff; flex-shrink: 0;
}
.su-info   { flex: 1; min-width: 0; }
.su-name   { font-size: 12px; font-weight: 600; color: var(--text-primary);
              white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-role   { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.su-logout { color: var(--text-muted); font-size: 14px; padding: 4px;
              transition: color .15s; text-decoration: none; flex-shrink: 0; }
.su-logout:hover { color: var(--red); }

.theme-switcher {
    display: flex; align-items: center; justify-content: space-between;
    margin: 8px 0 6px;
}
.ts-label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.ts-btns  { display: flex; gap: 3px; }
.ts-btn {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: 6px; color: var(--text-muted);
    width: 26px; height: 24px; display: grid; place-items: center;
    font-size: 11px; cursor: pointer; transition: all .15s;
}
.ts-btn:hover    { color: var(--text-primary); border-color: var(--border-hi); }
.ts-btn.ts-active{ background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Light theme overrides ─────────────────────────────────────────── */
[data-theme="light"] .sidebar { box-shadow: 2px 0 12px rgba(0,0,0,0.06); }
[data-theme="light"] .topbar  { box-shadow: 0 1px 8px rgba(0,0,0,0.06); }
[data-theme="light"] .stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.10); }
[data-theme="light"] tbody tr:hover { background: var(--bg-hover); }

/* ── Navy theme accent overrides ───────────────────────────────────── */
[data-theme="navy"] .logo-text { color: #f5a623; }
[data-theme="navy"] .nav-link.active { color: #f5a623; background: rgba(245,166,35,.1); }
[data-theme="navy"] .nav-link.active::before { background: #f5a623; }

/* ── Nav divider ─────────────────────────────────────── */
.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 10px;
}

/* ── Topbar user dropdown ────────────────────────────────────── */
.tb-user {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 8px;
}
.tb-avatar-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--border-md);
  border-radius: 20px; padding: 3px 10px 3px 3px;
  cursor: pointer; transition: all .18s;
}
.tb-avatar-btn:hover { border-color: var(--border-hi); background: var(--bg-elevated); }
.tb-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-size: 12px;
  font-weight: 800; color: #fff; flex-shrink: 0;
}
.tb-caret {
  font-size: 10px; color: var(--text-muted);
  transition: transform .2s; pointer-events: none;
}

.tb-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  z-index: 9999;
  overflow: hidden;
}
.tb-dropdown.open { display: block; animation: tbddFade .15s ease; }
@keyframes tbddFade {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.tb-dd-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--bg-elevated);
}
.tb-dd-avatar {
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--font-head); font-size: 14px;
  font-weight: 800; color: #fff; flex-shrink: 0;
}
.tb-dd-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.tb-dd-role { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-top: 1px; }

.tb-dd-sep { height: 1px; background: var(--border); margin: 2px 0; }

.tb-dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  transition: background .14s, color .14s;
}
.tb-dd-item i { width: 16px; text-align: center; color: var(--text-muted); font-size: 13px; }
.tb-dd-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.tb-dd-item:hover i { color: var(--accent); }
.tb-dd-danger { color: var(--red) !important; }
.tb-dd-danger i { color: var(--red) !important; }
.tb-dd-danger:hover { background: var(--red-dim) !important; }

/* ═══════════════════════════════════════════════════════
   IntelliPlan · Page Component Styles
   (Drawer, KPI grids, company cards, filter bars, etc.)
═══════════════════════════════════════════════════════ */

/* ── Universal Drawer ────────────────────────────────── */
.drawer-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.65); z-index: 300;
  backdrop-filter: blur(3px);
}
.drawer-backdrop.open { display: block; }
.drawer {
  position: fixed; top: 0; right: -560px; bottom: 0;
  width: 520px; max-width: 96vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 301;
  transition: right .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.drawer.open { right: 0; }
.drawer form,
.drawer .drawer-form { display:flex; flex-direction:column; flex:1 1 0; min-height:0; overflow:hidden; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.drawer-title { font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.drawer-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.drawer-close:hover { color: var(--text-primary); }
.drawer-body {
  padding: 20px 24px; overflow-y: auto; overflow-x: hidden;
  flex: 1 1 0; min-height: 0; -webkit-overflow-scrolling: touch;
}
.drawer-foot {
  padding: 14px 24px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; flex-shrink: 0;
}
.drawer-foot .btn { flex: 1; justify-content: center; padding: 10px; }

/* ── Form components (used in drawers/modals) ────────── */
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group  { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-label  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); }
.form-label .req { color: var(--red); }
.form-input, .form-select, .form-select-f, .form-textarea {
  background: var(--bg-elevated); border: 1px solid var(--border-md);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: var(--font-body); font-size: 13px;
  padding: 8px 11px; outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-select-f:focus, .form-textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 65px; }
.form-select option, .form-select-f option { background: var(--bg-elevated); }
.section-divider {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--text-muted);
  margin: 14px 0 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border); grid-column: 1 / -1;
}

/* ── Flash messages ──────────────────────────────────── */
.flash { display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:var(--radius-sm); margin-bottom:16px; font-size:13px; }
.flash-ok  { background:var(--teal-dim);  border:1px solid rgba(0,212,170,.2);  color:var(--teal); }
.flash-err { background:var(--red-dim);   border:1px solid rgba(255,77,109,.2); color:var(--red); }
.flash-warn{ background:var(--amber-dim); border:1px solid rgba(245,166,35,.2); color:var(--amber); }

/* ── KPI grids ───────────────────────────────────────── */
.g-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.kpi-grid-6 { display:grid; grid-template-columns:repeat(6,1fr); gap:12px; margin-bottom:22px; }
.kpi-grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:22px; }
@media(max-width:1100px){ .kpi-grid-6{grid-template-columns:repeat(3,1fr);} .kpi-grid-4{grid-template-columns:repeat(2,1fr);} }
@media(max-width:600px) { .kpi-grid-6,.kpi-grid-4{grid-template-columns:repeat(2,1fr);} }
.mini-kpi { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 14px; text-align:center; }
.mini-kpi-val { font-family:var(--font-head); font-size:22px; font-weight:800; line-height:1; margin-bottom:4px; }
.mini-kpi-lbl { font-size:10px; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); }

/* ── Company cards ───────────────────────────────────── */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.company-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, box-shadow .2s; cursor: pointer;
}
.company-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.company-card-stripe { height: 4px; }
.company-card-body { padding: 18px 20px; }
.company-card-head { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.company-badge {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-head); font-size: 14px; font-weight: 800;
  color: #fff; flex-shrink: 0;
}
.company-name { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--text-primary); }
.company-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.company-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:12px; }
.co-stat { background:var(--bg-elevated); border-radius:var(--radius-sm); padding:8px; text-align:center; }
.co-stat-val { font-family:var(--font-head); font-size:18px; font-weight:800; line-height:1; }
.co-stat-lbl { font-size:10px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; margin-top:3px; }
.company-footer { display:flex; gap:6px; padding-top:10px; border-top:1px solid var(--border); }
.company-footer .btn { flex:1; justify-content:center; }

/* ── Table wrapper ───────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
  padding: 9px 14px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted);
  background: var(--bg-elevated); border-bottom: 1px solid var(--border);
  white-space: nowrap; text-align: left;
}
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background .14s; }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table tbody td { padding: 10px 14px; font-size: 13px; color: var(--text-secondary); vertical-align: middle; }
.td-right { text-align: right; }
.td-mono  { font-family: var(--font-mono); }

/* ── Filter bars ─────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 8px; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.filter-bar .form-select,
.filter-bar .form-input { height: 34px; padding: 5px 10px; width: auto; }
.filter-bar .form-input { width: 200px; }
.filter-bar .form-select { min-width: 120px; max-width: 180px; }
.filter-divider { width:1px; height:22px; background:var(--border); flex-shrink:0; }
.filter-count { margin-left:auto; font-size:12px; color:var(--text-muted); white-space:nowrap; }

/* ── View toggle ─────────────────────────────────────── */
.view-toggle {
  display: flex; background: var(--bg-elevated);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm); padding: 3px; gap: 2px;
}
.vt-btn {
  background: none; border: none; color: var(--text-muted);
  width: 30px; height: 28px; border-radius: 6px;
  display: grid; place-items: center; font-size: 13px;
  cursor: pointer; transition: all .15s;
}
.vt-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.vt-btn.active { background: var(--accent); color: #fff; }

/* ── Slide panel (view detail panel below content) ───── */
.view-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-top: 24px; overflow: hidden;
}
.view-panel-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 24px; background: var(--bg-elevated);
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.view-panel-actions { margin-left: auto; display: flex; gap: 8px; }

/* ── Toggle switch ───────────────────────────────────── */
.toggle-wrap { display:flex; align-items:center; gap:10px; }
.toggle { position:relative; width:40px; height:22px; }
.toggle input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; inset:0; background:var(--bg-elevated); border:1px solid var(--border-md); border-radius:22px; cursor:pointer; transition:background .2s; }
.toggle-slider::before { content:''; position:absolute; width:16px; height:16px; border-radius:50%; background:var(--text-muted); top:2px; left:2px; transition:transform .2s, background .2s; }
.toggle input:checked + .toggle-slider { background:var(--teal-dim); border-color:var(--teal); }
.toggle input:checked + .toggle-slider::before { transform:translateX(18px); background:var(--teal); }
.toggle-label { font-size:13px; color:var(--text-secondary); }

/* ── Variance colours ────────────────────────────────── */
.var-pos { color: var(--teal); }
.var-neg { color: var(--red); font-weight: 700; }

/* ── Alert strip ─────────────────────────────────────── */
.alert-strip {
  display: flex; align-items: center; gap: 10px;
  background: var(--red-dim); border: 1px solid rgba(255,77,109,.2);
  border-radius: var(--radius-sm); padding: 10px 14px;
  margin-bottom: 18px; font-size: 13px; color: var(--red);
}

/* ── Accordion ───────────────────────────────────────── */
.proj-accordion { display: flex; flex-direction: column; gap: 10px; }
.proj-block { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.proj-block-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.proj-block-header:hover { background: var(--bg-hover); }
.proj-block-name { font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--text-primary); }
.proj-block-code { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.proj-block-co   { font-size: 12px; color: var(--text-muted); }
.proj-block-stats { display:flex; align-items:center; gap:16px; margin-left:auto; }
.proj-stat { text-align:center; }
.proj-stat-val { font-family:var(--font-head); font-size:15px; font-weight:800; color:var(--text-primary); }
.proj-stat-lbl { font-size:10px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; }
.proj-body { padding: 0; }

/* ── WBS tree ────────────────────────────────────────── */
.wbs-row td { cursor: default; }
.wbs-code { font-family:var(--font-mono); font-size:12px; color:var(--accent); font-weight:700; }
.wbs-name { font-size:13px; color:var(--text-primary); }
.wbs-toggle { background:none; border:none; color:var(--text-muted); cursor:pointer; width:18px; height:18px; display:inline-grid; place-items:center; font-size:11px; flex-shrink:0; padding:0; }
.wbs-toggle:hover { color:var(--accent); }
.level-badge { font-family:var(--font-mono); font-size:10px; font-weight:700; padding:2px 6px; border-radius:4px; }
.level-1 { background:var(--accent-dim);  color:var(--accent); }
.level-2 { background:var(--teal-dim);    color:var(--teal); }
.level-3 { background:var(--amber-dim);   color:var(--amber); }
.level-4 { background:var(--purple-dim);  color:var(--purple); }

/* ── Budget line table ───────────────────────────────── */
.line-table { width:100%; border-collapse:collapse; }
.line-table thead th { padding:8px 12px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); background:var(--bg-elevated); border-bottom:1px solid var(--border); text-align:right; white-space:nowrap; }
.line-table thead th:first-child { text-align:left; }
.line-table tbody tr { border-bottom:1px solid var(--border); transition:background .14s; }
.line-table tbody tr:hover { background:var(--bg-hover); }
.line-table tbody td { padding:9px 12px; font-size:13px; color:var(--text-secondary); text-align:right; vertical-align:middle; }
.line-table tbody td:first-child { text-align:left; color:var(--text-primary); }
.line-qty { font-family:var(--font-mono); font-size:12px; }
.totals-row td { background:var(--bg-elevated); font-weight:700; color:var(--text-primary) !important; font-family:var(--font-mono); font-size:12px; }

/* ── Gantt ───────────────────────────────────────────── */
.gantt-wrap { overflow-x:auto; }
.gantt-header { display:flex; border-bottom:1px solid var(--border); background:var(--bg-elevated); }
.gantt-label-col { width:240px; flex-shrink:0; padding:8px 14px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--text-muted); }
.gantt-months { flex:1; display:flex; }
.gantt-month { flex:1; padding:8px 6px; font-size:11px; font-weight:600; color:var(--text-muted); text-align:center; border-left:1px solid var(--border); white-space:nowrap; }
.gantt-row { display:flex; border-bottom:1px solid var(--border); min-height:36px; align-items:center; }
.gantt-row:hover { background:var(--bg-hover); }
.gantt-row-label { width:240px; flex-shrink:0; padding:6px 14px; font-size:13px; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gantt-row-bars { flex:1; position:relative; height:36px; }
.gantt-bar { position:absolute; top:8px; height:20px; border-radius:4px; min-width:4px; }
.gantt-bar-ms { position:absolute; top:11px; width:14px; height:14px; background:var(--accent); transform:rotate(45deg); border-radius:2px; }
.gantt-today { position:absolute; top:0; bottom:0; width:2px; background:var(--red); opacity:.6; z-index:2; }

/* ── Calendar (meetings) ─────────────────────────────── */
.cal-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:0; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.cal-day-head { padding:10px 14px; background:var(--bg-elevated); border-bottom:1px solid var(--border); border-right:1px solid var(--border); }
.cal-day-head:last-child { border-right:none; }
.cal-day-name { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--text-muted); }
.cal-day-num  { font-family:var(--font-head); font-size:20px; font-weight:800; line-height:1; margin-top:2px; color:var(--text-primary); }
.cal-col { border-right:1px solid var(--border); min-height:200px; padding:8px; display:flex; flex-direction:column; gap:4px; }
.cal-col:last-child { border-right:none; }
.cal-col.today-col { background:rgba(61,126,255,.03); }
.cal-meeting-chip { padding:5px 8px; border-radius:6px; cursor:pointer; font-size:11px; font-weight:600; color:#fff; line-height:1.3; border-left:3px solid rgba(255,255,255,.4); transition:opacity .15s; display:block; text-decoration:none; }
.cal-meeting-chip:hover { opacity:.85; }
.cal-task-chip { padding:4px 8px; border-radius:5px; font-size:11px; background:var(--bg-elevated); border:1px solid var(--border); color:var(--text-secondary); display:flex; align-items:center; gap:5px; cursor:pointer; transition:background .14s; text-decoration:none; }
.cal-task-chip:hover { background:var(--bg-hover); color:var(--text-primary); }

/* ── Kanban ──────────────────────────────────────────── */
.kanban-wrap { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; align-items:start; }
@media(max-width:1200px){ .kanban-wrap{grid-template-columns:repeat(3,1fr);} }
@media(max-width:800px) { .kanban-wrap{grid-template-columns:repeat(2,1fr);} }
.kanban-col { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.kanban-col-head { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid var(--border); position:relative; }
.kanban-col-head::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; }
.kh-not-started::before { background:var(--text-muted); }
.kh-in-progress::before { background:var(--accent); }
.kh-blocked::before     { background:var(--red); }
.kh-complete::before    { background:var(--teal); }
.kh-cancelled::before   { background:var(--border-hi); }
.kanban-col-title { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--text-secondary); }
.kanban-col-count { font-family:var(--font-mono); font-size:11px; color:var(--text-muted); }
.kanban-cards { padding:10px; display:flex; flex-direction:column; gap:8px; min-height:60px; }
.kanban-card { background:var(--bg-elevated); border:1px solid var(--border); border-radius:var(--radius-sm); padding:10px 12px; transition:box-shadow .2s, transform .2s; }
.kanban-card:hover { box-shadow:var(--shadow); transform:translateY(-1px); }

/* ── Resource tabs ───────────────────────────────────── */
.res-tab-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.res-tabs { display:flex; gap:2px; flex-wrap:wrap; }
.res-tab { display:inline-flex; align-items:center; gap:7px; padding:10px 16px; cursor:pointer; font-size:13px; font-weight:600; color:var(--text-muted); border-bottom:2px solid transparent; margin-bottom:-1px; transition:all .18s; text-decoration:none; white-space:nowrap; }
.res-tab:hover { color:var(--text-primary); }
.res-tab.active { color:var(--tab-color, var(--accent)); border-bottom-color:var(--tab-color, var(--accent)); }
.res-tab-count { font-family:var(--font-mono); font-size:11px; background:var(--bg-elevated); padding:1px 7px; border-radius:20px; color:var(--text-muted); }
.res-tab.active .res-tab-count { background:var(--accent-dim); color:var(--accent); }

/* ── Resource cards ──────────────────────────────────── */
.res-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:14px; }
.res-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; transition:transform .2s, box-shadow .2s; }
.res-card:hover { transform:translateY(-2px); box-shadow:var(--shadow); }
.res-card.inactive { opacity:.5; }
.res-card-top { height:4px; }
.res-card-body { padding:16px 18px; }
.res-card-header { display:flex; align-items:flex-start; gap:12px; margin-bottom:12px; }
.res-avatar { width:40px; height:40px; border-radius:10px; display:grid; place-items:center; font-size:15px; flex-shrink:0; }
.res-name-wrap { flex:1; min-width:0; }
.res-name { font-family:var(--font-head); font-size:14px; font-weight:700; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.res-role { font-size:12px; color:var(--text-secondary); margin-top:2px; }
.res-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-bottom:12px; }
.res-stat { background:var(--bg-elevated); border-radius:var(--radius-sm); padding:7px 9px; text-align:center; }
.res-stat-val { font-family:var(--font-head); font-size:15px; font-weight:800; line-height:1; color:var(--text-primary); }
.res-stat-lbl { font-size:10px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.4px; margin-top:2px; }
.res-rate { display:flex; align-items:center; justify-content:space-between; padding:8px 10px; background:var(--bg-elevated); border-radius:var(--radius-sm); margin-bottom:12px; font-size:12px; }
.res-rate-val { font-family:var(--font-mono); font-size:14px; font-weight:700; color:var(--text-primary); }
.res-meta { font-size:12px; color:var(--text-muted); margin-bottom:12px; display:flex; flex-direction:column; gap:3px; }
.res-actions { display:flex; gap:6px; padding-top:12px; border-top:1px solid var(--border); }
.res-actions .btn { flex:1; justify-content:center; }

/* ── Milestone timeline ──────────────────────────────── */
.timeline-wrap { position:relative; padding-left:28px; }
.timeline-wrap::before { content:''; position:absolute; left:7px; top:0; bottom:0; width:2px; background:var(--border); border-radius:1px; }
.timeline-item { position:relative; margin-bottom:20px; }
.timeline-dot { position:absolute; left:-28px; top:4px; width:14px; height:14px; border-radius:50%; border:2px solid var(--bg-surface); }
.timeline-date { font-family:var(--font-mono); font-size:11px; color:var(--text-muted); margin-bottom:4px; }
.timeline-name { font-size:14px; font-weight:600; color:var(--text-primary); margin-bottom:4px; }

/* ── Meeting cards ───────────────────────────────────── */
.meet-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; }
.meet-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; transition:transform .2s, box-shadow .2s; cursor:pointer; }
.meet-card:hover { transform:translateY(-2px); box-shadow:var(--shadow); }
.meet-card-stripe { height:4px; }
.meet-card-body { padding:16px 18px; }
.meet-card-header { display:flex; align-items:flex-start; gap:12px; margin-bottom:12px; }
.meet-type-icon { width:38px; height:38px; border-radius:10px; display:grid; place-items:center; font-size:15px; flex-shrink:0; }
.meet-title-wrap { flex:1; min-width:0; }
.meet-card-title { font-family:var(--font-head); font-size:14px; font-weight:700; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.meet-card-type  { font-size:11px; color:var(--text-muted); margin-top:2px; }
.meet-datetime { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.meet-date-block { background:var(--bg-elevated); border-radius:var(--radius-sm); padding:6px 12px; text-align:center; flex-shrink:0; }
.meet-date-day { font-family:var(--font-head); font-size:20px; font-weight:800; line-height:1; color:var(--text-primary); }
.meet-date-mon { font-size:10px; text-transform:uppercase; letter-spacing:.5px; color:var(--text-muted); }
.meet-card-tags { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:10px; }
.meet-card-meta { font-size:12px; color:var(--text-muted); display:flex; flex-direction:column; gap:3px; }
.meet-card-footer { display:flex; gap:6px; padding-top:12px; border-top:1px solid var(--border); }
.meet-card-footer .btn { flex:1; justify-content:center; }
.countdown-chip { display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:20px; font-size:11px; font-weight:600; }
.cc-soon    { background:var(--amber-dim); color:var(--amber); }
.cc-today   { background:var(--teal-dim);  color:var(--teal); }
.cc-past    { background:rgba(136,150,179,.1); color:var(--text-muted); }
.cc-overdue { background:var(--red-dim);   color:var(--red); }

/* ── Mobile sidebar toggle ───────────────────────────── */
@media(max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════
   IntelliPlan · Page-Specific Component Styles v2
═══════════════════════════════════════════════════════ */

/* ── Empty state ─────────────────────────────────────── */
.empty-state { text-align:center; padding:56px 24px; }
.empty-state i { font-size:44px; color:var(--text-muted); margin-bottom:14px; display:block; }
.empty-state p { color:var(--text-muted); margin-bottom:18px; }

/* ── Projects page ───────────────────────────────────── */
.proj-kpi-strip {
  display:grid; grid-template-columns:repeat(5,1fr);
  gap:12px; margin-bottom:22px;
}
@media(max-width:900px){ .proj-kpi-strip{grid-template-columns:repeat(3,1fr);} }
@media(max-width:500px){ .proj-kpi-strip{grid-template-columns:repeat(2,1fr);} }

.proj-table-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.proj-table-card table { width:100%; border-collapse:collapse; }
.proj-table-card thead th { padding:9px 14px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); background:var(--bg-elevated); border-bottom:1px solid var(--border); white-space:nowrap; }
.proj-table-card tbody tr { border-bottom:1px solid var(--border); transition:background .14s; cursor:pointer; }
.proj-table-card tbody tr:last-child { border-bottom:none; }
.proj-table-card tbody tr:hover { background:var(--bg-hover); }
.proj-table-card tbody td { padding:10px 14px; font-size:13px; color:var(--text-secondary); vertical-align:middle; }
.proj-stripe-cell { padding:0 !important; width:4px; }
.proj-name-cell { max-width:260px; }
.proj-pname { font-weight:700; color:var(--text-primary); font-size:14px; }
.proj-co { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--text-muted); margin-top:3px; }
.proj-pcode { font-family:var(--font-mono); font-size:11px; }
.burn-cell { display:flex; align-items:center; gap:8px; min-width:110px; }
.burn-pct  { font-family:var(--font-mono); font-size:11px; color:var(--text-muted); width:30px; text-align:right; }

/* ── Project detail page ─────────────────────────────── */
.proj-header { display:flex; align-items:flex-start; gap:14px; padding:20px 24px; background:var(--bg-elevated); border-bottom:1px solid var(--border); flex-wrap:wrap; }
.proj-color-bar { width:6px; border-radius:3px; align-self:stretch; flex-shrink:0; }
.ph-title { font-family:var(--font-head); font-size:20px; font-weight:800; color:var(--text-primary); margin-bottom:4px; }
.ph-meta  { font-size:12px; color:var(--text-muted); display:flex; flex-wrap:wrap; gap:10px; }
.ph-stats { display:flex; gap:20px; margin-left:auto; flex-wrap:wrap; }
.ph-stat  { text-align:center; min-width:60px; }
.ph-stat-val { font-family:var(--font-head); font-size:20px; font-weight:800; color:var(--text-primary); line-height:1; }
.ph-stat-lbl { font-size:10px; text-transform:uppercase; letter-spacing:.5px; color:var(--text-muted); margin-top:3px; }

.tab-bar { display:flex; border-bottom:1px solid var(--border); background:var(--bg-surface); padding:0 24px; }
.tab-btn { background:none; border:none; cursor:pointer; padding:10px 16px; font-family:var(--font-body); font-size:13px; font-weight:600; color:var(--text-muted); border-bottom:2px solid transparent; margin-bottom:-1px; transition:all .18s; display:flex; align-items:center; gap:6px; white-space:nowrap; }
.tab-btn:hover { color:var(--text-primary); }
.tab-btn.active { color:var(--accent); border-bottom-color:var(--accent); }
.tab-pane { display:none; }
.tab-pane.active { display:block; }

.wbs-toolbar { display:flex; align-items:center; gap:8px; padding:12px 20px; background:var(--bg-elevated); border-bottom:1px solid var(--border); }

.gantt-table { width:100%; border-collapse:collapse; }
.gantt-label-head { width:220px; padding:8px 16px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); background:var(--bg-elevated); border-bottom:1px solid var(--border); white-space:nowrap; }
.gantt-month-head { padding:8px 6px; font-size:10px; font-weight:600; color:var(--text-muted); background:var(--bg-elevated); border-bottom:1px solid var(--border); border-left:1px solid var(--border); text-align:center; white-space:nowrap; }
.gantt-section-row { background:var(--bg-elevated); }
.gantt-section-label { padding:7px 16px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--text-muted); }
.gantt-label-cell { width:220px; padding:7px 16px; vertical-align:middle; border-bottom:1px solid var(--border); }
.gantt-label-text { font-size:13px; color:var(--text-primary); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:200px; }
.gantt-label-sub  { font-size:11px; color:var(--text-muted); margin-top:2px; }
.gantt-timeline-cell { position:relative; padding:0; border-bottom:1px solid var(--border); border-left:1px solid var(--border); vertical-align:middle; height:36px; }
.gantt-chart-col  { border-left:1px solid var(--border); }
.gantt-milestone  { position:absolute; top:11px; width:14px; height:14px; transform:rotate(45deg); border-radius:2px; z-index:2; }

.ms-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:14px; padding:20px; }
.ms-card { background:var(--bg-elevated); border:1px solid var(--border); border-radius:var(--radius-sm); padding:14px 16px; }
.ms-icon { width:36px; height:36px; border-radius:9px; display:grid; place-items:center; font-size:15px; flex-shrink:0; }

.modal-backdrop { display:none; position:fixed; inset:0; background:rgba(0,0,0,.65); z-index:400; backdrop-filter:blur(3px); }
.modal-backdrop.open { display:flex; align-items:center; justify-content:center; }
.modal { background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--radius); width:480px; max-width:95vw; overflow:hidden; box-shadow:0 12px 48px rgba(0,0,0,.7); }
.modal-head { display:flex; align-items:center; justify-content:space-between; padding:16px 22px; border-bottom:1px solid var(--border); }
.modal-title { font-family:var(--font-head); font-size:16px; font-weight:700; }
.modal-close { background:none; border:none; color:var(--text-muted); font-size:17px; cursor:pointer; }
.modal-close:hover { color:var(--text-primary); }
.modal-body { padding:20px 22px; max-height:60vh; overflow-y:auto; }
.modal-foot { padding:14px 22px; border-top:1px solid var(--border); display:flex; gap:10px; justify-content:flex-end; }

/* ── Milestones page ─────────────────────────────────── */
.ms-kpi-strip {
  display:grid; grid-template-columns:repeat(5,1fr);
  gap:12px; margin-bottom:22px;
}
@media(max-width:900px){ .ms-kpi-strip{grid-template-columns:repeat(3,1fr);} }
@media(max-width:500px){ .ms-kpi-strip{grid-template-columns:repeat(2,1fr);} }

.ms-table-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.ms-table-card table { width:100%; border-collapse:collapse; }
.ms-table-card thead th { padding:9px 14px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); background:var(--bg-elevated); border-bottom:1px solid var(--border); white-space:nowrap; }
.ms-table-card tbody tr { border-bottom:1px solid var(--border); transition:background .14s; }
.ms-table-card tbody tr:last-child { border-bottom:none; }
.ms-table-card tbody tr:hover { background:var(--bg-hover); }
.ms-table-card tbody td { padding:10px 14px; font-size:13px; color:var(--text-secondary); vertical-align:middle; }
.ms-name-cell { font-weight:600; color:var(--text-primary); }
.ms-proj-cell { display:flex; align-items:center; gap:6px; }
.ms-proj-name { font-size:12px; font-weight:500; color:var(--text-primary); }
.ms-proj-code { font-family:var(--font-mono); font-size:10px; color:var(--text-muted); }
.form-select-full { background:var(--bg-elevated); border:1px solid var(--border-md); border-radius:var(--radius-sm); color:var(--text-primary); font-family:var(--font-body); font-size:13px; padding:8px 11px; outline:none; width:100%; transition:border-color .15s, box-shadow .15s; }
.form-select-full:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-dim); }
.form-select-full option { background:var(--bg-elevated); }
.status-select { background:var(--bg-elevated); border:1px solid var(--border-md); border-radius:var(--radius-sm); color:var(--text-primary); font-size:12px; padding:4px 8px; outline:none; cursor:pointer; }
.status-select:focus { border-color:var(--accent); }

.ms-timeline { padding:20px 0; }
.timeline-project { margin-bottom:24px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.timeline-proj-header { display:flex; align-items:center; gap:10px; padding:12px 18px; background:var(--bg-elevated); border-bottom:1px solid var(--border); cursor:pointer; }
.timeline-proj-header:hover { background:var(--bg-hover); }
.timeline-proj-name  { font-weight:700; color:var(--text-primary); font-size:14px; }
.timeline-proj-meta  { font-size:11px; color:var(--text-muted); }
.timeline-proj-count { font-family:var(--font-mono); font-size:12px; color:var(--text-muted); margin-left:auto; }
.timeline-chevron    { color:var(--text-muted); transition:transform .2s; font-size:12px; }
.timeline-body { padding:16px 24px; }
.ms-tl-item  { display:flex; align-items:flex-start; gap:14px; margin-bottom:16px; position:relative; padding-left:26px; }
.ms-tl-item::before { content:''; position:absolute; left:7px; top:20px; bottom:-16px; width:2px; background:var(--border); }
.ms-tl-item:last-child::before { display:none; }
.ms-tl-dot   { position:absolute; left:0; top:4px; width:14px; height:14px; border-radius:50%; border:2px solid var(--bg-surface); flex-shrink:0; }
.ms-tl-body  { flex:1; }
.ms-tl-name  { font-size:14px; font-weight:600; color:var(--text-primary); margin-bottom:3px; }
.ms-tl-date  { font-family:var(--font-mono); font-size:11px; color:var(--text-muted); }
.ms-tl-desc  { font-size:12px; color:var(--text-muted); margin-top:3px; }
.ms-tl-meta  { display:flex; align-items:center; gap:8px; margin-top:6px; flex-wrap:wrap; }
.ms-tl-actions { display:flex; gap:5px; }
.achieved { background:var(--teal-dim); color:var(--teal); }

/* ── Budget page ─────────────────────────────────────── */
.grand-bar-top {
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:8px; flex-wrap:wrap;
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:14px 18px; margin-bottom:14px;
}
.grand-bar { margin-bottom:6px; }
.grand-bar-top .gb-stat { flex:1; min-width:120px; text-align:center; }
.burn-stack { position:relative; height:10px; background:var(--bg-elevated); border-radius:5px; overflow:hidden; }
.burn-stack-forecast { position:absolute; top:0; bottom:0; background:var(--accent); opacity:.3; border-radius:5px; }
.burn-stack-actual   { position:absolute; top:0; bottom:0; border-radius:5px; transition:width .8s; }

.gb-stat { text-align:center; }
.gb-label { font-size:11px; text-transform:uppercase; letter-spacing:.5px; color:var(--text-muted); margin-bottom:4px; }
.gb-val   { font-family:var(--font-head); font-size:20px; font-weight:800; line-height:1; }
.gb-sub   { font-size:11px; color:var(--text-muted); margin-top:3px; }

.cat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:10px; margin-bottom:20px; }
.cat-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 14px; position:relative; overflow:hidden; cursor:pointer; transition:transform .2s; }
.cat-card:hover { transform:translateY(-1px); }
.cat-card-label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; margin-bottom:6px; }
.cat-card-val { font-family:var(--font-head); font-size:17px; font-weight:800; color:var(--text-primary); }
.cat-card-sub { font-size:11px; color:var(--text-muted); margin-top:2px; }
.cat-card-burn { margin-top:8px; }
.cat-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:4px; }

.wbs-section { border-bottom:1px solid var(--border); }
.wbs-section-header { display:flex; align-items:center; gap:10px; padding:10px 16px; cursor:pointer; background:var(--bg-elevated); transition:background .14s; }
.wbs-section-header:hover { background:var(--bg-hover); }
.wbs-section-code { font-family:var(--font-mono); font-size:12px; color:var(--accent); font-weight:700; }
.wbs-section-name { font-size:13px; font-weight:600; color:var(--text-primary); }
.wbs-section-total { font-family:var(--font-mono); font-size:12px; color:var(--text-muted); margin-left:auto; }
.wbs-chevron { color:var(--text-muted); transition:transform .2s; font-size:11px; }
.proj-chevron { color:var(--text-muted); transition:transform .2s; font-size:11px; }

.cat-group { padding:0; }
.cat-group-header { display:flex; align-items:center; gap:8px; padding:8px 14px 8px 32px; background:rgba(255,255,255,.02); border-bottom:1px solid var(--border); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--text-muted); }
.cat-group-total { font-family:var(--font-mono); font-size:12px; margin-left:auto; color:var(--text-secondary); }
.cat-name { display:flex; align-items:center; gap:6px; }
.line-desc { color:var(--text-primary); font-weight:500; }
.actual-form { display:inline-flex; align-items:center; gap:4px; }
.actual-input { width:80px; font-family:var(--font-mono); font-size:12px; background:var(--bg-elevated); border:1px solid var(--border-md); border-radius:var(--radius-sm); color:var(--text-primary); padding:4px 7px; outline:none; }
.actual-input:focus { border-color:var(--accent); }
.actual-save { background:var(--accent-dim); border:none; border-radius:var(--radius-sm); color:var(--accent); font-size:11px; font-weight:700; padding:4px 9px; cursor:pointer; transition:background .15s; }
.actual-save:hover { background:var(--accent); color:#fff; }
.form-calc-hint { font-size:11px; color:var(--text-muted); margin-top:4px; }

/* ── Resources page ──────────────────────────────────── */
.res-kpi {
  display:grid; grid-template-columns:repeat(6,1fr);
  gap:12px; margin-bottom:22px;
}
@media(max-width:1100px){ .res-kpi{grid-template-columns:repeat(3,1fr);} }
@media(max-width:500px) { .res-kpi{grid-template-columns:repeat(2,1fr);} }
.res-tab-filters { display:flex; align-items:center; gap:7px; padding-bottom:10px; flex-shrink:0; }
.rtf-input, .rtf-select { background:var(--bg-elevated); border:1px solid var(--border-md); border-radius:var(--radius-sm); color:var(--text-primary); font-family:var(--font-body); font-size:12px; padding:5px 9px; outline:none; height:32px; transition:border-color .15s; }
.rtf-input { width:160px; }
.rtf-select { min-width:110px; }
.rtf-input:focus,.rtf-select:focus { border-color:var(--accent); }
.rtf-input::placeholder { color:var(--text-muted); }
.rtf-select option { background:var(--bg-elevated); }
.type-header { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.type-icon { width:32px; height:32px; border-radius:8px; display:grid; place-items:center; font-size:13px; flex-shrink:0; }
.type-title { font-family:var(--font-head); font-size:14px; font-weight:700; color:var(--text-primary); }
.type-count { font-size:12px; color:var(--text-muted); }
.res-list-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; margin-bottom:16px; }
.res-list-card table { width:100%; border-collapse:collapse; }
.res-list-card thead th { padding:9px 14px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); background:var(--bg-elevated); border-bottom:1px solid var(--border); white-space:nowrap; }
.res-list-card tbody tr { border-bottom:1px solid var(--border); transition:background .14s; }
.res-list-card tbody tr:last-child { border-bottom:none; }
.res-list-card tbody tr:hover { background:var(--bg-hover); }
.res-list-card tbody td { padding:10px 14px; font-size:13px; color:var(--text-secondary); vertical-align:middle; }
.rls-icon { width:28px; height:28px; border-radius:7px; display:inline-grid; place-items:center; font-size:12px; vertical-align:middle; margin-right:8px; }
.rate-row { display:flex; gap:8px; }
.view-tabs { display:flex; gap:2px; border-bottom:1px solid var(--border); padding:0 24px; background:var(--bg-card); }
.view-tab-btn { background:none; border:none; cursor:pointer; padding:10px 16px; font-family:var(--font-body); font-size:13px; font-weight:600; color:var(--text-muted); border-bottom:2px solid transparent; margin-bottom:-1px; transition:all .18s; display:flex; align-items:center; gap:6px; }
.view-tab-btn:hover { color:var(--text-primary); }
.view-tab-btn.active { color:var(--accent); border-bottom-color:var(--accent); }
.view-tab-pane { display:none; padding:20px 24px; }
.view-tab-pane.active { display:block; }
.view-res-avatar { width:46px; height:46px; border-radius:12px; display:grid; place-items:center; font-size:18px; color:#fff; flex-shrink:0; }
.view-res-name { font-family:var(--font-head); font-size:17px; font-weight:700; }
.view-res-meta { font-size:12px; color:var(--text-muted); margin-top:2px; }
.assign-table { width:100%; border-collapse:collapse; }
.assign-table th { padding:8px 12px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); background:var(--bg-elevated); border-bottom:1px solid var(--border); white-space:nowrap; }
.assign-table td { padding:10px 12px; font-size:13px; color:var(--text-secondary); border-bottom:1px solid var(--border); vertical-align:middle; }
.assign-table tr:last-child td { border-bottom:none; }

/* ── Tasks page ──────────────────────────────────────── */
.task-tab-bar { display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--border); margin-bottom:0; flex-wrap:wrap; }
.task-tabs { display:flex; gap:2px; }
.task-tab { display:inline-flex; align-items:center; gap:7px; padding:10px 16px; cursor:pointer; text-decoration:none; font-size:13px; font-weight:600; color:var(--text-muted); border-bottom:2px solid transparent; margin-bottom:-1px; transition:all .18s; white-space:nowrap; }
.task-tab:hover { color:var(--text-primary); }
.task-tab.active { color:var(--accent); border-bottom-color:var(--accent); }
.task-tab-count { font-family:var(--font-mono); font-size:11px; padding:1px 7px; border-radius:20px; background:var(--bg-elevated); color:var(--text-muted); }
.task-tab.active .task-tab-count { background:var(--accent-dim); color:var(--accent); }
.filter-strip { display:flex; gap:7px; align-items:center; padding:12px 0; flex-wrap:nowrap; margin-bottom:16px; overflow-x:auto; }
.fi { background:var(--bg-card); border:1px solid var(--border-md); border-radius:var(--radius-sm); color:var(--text-primary); font-family:var(--font-body); font-size:12px; padding:5px 9px; outline:none; height:32px; transition:border-color .15s; flex-shrink:0; width:auto; }
.fi:focus { border-color:var(--accent); }
.fi-search { width:160px; }
.fi-search::placeholder { color:var(--text-muted); }
.fi-select { min-width:110px; max-width:160px; }
.fi-date   { width:130px; }
.fi option { background:var(--bg-elevated); }
.overdue-bar { display:flex; align-items:center; gap:10px; background:var(--red-dim); border:1px solid rgba(255,77,109,.2); border-radius:var(--radius-sm); padding:9px 14px; margin-bottom:16px; font-size:13px; }
.task-table-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.task-table-card table { width:100%; border-collapse:collapse; }
.task-table-card thead th { padding:9px 14px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); background:var(--bg-elevated); border-bottom:1px solid var(--border); white-space:nowrap; }
.task-table-card tbody tr { border-bottom:1px solid var(--border); transition:background .14s; }
.task-table-card tbody tr:last-child { border-bottom:none; }
.task-table-card tbody tr:hover { background:var(--bg-hover); }
.task-table-card tbody td { padding:10px 14px; font-size:13px; color:var(--text-secondary); vertical-align:middle; }
.task-title-cell { color:var(--text-primary) !important; font-weight:600; max-width:260px; }
.task-title-text { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; max-width:260px; }
.task-sub { font-size:11px; color:var(--text-muted); margin-top:2px; display:flex; align-items:center; gap:6px; }
.status-pill { display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:20px; font-size:11px; font-weight:600; cursor:pointer; border:none; background:none; appearance:none; -webkit-appearance:none; }
.kc-title { font-size:12px; font-weight:600; color:var(--text-primary); margin-bottom:6px; line-height:1.3; }
.kc-proj  { font-size:10px; color:var(--text-muted); display:flex; align-items:center; gap:4px; margin-bottom:5px; }
.kc-meta  { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.kc-due   { font-family:var(--font-mono); font-size:10px; }
.kc-due.overdue  { color:var(--red); font-weight:700; }
.kc-due.upcoming { color:var(--amber); }
.kc-due.ok       { color:var(--text-muted); }
.kc-actions { display:flex; gap:3px; }

/* ── Meetings page ───────────────────────────────────── */
.meet-kpi { display:grid; grid-template-columns:repeat(6,1fr); gap:12px; margin-bottom:22px; }
@media(max-width:1000px){ .meet-kpi{grid-template-columns:repeat(3,1fr);} }
@media(max-width:500px) { .meet-kpi{grid-template-columns:repeat(2,1fr);} }
.meet-tab-bar { display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--border); margin-bottom:0; flex-wrap:wrap; }
.meet-tabs { display:flex; gap:2px; }
.meet-tab { display:inline-flex; align-items:center; gap:7px; padding:10px 16px; cursor:pointer; text-decoration:none; font-size:13px; font-weight:600; color:var(--text-muted); border-bottom:2px solid transparent; margin-bottom:-1px; transition:all .18s; white-space:nowrap; }
.meet-tab:hover { color:var(--text-primary); }
.meet-tab.active { color:var(--accent); border-bottom-color:var(--accent); }
.meet-tab-count { font-family:var(--font-mono); font-size:11px; padding:1px 7px; border-radius:20px; background:var(--bg-elevated); color:var(--text-muted); }
.meet-tab.active .meet-tab-count { background:var(--accent-dim); color:var(--accent); }
.meet-table-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.meet-table-card table { width:100%; border-collapse:collapse; }
.meet-table-card thead th { padding:9px 14px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); background:var(--bg-elevated); border-bottom:1px solid var(--border); white-space:nowrap; }
.meet-table-card tbody tr { border-bottom:1px solid var(--border); transition:background .14s; cursor:pointer; }
.meet-table-card tbody tr:last-child { border-bottom:none; }
.meet-table-card tbody tr:hover { background:var(--bg-hover); }
.meet-table-card tbody td { padding:10px 14px; font-size:13px; color:var(--text-secondary); vertical-align:middle; }
.meet-time-info { font-size:12px; color:var(--text-secondary); }
.meet-time-info .time { font-family:var(--font-mono); font-size:13px; font-weight:600; color:var(--text-primary); }
.meet-dur { font-size:11px; color:var(--text-muted); margin-top:2px; }
.detail-panel { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); margin-top:22px; overflow:hidden; }
.detail-head  { display:flex; align-items:center; gap:14px; padding:18px 24px; background:var(--bg-elevated); border-bottom:1px solid var(--border); flex-wrap:wrap; }
.detail-title { font-family:var(--font-head); font-size:18px; font-weight:700; }
.detail-meta  { font-size:12px; color:var(--text-muted); margin-top:2px; }
.detail-actions { margin-left:auto; display:flex; gap:8px; flex-wrap:wrap; }
.detail-tabs { display:flex; border-bottom:1px solid var(--border); background:var(--bg-card); padding:0 24px; }
.dtab { background:none; border:none; cursor:pointer; padding:10px 16px; font-family:var(--font-body); font-size:13px; font-weight:600; color:var(--text-muted); border-bottom:2px solid transparent; margin-bottom:-1px; transition:all .18s; display:flex; align-items:center; gap:6px; }
.dtab:hover { color:var(--text-primary); }
.dtab.active { color:var(--accent); border-bottom-color:var(--accent); }
.dtab-pane { display:none; padding:20px 24px; }
.dtab-pane.active { display:block; }
.detail-2col { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
@media(max-width:768px){ .detail-2col{grid-template-columns:1fr;} }
.detail-section-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.7px; color:var(--text-muted); margin-bottom:12px; padding-bottom:8px; border-bottom:1px solid var(--border); }
.detail-field { margin-bottom:12px; }
.detail-field-label { font-size:11px; color:var(--text-muted); margin-bottom:3px; }
.detail-field-value { font-size:13px; color:var(--text-primary); line-height:1.6; white-space:pre-wrap; }
.action-item-list { display:flex; flex-direction:column; gap:8px; }
.action-item { display:flex; align-items:flex-start; gap:10px; padding:10px 12px; background:var(--bg-elevated); border-radius:var(--radius-sm); border:1px solid var(--border); }
.action-item-text { flex:1; font-size:13px; color:var(--text-primary); line-height:1.4; }
.action-to-task-btn { background:var(--accent-dim); border:none; border-radius:6px; color:var(--accent); font-size:11px; font-weight:600; padding:4px 10px; cursor:pointer; white-space:nowrap; transition:background .15s; flex-shrink:0; }
.action-to-task-btn:hover { background:var(--accent); color:#fff; }
.action-converted { background:var(--teal-dim); border-radius:6px; color:var(--teal); font-size:11px; font-weight:600; padding:4px 10px; white-space:nowrap; flex-shrink:0; }
.att-list { display:flex; flex-direction:column; gap:8px; }
.att-item { display:flex; align-items:center; gap:12px; padding:10px 14px; background:var(--bg-elevated); border:1px solid var(--border); border-radius:var(--radius-sm); transition:background .14s; }
.att-item:hover { background:var(--bg-hover); }
.att-icon { width:34px; height:34px; border-radius:8px; background:var(--accent-dim); color:var(--accent); display:grid; place-items:center; font-size:14px; flex-shrink:0; }
.att-name { flex:1; font-size:13px; font-weight:600; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.att-meta { font-size:11px; color:var(--text-muted); margin-top:2px; }
.att-actions { display:flex; gap:6px; flex-shrink:0; }
.cal-nav { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.cal-nav-title { font-family:var(--font-head); font-size:16px; font-weight:700; }
.cal-today-btn { font-size:12px; }
.cal-section-label { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--text-muted); margin:4px 0 2px; }
.cal-meeting-time { font-size:10px; opacity:.8; font-family:var(--font-mono); }
.chip-title { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; min-width:0; }
.chip-due   { font-family:var(--font-mono); font-size:10px; color:var(--red); flex-shrink:0; }
.dot { width:6px; height:6px; border-radius:50%; flex-shrink:0; }
/* Meetings drawer short-form fields */
.fgrid { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.fg { display:flex; flex-direction:column; gap:5px; }
.fgfull { grid-column:1/-1; }
.fgl { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); }
.fgl .req { color:var(--red); }
.fgi { background:var(--bg-elevated); border:1px solid var(--border-md); border-radius:var(--radius-sm); color:var(--text-primary); font-family:var(--font-body); font-size:13px; padding:8px 11px; outline:none; width:100%; transition:border-color .15s, box-shadow .15s; }
.fgi:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-dim); }
.fgi::placeholder { color:var(--text-muted); }
.fgs { background:var(--bg-elevated); border:1px solid var(--border-md); border-radius:var(--radius-sm); color:var(--text-primary); font-family:var(--font-body); font-size:13px; padding:8px 11px; outline:none; width:100%; transition:border-color .15s; }
.fgs:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-dim); }
.fgs option { background:var(--bg-elevated); }
.fgta { background:var(--bg-elevated); border:1px solid var(--border-md); border-radius:var(--radius-sm); color:var(--text-primary); font-family:var(--font-body); font-size:13px; padding:8px 11px; outline:none; width:100%; resize:vertical; min-height:70px; transition:border-color .15s; }
.fgta:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-dim); }
.fgsep { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.7px; color:var(--text-muted); margin:14px 0 8px; padding-bottom:6px; border-bottom:1px solid var(--border); grid-column:1/-1; }
.file-drop { border:2px dashed var(--border-md); border-radius:var(--radius-sm); padding:18px; text-align:center; cursor:pointer; transition:border-color .15s, background .15s; }
.file-drop:hover,.file-drop.drag-over { border-color:var(--accent); background:var(--accent-dim); }
.file-drop input { display:none; }
.file-drop-text { font-size:13px; color:var(--text-muted); }
.file-drop-text span { color:var(--accent); font-weight:600; cursor:pointer; }
.file-list { display:flex; flex-direction:column; gap:5px; margin-top:8px; }
.file-item { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--text-secondary); background:var(--bg-elevated); padding:5px 10px; border-radius:6px; }
/* Convert-to-task modal */
.modal-bd { display:none; position:fixed; inset:0; background:rgba(0,0,0,.65); z-index:400; backdrop-filter:blur(3px); }
.modal-bd.open { display:grid; place-items:center; }
.form-select-m { background:var(--bg-elevated); border:1px solid var(--border-md); border-radius:var(--radius-sm); color:var(--text-primary); font-family:var(--font-body); font-size:13px; padding:8px 11px; outline:none; width:100%; transition:border-color .15s; }
.form-select-m:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-dim); }
.form-select-m option { background:var(--bg-elevated); }

/* ── Actuals page ────────────────────────────────────── */
.act-kpi { display:grid; grid-template-columns:repeat(6,1fr); gap:12px; margin-bottom:22px; }
@media(max-width:1100px){ .act-kpi{grid-template-columns:repeat(3,1fr);} }
@media(max-width:500px) { .act-kpi{grid-template-columns:repeat(2,1fr);} }
.act-tab-bar { display:flex; align-items:center; border-bottom:1px solid var(--border); margin-bottom:0; }
.act-tab { display:inline-flex; align-items:center; gap:7px; padding:10px 16px; cursor:pointer; text-decoration:none; font-size:13px; font-weight:600; color:var(--text-muted); border-bottom:2px solid transparent; margin-bottom:-1px; transition:all .18s; white-space:nowrap; }
.act-tab:hover { color:var(--text-primary); }
.act-tab.active { color:var(--accent); border-bottom-color:var(--accent); }
.log-table-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.log-table-card table { width:100%; border-collapse:collapse; }
.log-table-card thead th { padding:9px 13px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); background:var(--bg-elevated); border-bottom:1px solid var(--border); white-space:nowrap; }
.log-table-card tbody tr { border-bottom:1px solid var(--border); transition:background .14s; }
.log-table-card tbody tr:last-child { border-bottom:none; }
.log-table-card tbody tr:hover { background:var(--bg-hover); }
.log-table-card tbody td { padding:10px 13px; font-size:13px; color:var(--text-secondary); vertical-align:middle; }
.log-totals-row td { background:var(--bg-elevated); font-weight:700; color:var(--text-primary) !important; font-family:var(--font-mono); font-size:12px; border-top:2px solid var(--border-md) !important; }
.bill-pill { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:20px; font-size:11px; font-weight:600; }
.bill-yes { background:var(--teal-dim); color:var(--teal); }
.bill-no  { background:rgba(79,95,122,.15); color:var(--text-muted); }
.trend-wrap { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px; margin-bottom:20px; }
.trend-title { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); margin-bottom:14px; }
.trend-bars { display:flex; gap:12px; align-items:flex-end; height:80px; }
.trend-bar-col { display:flex; flex-direction:column; align-items:center; gap:4px; flex:1; }
.trend-bar-track { width:100%; background:var(--bg-elevated); border-radius:4px 4px 0 0; display:flex; flex-direction:column; justify-content:flex-end; height:60px; }
.trend-bar-fill { width:100%; background:var(--accent); border-radius:4px 4px 0 0; transition:height .6s ease; }
.trend-bar-label { font-family:var(--font-mono); font-size:10px; color:var(--text-muted); text-align:center; white-space:nowrap; }
.trend-bar-val   { font-family:var(--font-mono); font-size:9px; color:var(--text-muted); text-align:center; white-space:nowrap; }
.sum-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:20px; }
@media(max-width:768px){ .sum-grid{grid-template-columns:1fr;} }
.sum-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.sum-card-head { padding:12px 16px; background:var(--bg-elevated); border-bottom:1px solid var(--border); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); display:flex; align-items:center; gap:7px; }
.sum-table { width:100%; border-collapse:collapse; }
.sum-table tbody tr { border-bottom:1px solid var(--border); transition:background .14s; }
.sum-table tbody tr:last-child { border-bottom:none; }
.sum-table tbody tr:hover { background:var(--bg-hover); }
.sum-table tbody td { padding:9px 14px; font-size:13px; color:var(--text-secondary); vertical-align:middle; }
.sum-bar-cell { min-width:100px; }
.sum-totals-row td { background:var(--bg-elevated); font-weight:700; color:var(--text-primary) !important; font-family:var(--font-mono); font-size:12px; }
.rate-hint { font-size:11px; color:var(--text-muted); margin-top:2px; }
.toggle-row { display:flex; align-items:center; gap:10px; }
.toggle-lbl { font-size:13px; color:var(--text-secondary); }

/* ── Companies page ──────────────────────────────────── */
.co-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; }
.co-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; transition:transform .2s, box-shadow .2s; }
.co-card:hover { transform:translateY(-2px); box-shadow:var(--shadow); }
.co-card-top { height:4px; }
.co-card-body { padding:18px 20px; }
.co-card-header { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.co-avatar { width:40px; height:40px; border-radius:10px; display:grid; place-items:center; font-family:var(--font-head); font-size:14px; font-weight:800; color:#fff; flex-shrink:0; }
.co-name-wrap { flex:1; min-width:0; }
.co-name { font-family:var(--font-head); font-size:15px; font-weight:700; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.co-code { font-family:var(--font-mono); font-size:11px; color:var(--text-muted); margin-top:2px; }
.co-industry { font-size:12px; color:var(--text-muted); margin-bottom:12px; }
.co-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:14px; }
.co-stat { background:var(--bg-elevated); border-radius:var(--radius-sm); padding:8px; text-align:center; }
.co-stat-val { font-family:var(--font-head); font-size:18px; font-weight:800; }
.co-stat-lbl { font-size:10px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; margin-top:3px; }
.co-budget { padding:10px 12px; background:var(--bg-elevated); border-radius:var(--radius-sm); margin-bottom:12px; }
.co-budget-label { font-size:10px; text-transform:uppercase; letter-spacing:.5px; color:var(--text-muted); margin-bottom:4px; }
.co-budget-nums { display:flex; justify-content:space-between; align-items:baseline; }
.co-budget-row { display:flex; align-items:center; gap:8px; margin-top:6px; }
.co-actions { display:flex; gap:6px; padding-top:12px; border-top:1px solid var(--border); }
.co-actions .btn { flex:1; justify-content:center; }
.color-row { display:flex; gap:8px; align-items:center; }
.color-input { width:48px; height:38px; padding:3px; border-radius:var(--radius-sm); border:1px solid var(--border-md); background:var(--bg-elevated); cursor:pointer; }
.color-presets { display:flex; gap:6px; flex-wrap:wrap; }
.color-preset { width:24px; height:24px; border-radius:6px; cursor:pointer; border:2px solid transparent; transition:border-color .15s, transform .15s; }
.color-preset:hover { transform:scale(1.15); border-color:rgba(255,255,255,.4); }
.proj-table-wrap { overflow-x:auto; }
.view-co-avatar { width:46px; height:46px; border-radius:12px; display:grid; place-items:center; font-family:var(--font-head); font-size:20px; font-weight:800; color:#fff; flex-shrink:0; }
.view-co-name { font-family:var(--font-head); font-size:17px; font-weight:700; }
.view-co-meta { font-size:12px; color:var(--text-muted); margin-top:2px; }

/* ── Confirm modal (replaces browser confirm()) ──────── */
.confirm-modal-bd { display:none; position:fixed; inset:0; background:rgba(0,0,0,.65); z-index:500; backdrop-filter:blur(3px); }
.confirm-modal-bd.open { display:grid; place-items:center; animation:tbddFade .15s ease; }
.confirm-modal { background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--radius); width:380px; max-width:94vw; overflow:hidden; box-shadow:0 12px 48px rgba(0,0,0,.7); padding:24px; }
.confirm-modal-icon { font-size:32px; margin-bottom:12px; }
.confirm-modal-title { font-family:var(--font-head); font-size:16px; font-weight:700; margin-bottom:6px; }
.confirm-modal-body  { font-size:13px; color:var(--text-secondary); margin-bottom:20px; line-height:1.5; }
.confirm-modal-btns  { display:flex; gap:10px; justify-content:flex-end; }

/* ── Meetings calendar action buttons ───────────────────── */
.cal-chip-actions { display:flex; gap:3px; margin-top:3px; }
.cal-chip-btn {
  background:rgba(0,0,0,.25); border:none; border-radius:4px;
  color:#fff; font-size:10px; padding:2px 6px; cursor:pointer;
  transition:background .15s; white-space:nowrap;
}
.cal-chip-btn:hover { background:rgba(0,0,0,.5); }
.cal-task-btn {
  background:var(--bg-elevated); border:1px solid var(--border-md);
  border-radius:4px; color:var(--text-muted); font-size:10px;
  padding:2px 6px; cursor:pointer; transition:all .15s;
}
.cal-task-btn:hover { color:var(--text-primary); border-color:var(--border-hi); }

/* ── Action modal (meeting/task remove reason) ───────────── */
.action-modal-bd { display:none; position:fixed; inset:0; background:rgba(0,0,0,.65); z-index:600; backdrop-filter:blur(3px); }
.action-modal-bd.open { display:grid; place-items:center; animation:tbddFade .15s ease; }
.action-modal { background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--radius); width:440px; max-width:94vw; overflow:hidden; box-shadow:0 12px 48px rgba(0,0,0,.7); }
.action-modal-head { display:flex; align-items:center; justify-content:space-between; padding:14px 20px; border-bottom:1px solid var(--border); background:var(--bg-elevated); }
.action-modal-title { font-family:var(--font-head); font-size:15px; font-weight:700; }
.action-modal-body  { padding:18px 20px; display:flex; flex-direction:column; gap:12px; }
.action-modal-foot  { padding:12px 20px; border-top:1px solid var(--border); display:flex; gap:8px; justify-content:flex-end; }
.action-modal label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--text-muted); }
.action-modal select, .action-modal textarea {
  background:var(--bg-elevated); border:1px solid var(--border-md);
  border-radius:var(--radius-sm); color:var(--text-primary);
  font-family:var(--font-body); font-size:13px;
  padding:8px 10px; outline:none; width:100%;
  transition:border-color .15s;
}
.action-modal select:focus, .action-modal textarea:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-dim); }
.action-modal select option { background:var(--bg-elevated); }
.action-modal textarea { resize:vertical; min-height:60px; }

/* ── Admin roles ─────────────────────────────────────────── */
.role-row {
  display:flex; align-items:center; gap:14px;
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:14px 18px; margin-bottom:8px;
}
.role-row-info { flex:1; min-width:0; }
.role-row-name { font-weight:700; color:var(--text-primary); font-size:14px; display:flex; align-items:center; gap:8px; }
.role-row-desc { font-size:12px; color:var(--text-muted); margin-top:3px; }
.role-system-badge { font-size:10px; font-weight:700; padding:2px 7px; border-radius:20px; background:var(--accent-dim); color:var(--accent); }
.role-actions { display:flex; gap:6px; flex-shrink:0; }
.perm-matrix { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.perm-matrix table { width:100%; border-collapse:collapse; }
.perm-matrix thead th { padding:9px 14px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-muted); background:var(--bg-elevated); border-bottom:1px solid var(--border); }
.perm-matrix tbody tr { border-bottom:1px solid var(--border); transition:background .14s; }
.perm-matrix tbody tr:last-child { border-bottom:none; }
.perm-matrix tbody tr:hover { background:var(--bg-hover); }
.perm-matrix tbody td { padding:10px 14px; font-size:13px; color:var(--text-secondary); vertical-align:middle; }
.perm-check { accent-color:var(--accent); width:16px; height:16px; cursor:pointer; }
.perm-module-header td { background:var(--bg-elevated); font-weight:700; font-size:11px; text-transform:uppercase; letter-spacing:.5px; color:var(--text-muted); padding:7px 14px; }
