/* ── NU TakeOff — Shared Light/Dark Theme Variables ─────────────────────── */
[data-theme="light"] {
  --bg:       #f4f5f7;
  --surface:  #ffffff;
  --surface2: #f0f1f4;
  --border:   #e0e3ea;
  --border2:  #d0d4de;
  --navy:     #1a2332;
  --gold:     #9a7e38;
  --gold-lt:  rgba(154,126,56,0.08);
  --gold-dk:  #7a6020;
  --text:     #1a2332;
  --muted:    rgba(26,35,50,0.55);
  --muted2:   rgba(26,35,50,0.35);
}
/* Header stays dark in light mode (brand colour) */
[data-theme="light"] .pf-header,
[data-theme="light"] .mc-header,
[data-theme="light"] .nu-header,
[data-theme="light"] header.app-header { background: #1a2332; }

[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(154,126,56,0.3); }

/* Cards & surfaces get subtle shadow in light mode */
[data-theme="light"] .project-card,
[data-theme="light"] .pipeline-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .tab-content,
[data-theme="light"] .nu-card { box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

/* Form inputs */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #fff;
  color: #1a2332;
  border-color: #d0d4de;
}
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder { color: rgba(26,35,50,0.4); }

/* Tables */
[data-theme="light"] table { color: #1a2332; }
[data-theme="light"] tr:nth-child(even) td { background: rgba(0,0,0,0.025); }

/* ── project.html specific overrides ──────────────────────────────── */
[data-theme="light"] .pf-header {
  background: #1a2332;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
[data-theme="light"] .pf-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
}
[data-theme="light"] .pf-main { background: var(--bg); }
[data-theme="light"] .pf-tab-panel { background: var(--bg); }

/* ── index.html (estimator) specific overrides ────────────────────── */
[data-theme="light"] .nu-toolbar,
[data-theme="light"] .nu-header-bar { background: #1a2332; }
[data-theme="light"] .nu-panel,
[data-theme="light"] .result-card,
[data-theme="light"] .cost-section { background: var(--surface); border-color: var(--border); }

/* ── variations / valuations / certificates etc. ─────────────────── */
[data-theme="light"] .doc-sidebar { background: var(--surface); border-color: var(--border); }
[data-theme="light"] .doc-main    { background: var(--bg); }
[data-theme="light"] .doc-header  { background: #1a2332; }

/* ── admin / login ───────────────────────────────────────────────── */
[data-theme="light"] .admin-header,
[data-theme="light"] .login-header { background: #1a2332; }
[data-theme="light"] .admin-card,
[data-theme="light"] .login-card   { background: var(--surface); border-color: var(--border); }

/* ── Report & Gantt theme fixes ──────────────────────────────────── */
/* These override hardcoded colours in generated report HTML */

/* Gantt chart rows */
[data-theme="light"] .nu-gantt-row-even { background: #f8f7f4 !important; }
[data-theme="light"] .nu-gantt-row-odd  { background: #ffffff !important; }
:root .nu-gantt-row-even { background: #1c2128 !important; }
:root .nu-gantt-row-odd  { background: #161b22 !important; }

/* Cost plan table alternating rows */
[data-theme="light"] .nu-cost-row-even { background: #f8f7f4 !important; }
[data-theme="light"] .nu-cost-row-odd  { background: #ffffff !important; }
:root .nu-cost-row-even { background: #1c2128 !important; }
:root .nu-cost-row-odd  { background: #161b22 !important; }

/* Report surfaces */
[data-theme="light"] .nu-report-surface { background: #f8f7f4 !important; }
:root .nu-report-surface { background: #1a2332 !important; }

/* Scope, summary, programme blocks */
[data-theme="light"] .nu-sum-total { background: #1a2332 !important; color: #fff !important; }
[data-theme="light"] .nu-prog-edit-table tbody tr:nth-child(even) { background: #f8f7f4 !important; }
[data-theme="light"] .nu-prog-edit-table tbody tr:nth-child(odd)  { background: #fff !important; }

/* ── Theme Toggle — shared pill style ───────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  padding: 5px 12px 5px 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  transition: all 0.2s;
  flex-shrink: 0;
  user-select: none;
  letter-spacing: 0.02em;
}
.theme-toggle:hover { background: rgba(255,255,255,0.13); color: #fff; border-color: rgba(255,255,255,0.25); }
.theme-toggle-track {
  width: 36px; height: 20px;
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
}
.theme-toggle-thumb {
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px; left: 2px;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
[data-theme="light"] .theme-toggle-track { background: rgba(184,149,46,0.5); }
[data-theme="light"] .theme-toggle-thumb { transform: translateX(16px); }
[data-theme="light"] .theme-toggle { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); color: #fff; }

/* -- Dashboard back button -- */
.nu-dash-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(184,149,46,0.12);
  border: 1px solid rgba(184,149,46,0.4);
  color: var(--gold);
  padding: 5px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: background 0.15s;
}
.nu-dash-btn:hover { background: rgba(184,149,46,0.22); }
