/* ═══════════════════════════════════════════════
   ERPS – ERP Vendor Selection Platform
   ═══════════════════════════════════════════════ */

:root {
    --primary: #1F4E79;
    --primary-dark: #163a5c;
    --primary-light: #dbeafe;
    --accent: #2E75B6;
    --secondary: #FFF59D;
    --tertiary: #90CAF9;
    --neutral: #0D1117;
    --heading-font: 'Space Grotesk', sans-serif;
    --body-font: 'Manrope', sans-serif;
    --text-on-primary: #ffffff;
    --text-on-accent: #ffffff;
    --text-on-secondary: #111827;
    --text-on-tertiary: #111827;
    --text-on-neutral: #ffffff;
    --logo-bg: rgba(255,255,255,0.92);
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --success: #16a34a;
    --success-light: #dcfce7;
    --success-dark: #047857;  /* green TEXT on light backgrounds (AA); --success alone is too light for small text */
    /* ── Design tokens (P0, 2026-06-10 — see docs/DESIGN.md) ──
       Maturity ramp: value-coded fills 0/25/50/75/100. Vendor palette:
       chart/legend series, colour-blind-safe order. Card/table tokens:
       the single visual language all screens converge on. */
    --m-0: #e24b4a; --m-25: #ef9f27; --m-50: #eac54f; --m-75: #97c459; --m-100: #1d9e75;
    --v-1: #185FA5; --v-2: #7f77dd; --v-3: #1d9e75; --v-4: #ef9f27; --v-5: #a32d2d; --v-6: #0f6e56; --v-7: #854f0b --v-8: #b5179e; --v-9: #3a86ff; --v-10: #fb5607;
    --card-radius: 10px; --card-border: 1px solid var(--gray-200); --card-pad: 13px 14px;
    --th-bg: var(--gray-50); --th-color: var(--gray-600); --th-size: 11px;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --purple: #6366f1;
    --purple-dark: #7c3aed;
    --purple-light: #ede9fe;
    --tier-a-bg: #fee2e2; --tier-a-text: #991b1b;
    --tier-b-bg: #fef3c7; --tier-b-text: #92400e;
    --tier-c-bg: #dbeafe; --tier-c-text: #1e40af;
    --tier-d-bg: #e5e7eb; --tier-d-text: #374151;
    --border-color: #e5e7eb;
    --focus-ring: rgba(37, 99, 235, 0.15);
    --radius: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,.1);
}

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

body {
    margin: 0;
    font-family: var(--body-font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-800);
    background: var(--gray-50);
}

h1, h2, h3, h4 { font-family: var(--heading-font); margin-top: 0; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }


/* ═══ HEADER ═══════════════════════════════════ */

.header {
    background: var(--primary);
    color: var(--text-on-primary);
    padding: 12px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none !important;
    color: var(--text-on-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo:hover { opacity: 0.9; }

.logo-text { color: var(--text-on-primary); }

.logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--logo-bg);
    padding: 4px 10px;
    border-radius: 6px;
    min-height: 48px;
}

.header-logo-img {
    height: 40px;
    width: auto;
    max-width: 160px;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    font-size: 0.9rem;
    color: var(--text-on-primary);
    opacity: 0.9;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
a.user-info:hover { opacity: 1; }

.admin-badge {
    background: rgba(159,122,234,0.85);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 5px;
    text-transform: uppercase;
}

.facilitator-badge {
    background: rgba(56,178,172,0.85);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 5px;
    text-transform: uppercase;
}

.logout-btn {
    padding: 6px 12px;
    background: rgba(128,128,128,0.2);
    color: var(--text-on-primary);
    text-decoration: none !important;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.logout-btn:hover { background: rgba(128,128,128,0.35); }

/* Notification bell removed — kept selectors as no-op for any legacy reference. */
.notif-bell, .notif-count { display: none; }

/* Per-section nav bubble — small red counter next to the menu label.
   Set to "1/2/3+" overflow style when count >= 100. */
.nav-item a {
    position: relative;
}
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    background: var(--danger);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 9px;
    line-height: 1;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* Dashboard "What's changed since last visit" tile — capped to 1/5 viewport
   when collapsed, fully expandable. */
.dashboard-changes-tile {
    max-height: 20vh;
    overflow: hidden;
    transition: max-height 0.25s ease;
    position: relative;
}
.dashboard-changes-tile.expanded {
    max-height: 80vh;
    overflow-y: auto;
}
.dashboard-changes-tile:not(.expanded)::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 36px;
    height: 32px;
    background: linear-gradient(to bottom, transparent, var(--card-bg, #fff));
    pointer-events: none;
}
.dashboard-changes-toggle {
    display: block;
    padding: 8px 16px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    text-align: center;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--primary);
    user-select: none;
}
.dashboard-changes-toggle:hover { background: var(--gray-100); }
.dashboard-changes-section {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
}
.dashboard-changes-section:last-of-type { border-bottom: none; }
.dashboard-changes-section h4 {
    margin: 0 0 6px;
    font-size: 0.85rem;
    color: var(--gray-700);
    font-weight: 600;
}
.dashboard-changes-section .item {
    margin: 2px 0;
    font-size: 0.85rem;
    color: var(--gray-600);
}
.dashboard-changes-section .more-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
}
.dashboard-changes-section .more-link:hover { text-decoration: underline; }

.project-select-header {
    background: rgba(128,128,128,0.2);
    color: var(--text-on-primary);
    border: 1px solid rgba(128,128,128,0.3);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    max-width: 200px;
}
.project-select-header:focus {
    outline: none;
    border-color: rgba(128,128,128,0.6);
}

.project-badge-header {
    background: rgba(128,128,128,0.2);
    color: var(--text-on-primary);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}


/* ═══ NAVIGATION BAR ═══════════════════════════ */

.nav {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}
.nav-item.nav-right {
    margin-left: auto;
}

.nav-item a {
    display: block;
    padding: 15px 25px;
    text-decoration: none !important;
    color: var(--gray-500);
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.nav-item a:hover {
    color: var(--primary);
    background: var(--gray-50);
}

.nav-item a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.project-badge {
    background: var(--primary);
    color: var(--text-on-primary);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}


/* ═══ MAIN CONTENT ══════════════════════════════ */

.main { padding: 30px 0; }

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}


/* ═══ FLASH MESSAGES ════════════════════════════ */

.flash-container {
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 0 1.5rem;
}

.flash-message {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: .5rem;
}

.flash-error { background: var(--danger-light); color: var(--tier-a-text); border: 1px solid var(--danger-light); }
.flash-success { background: var(--success-light); color: var(--success); border: 1px solid var(--success-light); }
.flash-info { background: var(--primary-light); color: var(--tier-c-text); border: 1px solid var(--primary-light); }
.flash-warning { background: var(--warning-light); color: var(--tier-b-text); border: 1px solid var(--warning-light); }


/* ═══ PAGE HEADER ═══════════════════════════════ */

.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.page-header h1 { margin: 0; font-size: 1.5rem; font-weight: 600; }
.page-header .meta, .page-header .page-subtitle {
    color: var(--gray-500); font-size: 13px; width: 100%;
}

.header-actions { margin-left: auto; display: flex; gap: .5rem; }


/* ═══ BUTTONS ═══════════════════════════════════ */

.btn, button.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .15s;
    line-height: 1.4;
}

.btn-primary { background: var(--primary); color: var(--text-on-primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { opacity: .9; }
.btn-full { width: 100%; text-align: center; }

.btn-sm, button.btn-sm {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid var(--gray-300);
    background: #fff;
    color: var(--gray-700);
    cursor: pointer;
    text-decoration: none !important;
}
.btn-sm:hover { background: var(--gray-100); }

.btn-promote { background: var(--primary-light); color: var(--primary-dark); border-color: var(--primary); }
.promoted { background: var(--gray-100); color: var(--success); border-color: var(--success); }

.link-secondary { color: var(--gray-500); font-size: 13px; }


/* ═══ CARDS ═════════════════════════════════════ */

.card, .section-card, .form-card {
    background: #fff;
    border: var(--card-border);
    border-radius: var(--card-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.card h3, .section-card h3 { margin: 0 0 .75rem; font-size: 15px; font-weight: 600; }
.card-full { grid-column: 1 / -1; }
.card-warning { border: 1px solid var(--warning); background: var(--warning-light); }
.card-info { border: 1px solid var(--primary); background: var(--primary-light); }
.card-danger { border: 1px solid var(--danger); background: var(--danger-light); }

.dashboard-grid, .grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}


/* ═══ TABLES ════════════════════════════════════ */

.table, table.table, .table-compact {
    width: 100%;
    border-collapse: collapse;
}

/* Results Preview overview: fill the full container width */
#pv-overview table { width: 100% !important; }

.table th, .table td,
.table-compact th, .table-compact td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
}

.table th, .table-compact th {
    background: var(--th-bg);
    color: var(--th-color);
    font-weight: 600;
    font-size: var(--th-size);
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.table tbody tr:hover { background: var(--gray-50); }
.table tbody tr.overdue { background: #fff5f5; }
.table tbody tr.overdue:hover { background: #ffecec; }
.table tbody tr.row-missing-date { background: #fff7dd; }
.table tbody tr.row-missing-date:hover { background: #fff0c2; }

/* Action Tracker — inline due-date edit + per-person badges */
/* Inline due-date editor — spec: form input styling, var(--radius), small. */
.action-due-edit {
    width: 130px;
    padding: 4px 8px;
    font-size: 0.85rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius, 6px);
    background: #fff;
    font-family: inherit;
}
.action-due-edit:hover { border-color: var(--primary); }
.action-due-edit:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,78,121,0.15); }

/* Missing-due-date pill — yellow/amber, complements existing .badge-overdue (red).
   Uses --warning-light + tier-b-text for spec-aligned theming. */
.badge-no-due {
    background: var(--warning-light);
    color: var(--tier-b-text);
}

/* Accordion section — gray-50 header that matches .card-header tone, with a
   subtle hover lift. Per spec: "Consistency over novelty" — matches the
   existing "Overdue Actions by Person" accordion on the dashboard. */
.accordion-toggle {
    background: var(--gray-50);
    border: none;
    border-bottom: 1px solid var(--gray-200);
    padding: 10px 16px;
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    color: var(--gray-700);
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}
.accordion-toggle:hover { background: var(--gray-100); }
.accordion-arrow {
    color: var(--gray-500);
    font-size: 12px;
    width: 14px;
    display: inline-block;
    transition: transform 0.15s;
}
.accordion-body { padding: 0; }
.accordion-item:last-child .accordion-toggle { border-bottom: none; }

/* Status badge-select — single control replaces "[badge] [Update… select]".
   Looks like a badge until clicked; opens a native dropdown for status change.
   Color-coded by current status, matching the spec's Action Status palette. */
.status-badge-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 3px 24px 3px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    background-position: right 6px center;
    background-repeat: no-repeat;
    background-size: 10px 10px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M3 4l3 4 3-4z' fill='%236b7280'/></svg>");
}
.status-badge-select.status-open {
    background-color: var(--primary-light);
    color: var(--tier-c-text, #1E40AF);
}
.status-badge-select.status-in-progress {
    background-color: var(--warning-light);
    color: var(--tier-b-text);
}
.badge-in-progress { background: var(--warning-light); color: var(--tier-b-text); }
.status-badge-select.status-closed {
    background-color: var(--success-light);
    color: var(--success);
}
.status-badge-select.status-deferred {
    background-color: var(--gray-200);
    color: var(--gray-700);
}
.status-badge-select:hover {
    border-color: var(--gray-300);
}
.status-badge-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31,78,121,0.15);
}

/* Description-as-link — invisible link styling with hover hint. */
.action-desc-link {
    color: inherit;
    text-decoration: none;
    display: block;
}
.action-desc-link:hover {
    color: var(--primary);
}
.action-desc-link:hover strong { text-decoration: underline; }

/* Filter chip — subtle pill, toggles state via URL param. Matches spec's
   "Cards" + small button style without inventing new components. */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.8rem;
    color: var(--gray-700);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.filter-chip:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}
.filter-chip-active {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary);
}
.filter-chip-active:hover {
    background: var(--primary-light);
}

.table-compact td { font-size: 13px; padding: 6px 8px; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }


/* ═══ FORMS ═════════════════════════════════════ */

.form-card { max-width: 700px; padding: 1.5rem; }

.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block; font-weight: 500; font-size: 13px;
    margin-bottom: 4px; color: var(--gray-700);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    background: #fff;
}

.form-group textarea { resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }

.form-section { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--gray-200); }
.form-section:last-of-type { border-bottom: none; }
.form-section h2 { font-size: 1rem; font-weight: 600; margin-bottom: .75rem; color: var(--gray-700); }

.form-label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 4px; color: var(--gray-700); }

.form-input, .form-textarea {
    width: 100%; padding: 8px 10px;
    border: 1px solid var(--gray-300); border-radius: var(--radius);
    font-size: 14px; background: #fff; font-family: inherit;
}
.form-input:focus, .form-textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.form-textarea { resize: vertical; }

.form-help-text { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

.form-actions { display: flex; gap: .75rem; margin-top: 1.25rem; }

.inline-form {
    display: flex; gap: .5rem; align-items: center; margin: .75rem 0;
}
.inline-form input, .inline-form select { padding: 6px 8px; font-size: 13px; }

.inline-filters, .filter-bar form {
    display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.inline-filters select, .filter-bar select {
    padding: 6px 10px; border: 1px solid var(--gray-300);
    border-radius: var(--radius); font-size: 13px;
}

.readonly { background: var(--gray-100) !important; color: var(--gray-500); }


/* ═══ STATUS / TIER / PHASE BADGES ══════════════ */

.status-open, .status-draft, .badge-warning { color: var(--tier-b-text); font-weight: 500; }
.status-closed, .status-completed, .status-consolidated, .status-weighted,
.badge-success { color: var(--success); font-weight: 500; }
.status-deferred, .status-archived { color: var(--gray-500); }
.status-n\/a { color: var(--gray-500); }
.overdue, .text-danger { color: var(--danger); font-weight: 500; }

.badge, .tier-badge, .status-badge, .role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 12px;
}

.tier-A, .badge-tier-a { background: var(--tier-a-bg); color: var(--tier-a-text); }
.tier-B, .badge-tier-b { background: var(--tier-b-bg); color: var(--tier-b-text); }
.tier-C, .badge-tier-c { background: var(--tier-c-bg); color: var(--tier-c-text); }
.tier-D, .badge-tier-d { background: var(--tier-d-bg); color: var(--tier-d-text); }

.phase-invited { color: var(--gray-500); }
.phase-rfi { color: var(--primary); font-weight: 500; }
.phase-rfp { color: var(--warning); font-weight: 500; }
.phase-evaluated { color: var(--success); font-weight: 500; }

.tier-pending { color: var(--gray-500); }
.tier-pass { color: var(--success); font-weight: 600; }
.tier-fail { color: var(--danger); font-weight: 600; }

.comply-yes { color: var(--success); font-weight: 600; }
.comply-no { color: var(--danger); font-weight: 600; }
.pending { color: var(--gray-500); font-style: italic; }

.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-danger { background: var(--danger-light); color: var(--tier-a-text); }
.badge-success { background: var(--success-light); color: var(--success); }


/* ═══ MATURITY BAR ══════════════════════════════ */

.maturity-bar {
    width: 100%; height: 20px; background: var(--gray-200);
    border-radius: 3px; overflow: hidden;
}
.maturity-fill {
    height: 100%; background: var(--m-75); color: #fff;
    font-size: 11px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    min-width: 30px;
}


/* ═══ TABS ══════════════════════════════════════ */

.tab-bar, .tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1rem;
    gap: 0;
}

.tab, .tab-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    color: var(--gray-500);
}

.tab:hover, .tab-btn:hover { color: var(--gray-700); }
.tab.active, .tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-content, .tab-panel { display: none; }
.tab-content.active, .tab-panel.active { display: block; }

.tab-badge {
    display: inline-block;
    min-width: 18px;
    padding: 1px 6px;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
}
.tab-badge-muted {
    background: var(--gray-300);
    color: var(--gray-700);
}


/* ═══ TOPIC / ENTRY BLOCKS ══════════════════════ */

.topic-block {
    margin-bottom: 1.5rem; background: #fff;
    border: 1px solid var(--gray-200); border-radius: var(--radius);
    padding: 1rem;
}

.topic-header { margin: 0 0 .75rem; font-size: 14px; font-weight: 600; color: var(--gray-700); }

.entry-row, .entry-item {
    display: flex; gap: .75rem; padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}

.entry-type-badge, .type-badge {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}

.type-fact, .type-F { background: var(--primary-light); color: var(--tier-c-text); }
.type-decision, .type-D { background: var(--success-light); color: var(--success); }
.type-action, .type-A { background: var(--warning-light); color: var(--tier-b-text); }

.entry-body, .entry-content { flex: 1; }
.entry-body p, .entry-content p { margin: 0 0 4px; }
.entry-meta, .entry-details {
    display: flex; gap: 1rem; font-size: 12px; color: var(--gray-500);
    align-items: center;
}

.add-entry-bar, .add-entry-form {
    display: flex; gap: .5rem; margin-top: .75rem;
    align-items: center; flex-wrap: wrap;
}
.add-entry-bar select, .add-entry-bar input,
.add-entry-form select, .add-entry-form input {
    padding: 5px 8px; font-size: 13px;
    border: 1px solid var(--gray-300); border-radius: 4px;
}
.add-entry-bar input[type="text"], .add-entry-form input[type="text"] {
    flex: 1; min-width: 200px;
}


/* ═══ STATS ═════════════════════════════════════ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid var(--gray-200);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-value.danger { color: var(--danger); }
.stat-value.success { color: var(--success); }

.stat-label {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-top: 5px;
}

.stat-row, .stats-row {
    display: flex; gap: 1.5rem; margin: .75rem 0;
}
.stat { text-align: center; }
.stat-num { display: block; font-size: 24px; font-weight: 700; color: var(--primary); }

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* Card with header */
.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    color: var(--primary);
}

.card-body { padding: 20px; }

/* Meeting list items */
.meeting-list { list-style: none; padding: 0; margin: 0; }
.meeting-item {
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.meeting-item:hover { background: var(--gray-50); }
.meeting-info h4 { color: var(--primary); margin: 0 0 5px; }
.meeting-info h4 a { color: var(--primary); text-decoration: none; }
.meeting-info h4 a:hover { text-decoration: underline; }
.meeting-info p { color: var(--gray-500); font-size: 0.85rem; margin: 0; }

/* Filters */
.filters {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid var(--gray-200);
}
.filters-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: end;
}
.filter-group { display: flex; flex-direction: column; }
.filter-group label { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 5px; }
.filter-group select, .filter-group input {
    padding: 8px 12px; border: 1px solid var(--gray-200); border-radius: 4px; font-size: 0.9rem;
}
.filter-group select:focus, .filter-group input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(31, 78, 121, 0.2);
}
.filter-buttons { display: flex; gap: 10px; }

/* Results header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.results-count { font-weight: 600; color: var(--primary); }

/* Badge styles matching MoM */
.badge-overdue { background: var(--danger-light); color: var(--tier-a-text); }
.badge-open { background: var(--primary-light); color: var(--tier-c-text); }
.badge-closed { background: var(--success-light); color: var(--success); }
.badge-deferred { background: var(--gray-200); color: var(--gray-700); }

/* AI suggestion marker — replaces the 🤖 emoji (which renders ambiguously
   across fonts). Small pill, used inline before AI-generated hints. */
.ai-badge {
    display: inline-block;
    background: var(--primary-light, #dbeafe);
    color: var(--primary-dark, #1e40af);
    font-size: 12px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.04em;
    margin-right: 4px;
    vertical-align: 1px;
    line-height: 1.2;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 15px; }

/* Page title */
.page-title {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.count { font-size: 12px; color: var(--gray-500); font-weight: 400; }
.count-info { color: var(--gray-500); font-size: 13px; margin-top: .5rem; }


/* ═══ LOGIN ═════════════════════════════════════ */

.login-page, .login-container {
    display: flex; align-items: center; justify-content: center;
    min-height: 80vh;
}

.login-card, .login-box {
    background: #fff; border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 2rem;
    width: 360px; box-shadow: var(--shadow-md); text-align: center;
}

.login-card h1, .login-box h1 { margin: 0; font-size: 1.75rem; }
.login-title { font-size: 1.75rem; margin: 0; }
.subtitle, .login-subtitle { color: var(--gray-500); margin: 4px 0 1.5rem; font-size: 14px; }
.login-card .form-group, .login-box .form-group { text-align: left; }
.login-form .form-group { text-align: left; }

.btn-block { width: 100%; text-align: center; display: block; }

.login-footer { margin-top: 1rem; text-align: center; }

.current-logo { margin-bottom: 1rem; }
.logo-preview { max-height: 48px; width: auto; border: 1px solid var(--gray-200); border-radius: 4px; padding: 4px; }

.select-project-container {
    max-width: 700px; margin: 3rem auto; text-align: center;
}
.select-project-header { margin-bottom: 2rem; }
.select-project-header h1 { margin: 0 0 .5rem; font-size: 1.5rem; }
.select-project-header p { color: var(--gray-500); margin: 0; }

.project-cards-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem; text-align: left;
}

.project-card {
    display: block; padding: 1rem 1.25rem;
    border: 1px solid var(--gray-200); border-radius: var(--radius);
    text-decoration: none !important; color: var(--gray-800);
    transition: border-color .15s, box-shadow .15s;
    background: #fff; box-shadow: var(--shadow);
}
.project-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }

.project-card-header { margin-bottom: .5rem; }
.project-code { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.project-card-body {}
.project-name { margin: 0 0 .5rem; font-size: 14px; color: var(--gray-600); }
.project-role { margin: 0; }

.no-projects-message { text-align: center; color: var(--gray-500); padding: 2rem; }

.page-container { max-width: 800px; }

.role-tag {
    display: inline-block; background: var(--primary-light);
    color: var(--primary-dark); padding: 2px 8px;
    border-radius: 3px; font-size: 11px; font-weight: 600; margin-left: 8px;
}


/* ═══ NOTIFICATIONS ═════════════════════════════ */

.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-list li, .notif-item {
    display: flex; align-items: center; gap: .75rem;
    padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px;
}
.notif-item.unread, .notif-list li.unread { font-weight: 500; background: var(--primary-light); border-radius: 4px; padding-left: 8px; }

.notif-type {
    background: var(--gray-100); padding: 2px 6px;
    border-radius: 3px; font-size: 11px; color: var(--gray-600);
}
.notif-content p { margin: 4px 0; font-size: 13px; color: var(--gray-500); }
.notif-actions { display: flex; gap: .5rem; margin-left: auto; }


/* ═══ Q&A ═══════════════════════════════════════ */

.qa-list { margin: .5rem 0; }
.qa-thread {
    padding: 10px; border: 1px solid var(--gray-200);
    border-radius: var(--radius); margin-bottom: .5rem;
    display: flex; align-items: center; gap: .75rem;
}
.qa-meta { font-size: 12px; color: var(--gray-500); margin-left: auto; }


/* ═══ DETAIL PAGES ══════════════════════════════ */

.detail-card, .detail-section {
    background: #fff; border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item label, .detail-label {
    font-size: 12px; font-weight: 500;
    color: var(--gray-500); text-transform: uppercase;
}
.detail-item span, .detail-value { display: block; margin-top: 2px; }

.detail-description {
    margin-top: 1rem; padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}


/* ═══ RFI / RFP FORMS ══════════════════════════ */

.rfi-row, .rfp-row, .svc-row, .response-row {
    padding: 12px; border: 1px solid var(--gray-200);
    border-radius: var(--radius); margin-bottom: .75rem;
}
.rfi-response, .response-options { display: flex; gap: 1.5rem; margin: 8px 0; }
.rfi-response label, .response-options label { display: flex; align-items: center; gap: 4px; cursor: pointer; }

.phase-gate, .locked-section {
    text-align: center; padding: 2rem; color: var(--gray-500);
    background: var(--gray-50); border-radius: var(--radius);
    border: 1px dashed var(--gray-300);
}


/* ═══ LISTS ═════════════════════════════════════ */

.decision-list, .participant-list { list-style: none; padding: 0; margin: 0; }
.decision-list li, .participant-list li {
    padding: 6px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px;
}
.participant-list li {
    display: flex; align-items: center; justify-content: space-between;
}


/* ═══ MISC ══════════════════════════════════════ */

.empty, .no-data { color: var(--gray-500); font-style: italic; padding: 1rem 0; }
.hint, .help-text { font-size: 12px; color: var(--gray-500); }
/* Screen-reader-only content (WCAG): visually hidden, exposed to AT. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 13px; }
.mt-1 { margin-top: .5rem; }
.mb-1 { margin-bottom: .5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

section { margin-bottom: 1.5rem; }
section h2 { font-size: 1.1rem; margin-bottom: .75rem; }

.filter-bar { margin-bottom: 1rem; }

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 1rem; font-size: 13px; }
.alert-info { background: var(--primary-light); color: var(--tier-c-text); border: 1px solid var(--primary-light); }
.alert-warning { background: var(--warning-light); color: var(--tier-b-text); border: 1px solid var(--warning-light); }


/* ═══ MODALS ═══════════════════════════════════ */

.modal-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-backdrop.show { display: flex; }

.modal {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    min-width: 360px;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal h3 { margin-top: 0; }

.modal-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: flex-end;
}


/* ═══ RESPONSIVE ════════════════════════════════ */

@media (max-width: 900px) {
    .header-content { flex-direction: column; gap: 10px; }
    .nav-list { flex-wrap: wrap; }
    .dashboard-grid, .grid-2col { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
    .detail-grid { grid-template-columns: 1fr 1fr; }
    .filters-grid { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .detail-grid { grid-template-columns: 1fr; }
    .navbar-right { font-size: 12px; }
}


/* ═══ REQUIREMENT SCAN SECTION ════════════════════ */

.scan-section .card-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scan-notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    gap: 12px;
}
.scan-notification:last-child { border-bottom: none; }
.scan-notification-ignored { opacity: 0.6; }
.scan-notification-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 0.9rem;
}
.scan-notification-icon { font-size: 1.2rem; }
.scan-entry-count {
    font-size: 0.8rem;
    color: var(--gray-500);
    white-space: nowrap;
}
.scan-notification-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.suggestion-group {
    border-bottom: 2px solid var(--border-color, #e0e0e0);
}
.suggestion-group:last-child { border-bottom: none; }
.suggestion-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: var(--gray-50, #f9fafb);
    font-size: 0.9rem;
}
.suggestion-table { font-size: 0.85rem; }
.suggestion-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-500); }
.suggestion-source-desc { font-size: 0.8rem; color: var(--gray-500); }
.suggestion-table .suggestion-cb,
.suggestion-table .select-all-cb { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
.bulk-accept-btn, .bulk-dismiss-btn { font-size: 0.8rem; padding: 4px 10px; }

.confidence-bar {
    width: 50px;
    height: 8px;
    background: var(--gray-200, #e5e7eb);
    border-radius: 4px;
    overflow: hidden;
}
.confidence-fill {
    height: 100%;
    background: var(--accent, #2E75B6);
    border-radius: 4px;
    transition: width 0.3s;
}


/* ═══ PROMOTE BUTTON ═════════════════════════════ */

.promote-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 1;
    color: var(--accent, #2E75B6);
    background: none;
    border: 1px solid var(--accent, #2E75B6);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    vertical-align: middle;
    margin-right: 4px;
    transition: background 0.15s, color 0.15s;
}
.promote-link:hover {
    background: var(--accent, #2E75B6);
    color: #fff;
}
.promote-link-done {
    color: var(--success);
    border-color: var(--success);
}
.promote-link-done:hover {
    background: var(--success);
    color: #fff;
}


/* ═══ IMPORT SPINNER ═══════════════════════════ */

.import-spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 3px solid var(--gray-200, #e5e7eb);
    border-top-color: var(--primary, #1F4E79);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.import-spinner-lg { width: 32px; height: 32px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Page-level import/transcription overlay */
.import-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.import-overlay-card {
    background: #fff;
    padding: 24px 28px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 380px;
    max-width: 520px;
}


/* ═══ M2 CONSOLIDATION ═════════════════════════ */

/* Dashboard action cards */
.stat-card-action {
    border: 1px solid var(--primary);
    background: var(--primary-light);
}
.stat-card-danger {
    border: 1px solid var(--danger);
    background: var(--danger-light);
}
.stat-card-sm {
    padding: 10px 15px !important;
}
.stat-card-sm .stat-value {
    font-size: 1.3rem !important;
}
.stat-card-sm .stat-label {
    font-size: 0.75rem !important;
}
.stats-grid-secondary {
    margin-top: 8px;
    gap: 10px;
}
.stat-link {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--primary, #1F4E79);
    text-decoration: none;
    font-weight: 500;
}
.stat-link:hover { text-decoration: underline; }

/* Ref code in requirements table */
.ref-code {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--gray-500, #6b7280);
    white-space: nowrap;
}

/* Parent/child hierarchy */
.child-row {
    background: var(--gray-50, #f9fafb);
}
.child-indent {
    display: inline-block;
    width: 20px;
    color: var(--gray-400, #9ca3af);
    margin-right: 4px;
}
.child-indent::before {
    content: "\2514\2500";
    font-family: monospace;
}
.consolidated-row {
    opacity: 0.7;
}

/* Status badges — M2 colours */
.reset-pw-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--gray-600);
    padding: 2px 4px;
    border-radius: 3px;
}
.reset-pw-btn:hover { background: var(--gray-100); color: var(--primary); }

.badge-sysadmin {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: var(--purple-dark);
    color: #fff;
    border-radius: 3px;
    vertical-align: middle;
}
.badge-role {
    display: inline-block;
    padding: 1px 5px;
    font-size: 0.65rem;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-600);
    border-radius: 3px;
    vertical-align: middle;
    text-transform: capitalize;
}
.badge-draft { background: var(--gray-400); color: #fff; }
.badge-consolidated { background: var(--purple); color: #fff; }
.badge-weighted { background: var(--purple-light); color: var(--purple-dark); }
.badge-approved { background: var(--success); color: #fff; }
.badge-published { background: var(--purple-dark); color: #fff; }

/* Duplicate review */
.dup-actions { white-space: nowrap; }
.dup-actions .btn { margin-right: 4px; }

/* Small button variant */
.btn-xs {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 3px;
}
.btn-success {
    background: var(--success);
    color: #fff;
    border: none;
    cursor: pointer;
}
.btn-success:hover { opacity: 0.85; }
.btn-danger-sm {
    background: none;
    color: var(--danger);
    border: 1px solid var(--danger);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
}
.btn-danger-sm:hover { background: var(--danger-light); }

/* ═══ I18N – LANGUAGE TOGGLE & TRANSLATIONS ═══════════════ */

/* Language dropdown */
.lang-dropdown {
    position: relative;
    display: inline-block;
    margin: 0 6px;
}
.lang-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s ease;
    color: inherit;
}
.lang-dropdown-trigger:hover { background: rgba(255,255,255,0.2); }
.lang-flag-current {
    font-size: 16px;
    line-height: 1;
}
.lang-chevron {
    font-size: 10px;
    opacity: 0.7;
}
.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 140px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 4px;
    z-index: 1000;
    display: none;
}
.lang-dropdown-menu.open { display: block; }
.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    color: var(--gray-800);
    font-size: 0.85rem;
    text-align: left;
}
.lang-dropdown-item:hover { background: var(--gray-100); }

/* Translated text — italic with subtle border hint */
.translated-text {
    font-style: italic;
}
span.translated-text, div.translated-text, a.translated-text {
    font-style: italic;
}

/* Inline "translated from XX" link */
.translation-note {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.75rem;
    font-style: normal;
    color: var(--gray-500);
    text-decoration: none;
    white-space: nowrap;
}
.translation-note:hover { text-decoration: underline; color: var(--primary); }

/* Small tag showing source language when no translation exists yet */
.lang-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    background: var(--gray-200);
    color: var(--gray-600);
    border-radius: 3px;
    text-transform: uppercase;
}

/* Top-of-page banner on requirement detail when viewing translation */
.translation-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 14px;
    background: var(--primary-light);
    color: var(--tier-c-text);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-style: italic;
}
.translation-banner a {
    color: var(--primary);
    text-decoration: none;
    font-style: normal;
    font-weight: 500;
}
.translation-banner a:hover { text-decoration: underline; }

/* Bulk action bar */
.bulk-action-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: var(--gray-100);
    border-radius: var(--radius);
    font-size: 0.8rem;
}
.bulk-count {
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}


/* ═══ PRINT ════════════════════════════════════ */

@media print {
    /* Hide all UI chrome */
    .header, .nav, .header-content, .header-right,
    .tab-bar, .add-entry-bar, .inline-form,
    .flash-message, .flash-messages,
    .btn, .btn-sm, .btn-primary, .btn-secondary, .btn-danger, .btn-promote,
    .form-actions, .filter-bar, .filters,
    .notif-bell, .logout-btn, .project-select-header,
    input[type="checkbox"],
    [onclick*="delete"], [onclick*="remove"],
    a[href*="/edit"], a[href*="/new"],
    .modal-backdrop {
        display: none !important;
    }

    /* Show all tab content when printing */
    .tab-content { display: block !important; }

    /* Clean layout */
    body { background: #fff; }
    .main { padding: 0; }
    .container { max-width: 100%; padding: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }

    /* Preserve category colours */
    .badge, .tier-A, .tier-B, .tier-C, .tier-D,
    .badge-primary, .badge-success, .badge-open {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    /* Page margins */
    @page { margin: 1.5cm; }
}
