/* ═══════════════════════════════════════════════════════════════
   Fencepac CRM · house style (shared with the management app)
   A board-pack look: white paper on a cool grey desk, navy ink, hairline
   rules, tabular figures. Fencepac orange marks where you are (active
   page, key line) and nothing else. Red / green / amber only carry status.
   Loaded after style.css, so it wins.
   ═══════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
  --ink: #17223b;          /* headings, figures */
  --ink-2: #3b4559;        /* body text */
  --ink-3: #6b7486;        /* labels, notes */
  --rule: #dfe3ea;         /* hairlines */
  --rule-2: #eceff3;       /* inner rules */
  --desk: #f3f4f6;         /* page background */
  --paper: #ffffff;
  --brand: #e8841a;        /* Fencepac orange */
  --good: #23784a;
  --bad: #b3261e;
  --warn: #a8650a;

  --navy: #17223b; --text: var(--ink-2); --text-light: var(--ink-3); --text-muted: #8a92a2;
  --border: var(--rule); --border-light: var(--rule-2); --bg: var(--desk);
  --green: var(--good); --red: var(--bad); --blue: var(--ink); --purple: var(--ink);
  --shadow-sm: none; --shadow: none; --shadow-md: none; --shadow-lg: 0 12px 32px rgba(23, 34, 59, .14);
  --radius: 6px; --radius-sm: 4px; --radius-xs: 3px;
  --transition: background-color .15s, border-color .15s, color .15s;
}

body { font-family: 'Public Sans', -apple-system, 'Segoe UI', sans-serif; background: var(--desk); color: var(--ink-2); font-size: 13.5px; letter-spacing: 0; }
/* Figures line up in columns everywhere. */
body, table, .stat-value, .target-value { font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { letter-spacing: -.005em; }

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar { background: #16213a; width: 248px; }
.main { margin-left: 248px; }
.sidebar-brand { padding: 20px 20px 16px; }
.sidebar-brand img { width: 150px !important; border-radius: 3px; }
.sidebar-brand .brand-sub { font-size: 12px; color: #8e9ab2; margin: 2px 0 0; }
.sidebar-nav { padding: 6px 0 16px; }
.sidebar-nav .nav-group { font-size: 11.5px; font-weight: 600; color: #7884a0; padding: 16px 20px 6px; }
.sidebar-nav a { gap: 11px; padding: 7px 20px; margin: 0; font-size: 13px; color: #c3cad8; border-left: 3px solid transparent; }
.sidebar-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.sidebar-nav a.active { background: rgba(255, 255, 255, .07); color: #fff; border-left-color: var(--brand); font-weight: 600; }
.sidebar-nav a .icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.sidebar-nav a.active .icon { stroke: var(--brand); opacity: 1; }

/* ── Top bar ───────────────────────────────────────────── */
.top-bar { padding: 12px 32px; border-bottom: 1px solid var(--rule); }
.top-bar h1, #pageTitle { font-size: 19px; font-weight: 600; color: var(--ink); }
.top-bar .form-control { height: 34px; padding: 5px 10px; font-size: 13px; }
.page-content { padding: 24px 32px 48px; }

/* ── Panels and cards: paper, hairline, no lift ─────────── */
.panel, .stat-card, .target-card, .legal-card, .card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: none !important; }
.stat-card:hover, .panel:hover, .card:hover { transform: none !important; box-shadow: none !important; }
.panel { margin-bottom: 20px; }
.panel-header { background: var(--paper) !important; border-bottom: 1px solid var(--rule-2); padding: 13px 20px; }
.panel-header h2 { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.panel-body { padding: 18px 20px; }

/* Section headings: sentence case, no tracking. */
.section-title, .upd-h { font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); margin: 26px 0 10px; }
.section-title span, .section-title small { font-weight: 400; color: var(--ink-3); text-transform: none; letter-spacing: 0; }

/* ── KPI tiles: the figure is the hero, in ink ──────────── */
.stats-grid { gap: 12px; margin-bottom: 20px; }
.stat-card { padding: 16px 18px; border-top: 3px solid var(--rule); }
.stat-card .stat-icon { display: none; }
.stat-card .stat-value { font-size: 26px; font-weight: 600; color: var(--ink); line-height: 1.15; letter-spacing: -.01em; }
.stat-card .stat-label { font-size: 12.5px; font-weight: 500; color: var(--ink-3); text-transform: none; letter-spacing: 0; margin-top: 4px; }
.stat-card .stat-sub { font-size: 12px; color: var(--ink-3); line-height: 1.45; }
/* Colour only where it says on or off target. */
.stat-card.green { border-top-color: var(--good); } .stat-card.green .stat-value { color: var(--good); }
.stat-card.red { border-top-color: var(--bad); } .stat-card.red .stat-value { color: var(--bad); }
.stat-card.orange { border-top-color: var(--rule); } .stat-card.orange .stat-value { color: var(--ink); }
.stat-card.blue, .stat-card.purple { border-top-color: var(--rule); } .stat-card.blue .stat-value, .stat-card.purple .stat-value { color: var(--ink); }

/* Margin target cards */
.target-card { border-left-width: 3px; padding: 16px 20px; }
.target-card.on { border-left-color: var(--good); } .target-card.off { border-left-color: var(--bad); }
.target-head { font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.target-badge { border-radius: 3px; font-weight: 600; font-size: 11.5px; }
.target-value { font-size: 30px; font-weight: 600; color: var(--ink); }
.target-diff, .target-ytd { font-size: 18px; font-weight: 600; }
.target-bar { height: 6px; border-radius: 0; background: var(--rule-2); }
.target-fill { border-radius: 0; }
.target-card.on .target-fill { background: var(--good); } .target-card.off .target-fill { background: var(--bad); }
.target-mark { top: -4px; height: 14px; width: 2px; border-radius: 0; background: var(--ink); }

/* ── Tables: ledger style ──────────────────────────────── */
.fin-table th, .data-table th, table th { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: none !important; letter-spacing: 0 !important; background: #f8f9fb; border-bottom: 1px solid var(--rule); }
.fin-table td { border-bottom: 1px solid var(--rule-2); color: var(--ink-2); }
.fin-table tr.fin-total td { background: #f6f7f9; border-top: 1px solid var(--ink); color: var(--ink); font-weight: 600; }
.fin-table tr:hover td { background: #fafbfc; }

/* ── Buttons: flat, square-ish ─────────────────────────── */
.btn { border-radius: var(--radius-sm); font-weight: 600; box-shadow: none !important; transform: none !important; letter-spacing: 0; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #24314f; }
.btn-orange { background: var(--brand); } .btn-orange:hover { background: #d4740f; }
.btn-green { background: var(--good); } .btn-green:hover { background: #1c6640; }
.btn-red { background: var(--bad); } .btn-red:hover { background: #962019; }
.btn-outline { background: var(--paper); border: 1px solid #ccd2dc; color: var(--ink); }
.btn-outline:hover { background: #f6f7f9; border-color: #b4bccb; }
.btn:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.form-control { border-radius: var(--radius-sm); border-color: #ccd2dc; }

/* Badges and notices */
.badge { border-radius: 3px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.badge-won { background: #e6f2eb; color: var(--good); } .badge-lost { background: #f8e5e3; color: var(--bad); }
.notice { border-radius: var(--radius-sm); background: #fbf6ec; border-color: #ecdcb8; color: #6b4e12; }

/* ── Empty states and drop zones ───────────────────────── */
.lm-drop { border: 1px dashed #c4cbd6; border-radius: var(--radius); padding: 28px 24px; background: #fafbfc; }
.lm-drop > div:empty, .empty-state .empty-icon:empty, .upd-icon:empty, .pull-icon:empty, .pack-icon:empty { display: none; }
.lm-drop p { max-width: 640px; margin: 0 auto 14px; }

/* Modal */
.modal { border-radius: var(--radius); }
.modal-header h3 { font-size: 16px; font-weight: 600; color: var(--ink); }

/* Updates list and pull results */
.upd-row, .pull-row { border-radius: var(--radius-sm); border-color: var(--rule); }
.upd-bell b { background: var(--brand); }
.pull-row { position: relative; padding-left: 26px; }
.pull-row::before { content: ''; position: absolute; left: 11px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--good); }
.pull-row.pull-fail::before { background: var(--bad); }
.pull-row:has(.pull-spin)::before { display: none; }
.pull-row:has(.pull-spin) { padding-left: 12px; }


/* ── Line icons for icon-only buttons (<i class=ico-trash> …) ── */
[class^='ico-'] { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.ico-trash { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v6M14 11v6'/%3E%3C/svg%3E"); }
.ico-edit { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3Cpath d='M13.5 6.5l4 4'/%3E%3C/svg%3E"); }
.ico-mail { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='1'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E"); }
.ico-bell { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 1 1 12 0c0 7 3 9 3 9H3s3-2 3-9M10 21h4'/%3E%3C/svg%3E"); }
.ico-spark { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z'/%3E%3Cpath d='M19 16l.8 2.2L22 19l-2.2.8L19 22l-.8-2.2L16 19l2.2-.8z'/%3E%3C/svg%3E"); }
.ico-dollar { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v20M17 6H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E"); }
.ico-calendar { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='1'/%3E%3Cpath d='M3 9h18M8 2v4M16 2v4'/%3E%3C/svg%3E"); }
.ico-list { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E"); }
.ico-chart { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M7 15l4-4 3 3 5-6'/%3E%3C/svg%3E"); }

/* Top bar bell and the assistant button */
.notif-bell { position: relative; cursor: pointer; color: var(--ink-3); display: inline-flex; padding: 6px; border-radius: var(--radius-sm); }
.notif-bell:hover { color: var(--ink); background: var(--desk); }
.notif-bell [class^='ico-'] { width: 18px; height: 18px; }
.notif-badge { background: var(--brand); }
.ai-fab { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(23, 34, 59, .22); }
.ai-fab:hover { background: #24314f; }
.ai-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#aiChatPanel { border-radius: var(--radius) !important; border: 1px solid var(--rule); }
.fin-edit-icon [class^='ico-'] { width: 11px; height: 11px; }
.btn-xs [class^='ico-'] { width: 13px; height: 13px; }
.btn-danger { background: var(--bad); color: #fff; } .btn-danger:hover { background: #962019; }


/* ── CRM: division summary on the dashboard ─────────────── */
.pillar-total-card { background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-top: 3px solid var(--brand); border-radius: var(--radius); box-shadow: none; max-width: 520px; }
.pillar-total-label, .pillar-total-gp-label, .pillar-band-label, .pillar-kpi-label { font-size: 12.5px; font-weight: 500; text-transform: none; letter-spacing: 0; opacity: 1; color: var(--ink-3); }
.pillar-total-value { font-weight: 600; color: var(--ink); }
.pillar-total-gp-value { font-weight: 600; color: var(--ink); }
.pillar-total-divider { background: var(--rule); }
.pillar-total-foot, .pillar-band-foot { color: var(--ink-3); }
.pillar-tree-trunk, .pillar-tree-branch .ptc-line::before, .pillar-tree-branch .ptc-line::after { background: #c9cfd9 !important; }
.pillar-grid { gap: 12px; }
.pillar-card { background: var(--paper); border: 1px solid var(--rule); border-top: 1px solid var(--rule); border-radius: var(--radius); box-shadow: none; padding: 18px; text-align: left; }
.pillar-icon { display: none; }
.pillar-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.pillar-subtitle { padding: 0; background: none; border-radius: 0; color: var(--ink-3); font-size: 12.5px; font-weight: 500; text-transform: none; letter-spacing: 0; margin-bottom: 14px; }
.pillar-metric-band { background: #f6f7f9; color: var(--ink); border: 1px solid var(--rule-2); border-radius: var(--radius-sm); box-shadow: none; margin-bottom: 10px; }
.pillar-band-value { font-size: 24px; font-weight: 600; color: var(--ink); }
.pillar-stage-label { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; opacity: 1; color: var(--ink-3); }
.pillar-stage-value { font-weight: 600; color: var(--ink); }
.pillar-kpi-box { background: var(--paper); border: 1px solid var(--rule-2); border-radius: var(--radius-sm); }
.pillar-kpi-main { font-size: 24px; font-weight: 600; }

/* Traffic lights: steady dots, no glow or pulse */
.tl-red, .tl-yellow { box-shadow: none; animation: none; }
.tl { width: 10px; height: 10px; }
.badge-call { animation: none; }
.badge-won-fp { background: #e6f2eb !important; color: var(--good) !important; }

/* ── CRM: project header and figures ────────────────────── */
.project-header { box-shadow: none; border: 1px solid var(--rule); }
.project-kicker { font-size: 12.5px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-3); }
.project-title-row h2 { font-size: 26px; font-weight: 600; color: var(--ink); }
.command-card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-sm); box-shadow: none; padding: 14px 16px; }
.command-card-warn { background: #fdf8ee; border-color: #e9cf9a; }
.command-label { font-size: 12.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.command-value { font-size: 24px; font-weight: 600; color: var(--ink); }
.fin-card, .fin-box { background: var(--paper); border-color: var(--rule); border-radius: var(--radius-sm); }
.fin-label { font-size: 12.5px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-3); }
.quote-sheet-preview { border-radius: var(--radius); box-shadow: none; border-color: var(--rule); }
.quote-sheet-category, .cal-header, .notes-table th { text-transform: none; letter-spacing: 0; font-size: 12px; }
.form-group label { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--ink-2); }
.sidebar-footer label { text-transform: none; letter-spacing: 0; font-size: 11.5px; color: #7884a0; }
.tab { font-weight: 500; color: var(--ink-3); }
.tab.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand); }
.fin-value { font-weight: 600; color: var(--ink); }

/* ═══ Colour, brought back with a system ═══════════════════
   Each figure type keeps its own colour; Fencepac orange leads.
   ══════════════════════════════════════════════════════════ */
:root {
  --c-orange: #e07a1f; --c-orange-bg: #fdf1e5;
  --c-blue: #2c64ad;   --c-blue-bg: #e9f0fa;
  --c-teal: #1b8378;   --c-teal-bg: #e4f4f1;
  --c-purple: #6a4ca6; --c-purple-bg: #f0ebf9;
  --c-green: #23845a;  --c-green-bg: #e5f4ec;
  --c-red: #c0392b;    --c-red-bg: #fbeae7;
  --good: var(--c-green); --bad: var(--c-red);
}
/* Desk gets a faint cool tint so white panels lift off it. */
body { background: #eef1f6; }

/* Sidebar: orange active pill, icons in colour. */
.sidebar { background: linear-gradient(180deg, #17233f 0%, #121c33 100%); }
.sidebar-nav a.active { background: rgba(224, 122, 31, .14); color: #fff; border-left-color: var(--c-orange); }
.sidebar-nav a .icon { color: #8fa3c8; opacity: 1; }
.sidebar-nav a:hover .icon { color: #fff; }
.sidebar-nav .nav-group { color: #e7a35f; }

/* Top bar: a thin brand line along the bottom. */
.top-bar { border-bottom: 2px solid var(--c-orange); }

/* Panels: tinted header band with an orange marker. */
.panel-header { background: linear-gradient(180deg, #f7f9fc 0%, #f1f4f9 100%) !important; border-bottom: 1px solid var(--rule); }
.panel-header h2 { display: flex; align-items: center; gap: 9px; }
.panel-header h2::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--c-orange); flex: none; }
.section-title { display: flex; align-items: center; gap: 9px; }
.section-title::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--c-blue); flex: none; }

/* KPI tiles: coloured top edge and figure by type. */
.stat-card { border-top: 3px solid var(--c-blue); }
.stat-card .stat-value { color: var(--ink); }
.stat-card.blue { border-top-color: var(--c-blue); } .stat-card.blue .stat-value { color: var(--c-blue); }
.stat-card.orange { border-top-color: var(--c-orange); } .stat-card.orange .stat-value { color: var(--c-orange); }
.stat-card.purple { border-top-color: var(--c-purple); } .stat-card.purple .stat-value { color: var(--c-purple); }
.stat-card.green { border-top-color: var(--c-green); } .stat-card.green .stat-value { color: var(--c-green); }
.stat-card.red { border-top-color: var(--c-red); } .stat-card.red .stat-value { color: var(--c-red); }
.stat-card.teal { border-top-color: var(--c-teal); } .stat-card.teal .stat-value { color: var(--c-teal); }

/* Tables: navy header row. */
.fin-table th, .data-table th, table th { background: #1f2d4d !important; color: #e6ebf4 !important; border-bottom: none; }
.fin-table tr.fin-total td { border-top: 2px solid var(--c-orange); background: #fbf5ee; }

/* Buttons and badges */
.btn-primary { background: var(--ink); } .btn-primary:hover { background: #2a3a60; }
.btn-orange { background: var(--c-orange); }
.badge-won { background: var(--c-green-bg); color: var(--c-green); } .badge-lost { background: var(--c-red-bg); color: var(--c-red); }
.badge-request { background: var(--c-blue-bg); color: var(--c-blue); }
.target-mark { background: var(--c-orange); }
.notice { background: var(--c-orange-bg); border-color: #f1cfa8; color: #7a4510; }

/* CRM divisions: one colour each (Commercial orange, Barriers blue, Retaining teal). */
.pillar-total-card { border-top-color: var(--c-orange); }
.pillar-tree-trunk, .pillar-tree-branch .ptc-line::before, .pillar-tree-branch .ptc-line::after { background: #9fb0c9 !important; }
.pillar-card { border-top: 4px solid var(--pc, var(--c-blue)); }
.pillar-grid .pillar-card:nth-child(3n+1) { --pc: var(--c-orange); --pc-bg: var(--c-orange-bg); }
.pillar-grid .pillar-card:nth-child(3n+2) { --pc: var(--c-blue); --pc-bg: var(--c-blue-bg); }
.pillar-grid .pillar-card:nth-child(3n+3) { --pc: var(--c-teal); --pc-bg: var(--c-teal-bg); }
.pillar-card .pillar-subtitle { color: var(--pc); font-weight: 600; }
.pillar-metric-band { background: var(--pc-bg, #f6f7f9); border-color: transparent; }
.pillar-band-value, .pillar-stage-value { color: var(--pc, var(--ink)); }
.command-card { border-top: 3px solid var(--c-blue); }
.project-command-grid .command-card:nth-child(2) { border-top-color: var(--c-orange); }
.project-command-grid .command-card:nth-child(3) { border-top-color: var(--c-purple); }
.project-command-grid .command-card:nth-child(4) { border-top-color: var(--c-green); }
.fin-card { border-top: 3px solid var(--c-blue); }
.notif-badge { background: var(--c-red); }

/* Sandbox banner stays loud on purpose. */

@media (max-width: 768px) {
  .main { margin-left: 0; }
  .page-content { padding: 18px 16px 40px; }
  .top-bar { padding: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ── Insights: bid score, sign-off, rate hints, forecast ── */
#insightsBar { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ins-card { background: #fff; border: 1px solid var(--border, #dde3ea); border-top: 3px solid var(--c-blue, #2c64ad); border-radius: 6px; padding: 12px 14px; }
.ins-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ins-pill { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 10px; background: #e8eef7; color: var(--c-blue, #2c64ad); }
.ins-big { font-size: 22px; font-weight: 700; }
.ins-go { border-top-color: var(--c-green, #23845a); } .ins-go .ins-pill { background: #e3f3eb; color: var(--c-green, #23845a); }
.ins-low { border-top-color: var(--c-red, #c0392b); } .ins-low .ins-pill { background: #f9e5e3; color: var(--c-red, #c0392b); }
.ins-mid { border-top-color: var(--c-orange, #e07a1f); } .ins-mid .ins-pill { background: #fcefe2; color: #a8560f; }
.ins-sign { border-top-color: var(--c-orange, #e07a1f); background: #fffaf4; } .ins-sign .ins-pill { background: #fcefe2; color: #a8560f; }
.ins-ok { border-top-color: var(--c-green, #23845a); } .ins-ok .ins-pill { background: #e3f3eb; color: var(--c-green, #23845a); }
.ins-reasons { margin: 8px 0 6px 18px; padding: 0; font-size: 13px; line-height: 1.5; }
.ins-warn { font-size: 12px; color: #a8560f; background: #fcefe2; padding: 5px 8px; border-radius: 4px; margin: 6px 0; }
.ins-actions { display: flex; gap: 8px; margin-top: 8px; }
.rh-hint:empty { display: none; }
.rh-btn { display: block; margin-top: 3px; border: 0; background: none; padding: 0; font-size: 10.5px; color: #5a6b80; cursor: pointer; text-align: right; width: 100%; white-space: nowrap; }
.rh-btn:hover { text-decoration: underline; color: var(--c-blue, #2c64ad); }
.rh-btn.rh-low, .rh-btn.rh-high { font-weight: 600; }
.rh-btn.rh-low { color: var(--c-red, #c0392b); } .rh-btn.rh-high { color: #a8560f; }
.rh-btn.rh-low::before { content: 'Low: '; } .rh-btn.rh-high::before { content: 'High: '; }
.ins-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ins-tile { border: 1px solid var(--border, #dde3ea); border-top: 3px solid var(--c-teal, #1b8378); border-radius: 6px; padding: 10px 12px; background: #fff; }
.ins-tile-k { font-size: 12px; color: #5a6b80; } .ins-tile-v { font-size: 20px; font-weight: 700; margin: 2px 0; } .ins-tile-sm { font-size: 16px; }
.ins-tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 9px; background: #eef1f5; color: #5a6b80; }
.ins-won { background: #e3f3eb; color: var(--c-green, #23845a); } .ins-lost { background: #f9e5e3; color: var(--c-red, #c0392b); }
.ins-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ins-search #rhQ { flex: 1 1 320px; } .ins-search select { width: 140px; }
.ins-chart { width: 100%; height: auto; display: block; }
.ins-grid { stroke: #e6eaf0; stroke-width: 1; } .ins-axis { font-size: 11px; fill: #6b7a8c; } .ins-axis-fc { font-weight: 600; fill: #34465e; }
.ins-bar-won { fill: var(--c-teal, #1b8378); } .ins-bar-fc { fill: var(--c-blue, #2c64ad); opacity: .55; }
.ins-budget { stroke: var(--c-orange, #e07a1f); stroke-width: 2.5; } .ins-now { stroke: #9aa7b6; stroke-dasharray: 3 3; }
.ins-legend { display: flex; gap: 16px; font-size: 12px; color: #5a6b80; margin-top: 4px; }
.ins-sw { display: inline-block; width: 12px; height: 10px; margin-right: 5px; vertical-align: -1px; border-radius: 2px; }
.ins-sw-won { background: var(--c-teal, #1b8378); } .ins-sw-fc { background: var(--c-blue, #2c64ad); opacity: .55; } .ins-sw-bud { background: var(--c-orange, #e07a1f); height: 3px; vertical-align: 3px; }
.ins-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ins-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.ins-settings label { display: flex; flex-direction: column; gap: 4px; }
.ins-table td.nowrap, .nowrap { white-space: nowrap; }
@media (max-width: 760px) { .ins-two { grid-template-columns: 1fr; } }
/* Forecast tracker */
.fc-table .fc-month td { background: #f3f6fa; border-top: 2px solid #dde3ea; }
.fc-date { width: 140px; }
.fc-date.fc-overdue { border-color: var(--c-red, #c0392b); color: var(--c-red, #c0392b); }
.fc-date.fc-est { color: #8a94a3; font-style: italic; }
.fc-chance { cursor: help; border-bottom: 1px dotted #9aa7b6; }
.fc-tile-warn { border-top-color: var(--c-red, #c0392b); }
.ico-folder-up { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6a1 1 0 0 1 1-1h5l2 2h9a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z'/%3E%3Cpath d='M12 16v-6M9.5 12.5L12 10l2.5 2.5'/%3E%3C/svg%3E"); }
/* Tender Inbox */
.ti-row { border: 1px solid var(--border, #dde3ea); border-left: 3px solid var(--c-blue, #2c64ad); border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; background: #fff; display: flex; flex-direction: column; gap: 3px; }
.ti-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ti-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 9px; background: #e8eef7; color: var(--c-blue, #2c64ad); }
.ti-new { background: #e3f3eb; color: var(--c-green, #23845a); } .ti-add { background: #e8eef7; color: var(--c-blue, #2c64ad); }
.ti-review { background: #fcefe2; color: #a8560f; } .ti-ignore, .ti-same { background: #eef1f5; color: #6b7a8c; }
.ti-todo { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ti-todo button { font: inherit; font-size: 11.5px; background: #fff6e6; border: 1px solid #f3d9a6; color: #8a5a10; padding: 1px 8px; border-radius: 9px; cursor: pointer; }
.ti-todo button:hover { background: #fdebc8; border-color: #e6bf72; }
.ti-todo button:focus-visible { outline: 2px solid #2c64ad; outline-offset: 1px; }
.ti-todo button.ti-done { background: #eaf6ee; border-color: #b9dfc5; color: #1f6b3a; margin-left: -2px; }
.ti-todo button.ti-done:hover { background: #d7efdf; border-color: #8fcaa3; }
.ti-job { font-weight: 600; color: #2c64ad; text-decoration: none; } .ti-job:hover { text-decoration: underline; }
.ti-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; } .ti-actions:empty { display: none; }

/* Names in list tables that open their record. */
.row-link { color: inherit; text-decoration: none; } .row-link:hover { color: #2c64ad; text-decoration: underline; } .row-link:focus-visible { outline: 2px solid #2c64ad; outline-offset: 2px; }
