/* Ad Terra variation - brand guidelines (Poppins, navy / blue / teal / cyan) on the group's dashboard layout. */
:root {
  --navy: #021A23; --navy2: #002438; --blue: #1C5F7C; --blue2: #164E67; --teal: #1B908C; --cyan: #80CEDE;
  --bg: #f0f4f8; --card: #ffffff; --border: #e2e8f0; --grid: #eef2f6; --text: #1a2b3c; --muted: #64748b;
  --green: #16a34a; --amber: #d97706; --red: #dc2626;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 13px; line-height: 1.5; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; color: var(--navy); }
code { font-size: 11px; background: var(--grid); padding: 1px 5px; border-radius: 4px; font-family: ui-monospace, Consolas, monospace; }
.text-muted { color: var(--muted); }
.small { font-size: 12px; }
.neg { color: #b91c1c; }

/* ---- shell ---- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 232px; min-width: 232px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--navy2) 0%, #0b3a55 100%); color: #fff; }
.sidebar-logo { padding: 22px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.10); }
.sidebar-logo .logo { height: 30px; width: auto; display: block; }
.sidebar-logo p { margin: 10px 0 0; font-size: 9.5px; letter-spacing: 0.12em; color: rgba(255,255,255,0.55); font-weight: 500; }
.nav-section { font-size: 10px; text-transform: uppercase; color: rgba(255,255,255,0.40); padding: 18px 20px 6px; letter-spacing: 0.08em; font-weight: 600; }
.nav-item { display: block; padding: 9px 20px 9px 17px; color: rgba(255,255,255,0.82); font-size: 12.5px; border-left: 3px solid transparent; transition: all 0.15s; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-item.active { background: rgba(128,206,222,0.14); color: var(--cyan); border-left-color: var(--cyan); font-weight: 600; }
.sidebar-foot { margin-top: auto; padding: 14px 20px; border-top: 1px solid rgba(255,255,255,0.10); font-size: 10px; color: rgba(255,255,255,0.45); line-height: 1.6; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 56px; background: var(--card); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 26px; position: sticky; top: 0; z-index: 10; }
.topbar h2 { font-size: 15px; font-weight: 700; }
.topbar .crumb { font-size: 11px; color: var(--muted); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.pill { font-size: 11px; font-weight: 500; padding: 5px 11px; border-radius: 20px; background: var(--bg); color: var(--blue); border: 1px solid var(--border); white-space: nowrap; }
.pill b { font-weight: 600; }
.pill.warn { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.content { padding: 22px 26px 60px; }

/* ---- page ---- */
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.view-head h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.view-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); max-width: 900px; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.stack > .card { margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px; min-width: 0; margin-bottom: 16px; }
.grid > .card { margin-bottom: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.card-title { font-size: 13px; font-weight: 700; color: var(--navy); }
.card-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---- KPI cards ---- */
.kpi-grid { gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px 14px 18px; position: relative; overflow: hidden; height: 100%; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cyan); }
.kpi.green::before { background: var(--green); } .kpi.amber::before { background: var(--amber); } .kpi.red::before { background: var(--red); }
.kpi .label { font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi .value { font-size: 25px; font-weight: 700; color: var(--navy); margin-top: 5px; line-height: 1.1; }
.kpi .note { font-size: 11px; color: var(--muted); margin-top: 5px; }
.kpi-link { color: inherit; display: block; }
.kpi-link:hover .kpi { border-color: var(--blue); }
.tight .kpi { padding: 10px 12px 10px 14px; } .tight .kpi .value { font-size: 18px; }
.trio .g { color: var(--green); } .trio .a { color: var(--amber); } .trio .r { color: var(--red); }

/* ---- tags, bullets, callouts ---- */
.tag { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 5px; letter-spacing: 0.01em; white-space: nowrap; }
.tag.green { background: #d1fae5; color: #047857; }
.tag.amber { background: #fef3c7; color: #b45309; }
.tag.red { background: #fee2e2; color: #b91c1c; }
.tag.blue { background: #dbeafe; color: #1d4ed8; }
.tag.cyan { background: #d9f1f5; color: #155e75; }
.tag.gray { background: #f1f5f9; color: #475569; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.bullets { list-style: none; margin: 0; padding: 0; }
.bullets li { position: relative; padding: 7px 0 7px 18px; font-size: 12.5px; line-height: 1.5; border-bottom: 1px solid var(--grid); }
.bullets li:last-child { border-bottom: 0; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.bullets li.red::before { background: var(--red); } .bullets li.amber::before { background: var(--amber); } .bullets li.green::before { background: var(--green); }
.bullet-link { color: var(--text); } .bullet-link:hover { color: var(--blue); }
.callout { background: #f0f9ff; border: 1px solid #bae6fd; border-left: 4px solid var(--blue); border-radius: 8px; padding: 12px 16px; font-size: 12.5px; color: #0c4a6e; margin-bottom: 12px; }
.callout.warn { background: #fffbeb; border-color: #fcd34d; border-left-color: var(--amber); color: #78350f; }
.empty { color: var(--muted); font-size: 12.5px; padding: 10px 0; }

/* ---- tables ---- */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; padding: 9px 12px; background: var(--navy); color: #fff; font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
th:first-child { border-radius: 6px 0 0 6px; } th:last-child { border-radius: 0 6px 6px 0; }
td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.bar-col { min-width: 170px; }
.cell-link { color: var(--navy); } .cell-link:hover { color: var(--blue); }

/* ---- progress bars ---- */
.bar { display: flex; align-items: center; gap: 10px; }
.bar-track { position: relative; flex: 1; height: 6px; background: var(--grid); border-radius: 3px; }
.bar-fill { height: 100%; background: var(--blue); border-radius: 3px; }
.bar-tick { position: absolute; top: -4px; width: 2px; height: 14px; background: var(--navy); border-radius: 1px; transform: translateX(-1px); }
.bar-value { font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; font-weight: 600; color: var(--navy); font-size: 12px; }

/* ---- tabs (project selector) ---- */
.tabs { display: inline-flex; flex-wrap: wrap; background: #f1f5f9; padding: 3px; border-radius: 8px; border: 1px solid var(--border); gap: 2px; }
.tab-btn { padding: 6px 14px; font-size: 12px; font-weight: 600; color: var(--muted); border-radius: 6px; transition: all 0.15s; }
.tab-btn:hover { color: var(--navy); }
.tab-btn.active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* ---- project page ---- */
.project-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }
.project-title { font-size: 20px; font-weight: 700; }
.prose { margin: 10px 0; font-size: 13px; line-height: 1.65; white-space: pre-line; max-width: 960px; }
.stepper { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 4px 0 14px; padding: 0; }
.step { padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 500; border: 1px solid var(--border); color: var(--muted); background: #fff; }
.step-done { background: rgba(128,206,222,0.22); border-color: transparent; color: var(--blue2); }
.step-current { background: var(--navy); border-color: transparent; color: #fff; font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 20px; }
.fact .k { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.fact .v { font-size: 13px; font-weight: 500; color: var(--navy); margin-top: 2px; }
.hero { font-size: 36px; font-weight: 700; color: var(--navy); line-height: 1; margin-bottom: 10px; }
.hero-notes { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin: 8px 0 14px; }
.star { color: var(--amber); }
.timeline { list-style: none; margin: 0; padding: 0; }
.achievement { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--grid); align-items: baseline; font-size: 12.5px; }
.achievement:last-child { border-bottom: 0; }
.achievement .when { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

/* ---- responsive ---- */
@media (max-width: 1200px) {
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span2 { grid-column: span 2; }
}
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; min-width: 0; height: auto; position: static; }
  .sidebar-foot { display: none; }
  .nav-item { display: inline-block; border-left: 0; border-bottom: 3px solid transparent; }
  .nav-item.active { border-bottom-color: var(--cyan); }
  .topbar { position: static; height: auto; padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .content { padding: 16px 14px 50px; }
  .g2, .g3, .g6 { grid-template-columns: 1fr; }
  .span2 { grid-column: span 1; }
  .achievement { grid-template-columns: 1fr; gap: 2px; }
}
