/* ═══════════════════════════════════════════════════════
   COCKPIT THEME — one look for the whole Command Center
   ───────────────────────────────────────────────────────
   The "Your dashboard" frame (report-v2.css) uses a flat, square,
   green-accent "industry" look. Older cards still carried the v4
   glass look (purple accent, gradients, rounded corners, hover lift),
   so the page read as two different products stacked together.
   Brand colour: Trans-Canada Highway sign green (#006A4E), see site.css.

   The colour/font tokens in cockpit.html's :root now mirror the
   report-v2 tokens. This file removes the remaining v4 effects so
   legacy cards match the frame. Visual only: no selectors here are
   used by any script.

   To roll back: remove the <link> to this file in cockpit.html.
   ═══════════════════════════════════════════════════════ */

/* ── Tokens ──
   Declared on <body> (not :root) on purpose: site.css is injected after this
   file by shared-nav.js and re-sets the shared brand tokens on :root. A value
   declared on body wins for everything inside the page, so the dashboard
   gets the report-v2 palette while site.css stays untouched for other pages.
   Values mirror the light .report-v2 tokens in report-v2.css. */
body[data-page="cockpit"] {
    --bg-white: #ffffff;
    --bg-light: #f2f2f3;
    --text-dark: #1d1f20;
    --text-body: #424244;
    --text-muted: #6b6b6e;
    --accent: #006A4E;
    --accent-rgb: 0,106,78;
    --accent-hover: #004D38;
    --accent-deep: #004D38;
    --accent-light: #E8F3EE;
    --accent-wash: #E8F3EE;
    --accent-glow: rgba(0,106,78,0.15);
    --accent-ring: rgba(0,106,78,0.35);
    --accent-primary: #006A4E;
    --accent-secondary: #2E8B66;
    --primary: #006A4E;
    --brand: #006A4E;
    --border: #d4d4d7;
    --radius: 0px;
    --radius-sm: 0px;
    --radius-lg: 0px;
    --shadow-md: none;
    --shadow-lg: none;
    --font-sans: 'Barlow', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
    --bg-dark: #0B2B20;
    --bg-dark-soft: #14513B;
    --text-on-dark: #e7e7ea;
}

/* Shared site chrome (top nav + footer) is the same on every page, so it
   keeps the site-wide fonts and corner radius from site.css. Colours are
   the same Trans-Canada green everywhere. */
body[data-page="cockpit"] #tcd-nav,
body[data-page="cockpit"] #tcd-footer {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --radius-sm: 8px; --radius: 12px; --radius-lg: 16px;
}

/* ── Page background: flat, no animated mesh ── */
body[data-page="cockpit"] {
    background: var(--bg-light);
}
body[data-page="cockpit"]::before {
    content: none;
    animation: none;
}

/* ── Legacy cards: flat, square, hairline border (match .report-v2 .card) ── */
body[data-page="cockpit"] .card:not(.blueprint) {
    background: var(--bg-white);
    backdrop-filter: none;
    border: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
}
body[data-page="cockpit"] .card:not(.blueprint):hover {
    transform: none;
    box-shadow: none;
}
body[data-page="cockpit"] .card h3 {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    color: var(--text-dark);
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.02em;
}
body[data-page="cockpit"] .card h3 i { color: var(--accent); }

/* ── Identity header: same charcoal as report-v2 dark, no glow ── */
body[data-page="cockpit"] .id-header {
    background: var(--bg-dark);
    border-radius: 0;
    box-shadow: none;
}
body[data-page="cockpit"] .id-header::before,
body[data-page="cockpit"] .id-header::after { content: none; }
body[data-page="cockpit"] .score-click-wrap {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(var(--accent-rgb),0.6);
    border-radius: 0;
}
body[data-page="cockpit"] .score-click-wrap:hover {
    box-shadow: none;
    transform: none;
    background: rgba(var(--accent-rgb),0.18);
}
body[data-page="cockpit"] .mode-toggle,
body[data-page="cockpit"] .mode-btn { border-radius: 0; }
body[data-page="cockpit"] .mode-btn.active {
    background: var(--accent);
    box-shadow: none;
}

/* ── Buttons: solid accent, square, no lift (match .report-v2 .btn-primary) ── */
body[data-page="cockpit"] .btn-primary:not(.report-v2 .btn-primary),
body[data-page="cockpit"] .btn-probe,
body[data-page="cockpit"] .btn-recipe,
body[data-page="cockpit"] .btn-gen,
body[data-page="cockpit"] .btn-new-scan,
body[data-page="cockpit"] .btn-reset-audit,
body[data-page="cockpit"] .btn-share-client {
    border-radius: 0;
    box-shadow: none;
}
body[data-page="cockpit"] .btn-primary:not(.report-v2 .btn-primary),
body[data-page="cockpit"] .btn-probe {
    background: var(--accent);
    color: #fff;
}
body[data-page="cockpit"] .btn-primary:not(.report-v2 .btn-primary):hover,
body[data-page="cockpit"] .btn-probe:hover {
    background: var(--accent-hover);
    box-shadow: none;
    transform: none;
}

/* ── Form fields: square, hairline ── */
body[data-page="cockpit"] #dashboard input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body[data-page="cockpit"] #dashboard select,
body[data-page="cockpit"] #dashboard textarea,
body[data-page="cockpit"] .no-data input {
    border-radius: 0;
}

/* ── Stat strip + platform bar ── */
body[data-page="cockpit"] .stat-mini {
    background: var(--bg-white);
    backdrop-filter: none;
    border: 1px solid var(--border);
    border-radius: 0;
}
body[data-page="cockpit"] .stat-mini-icon { border-radius: 0; }
body[data-page="cockpit"] .stat-mini-val { font-family: var(--font-display); font-size: 1.1rem; }

/* ── Score breakdown popup + modals ── */
body[data-page="cockpit"] .score-breakdown-popup,
body[data-page="cockpit"] .diag-modal-content,
body[data-page="cockpit"] .matrix-info-content,
body[data-page="cockpit"] .upgrade-modal-content {
    border-radius: 0;
    border: 1px solid var(--border);
}
body[data-page="cockpit"] .sb-item {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0;
}
body[data-page="cockpit"] .sb-item:hover { transform: none; }

/* ── Start Here (preflight) module ── */
body[data-page="cockpit"] .preflight-module { border-radius: 0; }

/* ── Empty state (before a scan) ── */
body[data-page="cockpit"] .no-data .icon-ring {
    background: var(--accent-light);
    box-shadow: 0 0 0 1px var(--border);
    animation: none;
}
body[data-page="cockpit"] .no-data h2 {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--text-dark);
    font-family: var(--font-display);
}

/* ── Progress bar: single accent, no rainbow sweep ── */
body[data-page="cockpit"] .scan-progress .bar { background: var(--accent); }

/* ── Tooltips ── */
body[data-page="cockpit"] .tippy-box[data-theme~='tcd'] { border-radius: 0; }

/* ── Square corners on the remaining legacy blocks ──
   report-v2 is square everywhere. These legacy pieces set their own radius
   (class rules or inline style), so square them here. Circles (50%) such as
   step numbers, score rings and status dots are left alone. */
body[data-page="cockpit"] #dashboard .pf-header,
body[data-page="cockpit"] #dashboard .pf-check,
body[data-page="cockpit"] #dashboard .pf-btn,
body[data-page="cockpit"] #dashboard .pf-score-bar,
body[data-page="cockpit"] #dashboard .rtf-banner,
body[data-page="cockpit"] #dashboard .rtf-link,
body[data-page="cockpit"] #dashboard .card-expand-btn,
body[data-page="cockpit"] #dashboard .kw-toggle-btn,
body[data-page="cockpit"] #dashboard .ap-verdict,
body[data-page="cockpit"] #dashboard .mon-pop-trigger,
body[data-page="cockpit"] #dashboard .dash-help,
body[data-page="cockpit"] #dashboard .geo-cell,
body[data-page="cockpit"] #dashboard .fix-item,
body[data-page="cockpit"] #dashboard .feed-item {
    border-radius: 0;
}
body[data-page="cockpit"] #dashboard [style*="border-radius"]:not([style*="50%"]) {
    border-radius: 0 !important;
}
body[data-page="cockpit"] #dashboard .btn-primary[style] { box-shadow: none; }



/* ── Empty state heading + scan bar ── */
body[data-page="cockpit"] .no-data h1 {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    color: var(--text-dark);
    font-family: var(--font-display);
    font-weight: 600 !important;
}
body[data-page="cockpit"] .cockpit-scan-bar {
    border-radius: 0;
    border-width: 1px;
    box-shadow: none;
}
body[data-page="cockpit"] .cockpit-scan-bar button {
    background: var(--accent);
    border-radius: 0;
}
