/* Nex AV throwaway hub — shared styles */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --nex-navy: #001D35;
  --nex-cream: #FFFEF2;
  --nex-teal: #1F5F7A;
  --nex-gray: #666666;
  --nex-charcoal: #222222;

  --surface-page: #F2F3EF;
  --surface-card: #FFFFFF;

  --border-light: rgba(0,29,53,0.10);
  --border-mid: rgba(0,29,53,0.18);

  --text-primary: #222222;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-on-navy: #FFFEF2;

  --green-bg: #EAF5EC;     --green-text: #1A7A35;
  --amber-bg: #FDF3E3;     --amber-text: #9A5F0A;
  --red-bg: #FCEAEA;       --red-text: #A32020;
  --teal-bg: rgba(31,95,122,0.08);
  --navy-bg: rgba(0,29,53,0.07);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--surface-page);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ---------- Brand nav ---------- */
.brand-nav {
  background: var(--nex-navy);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,29,53,0.25);
}
.brand-nav-inner {
  max-width: 960px; margin: 0 auto;
  padding: 0 24px; height: 52px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand-logo { display: flex; align-items: center; gap: 11px; }
.brand-wordmark {
  font-size: 15px; font-weight: 700;
  color: var(--nex-cream); letter-spacing: 0.16em;
  text-transform: uppercase; line-height: 1;
}
.brand-wordmark .av { color: var(--nex-teal); font-weight: 400; }
.brand-sub {
  font-size: 8px; font-weight: 500;
  color: rgba(255,254,242,0.4);
  letter-spacing: 0.2em; text-transform: uppercase; line-height: 1;
  margin-top: 2px;
}
.nav-divider { width: 1px; height: 20px; background: rgba(255,254,242,0.15); margin: 0 6px; }
.nav-hub { font-size: 11px; color: var(--nex-teal); font-weight: 500; letter-spacing: 0.06em; }
.brand-nav-right { display: flex; align-items: center; gap: 10px; color: rgba(255,254,242,0.7); font-size: 12px; }
.brand-nav-right .opp-num { color: rgba(255,254,242,0.35); font-family: 'DM Mono', monospace; font-size: 11px; }

/* ---------- App container ---------- */
.app { max-width: 960px; margin: 0 auto; padding: 20px 24px 60px; }

/* ---------- Dashboard ---------- */
.dash-header { margin-bottom: 24px; }
.dash-title {
  font-family: 'Noto Serif Display', serif;
  font-weight: 300; font-size: 28px;
  color: var(--nex-navy); line-height: 1.2;
}
.dash-sub { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

.section-title {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--nex-teal);
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 8px;
}
.section-count {
  font-family: 'DM Mono', monospace;
  font-size: 10px; color: var(--text-muted);
  font-weight: 400; letter-spacing: 0;
}
.section-title.canceled { color: var(--text-muted); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.project-card {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--nex-navy);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: border-color 0.15s, transform 0.15s;
  cursor: pointer;
  display: block;
}
.project-card:hover {
  border-left-color: var(--nex-teal);
  transform: translateY(-1px);
}
.project-card.completed { border-left-color: var(--green-text); }
.project-card.canceled  { border-left-color: var(--text-muted); opacity: 0.65; }

.pc-title {
  font-family: 'Noto Serif Display', serif;
  font-weight: 400; font-size: 16px;
  color: var(--nex-navy);
  line-height: 1.3;
}
.pc-client {
  font-size: 11px; color: var(--nex-teal);
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.pc-tagline {
  font-size: 12px; color: var(--text-secondary);
  margin-top: 6px; line-height: 1.5;
}
.pc-meta {
  font-family: 'DM Mono', monospace;
  font-size: 10px; color: var(--text-muted);
  margin-top: 8px;
  display: flex; justify-content: space-between;
}

.empty-state {
  font-size: 12px; color: var(--text-muted);
  font-style: italic;
  padding: 12px 0;
}

.error-state {
  background: var(--red-bg);
  border: 1px solid rgba(163,32,32,0.2);
  color: var(--red-text);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin: 16px 0;
}

/* ---------- Project page (used by template.html and individual hubs) ---------- */
.header {
  background: var(--nex-cream);
  border: 1px solid var(--border-mid);
  border-top: 4px solid var(--nex-navy);
  border-radius: var(--radius-lg);
  padding: 22px 26px 20px;
  margin-bottom: 14px;
}
.header-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 16px;
}
.header-eyebrow {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; color: var(--nex-teal);
  text-transform: uppercase; margin-bottom: 4px;
}
.client-name {
  font-size: 22px; font-weight: 300;
  color: var(--nex-navy);
  font-family: 'Noto Serif Display', serif; line-height: 1.2;
}
.client-sub { font-size: 12px; color: var(--nex-gray); margin-top: 3px; }
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.badge { font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 20px; display: inline-flex; align-items: center; gap: 4px; }
.badge-stage { background: var(--teal-bg); color: var(--nex-teal); border: 1px solid rgba(31,95,122,0.2); }
.badge-type { background: var(--navy-bg); color: var(--nex-navy); border: 1px solid var(--border-mid); }
.opp-num { font-size: 11px; color: var(--text-muted); font-family: 'DM Mono', monospace; }

.key-row {
  display: flex; gap: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.kr-item { display: flex; flex-direction: column; gap: 2px; }
.kr-label { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.kr-val { font-size: 12px; font-weight: 500; color: var(--nex-navy); }
.kr-val.warn { color: var(--amber-text); }
.kr-val.good { color: var(--green-text); }
.kr-val.bad  { color: var(--red-text); }

.section {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 14px;
}
.sec-title {
  font-size: 9px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--nex-teal);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.back-link {
  font-size: 12px; color: var(--nex-teal);
  display: inline-flex; align-items: center; gap: 4px;
  margin-bottom: 14px;
}
.back-link:hover { color: var(--nex-navy); }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .project-grid { grid-template-columns: 1fr; }
  .header-top { flex-direction: column; }
  .key-row { gap: 12px; }
}
