/* Sagicor stakeholder UX redesign layer.
   Loaded after legacy app.css/base inline styles/portfolio.css so the redesign can
   unify the interface without rewriting operational templates. */
/* Audit patch: typography stays on the already-used Inter family; no unlicensed Google Sans assumption. */
:root {
  --font-ui: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --text-size: 14px;
  --text-small: 12px;
  --control-height: 42px;
  --touch-target: 44px;
  --sagicor-blue: #00a8e0;
  --sagicor-blue-dark: #007da8;
  --sagicor-blue-soft: #eaf8fd;
  --sagicor-green: #78be20;
  --sagicor-green-dark: #4f8f18;
  --sagicor-green-soft: #f1f8e8;
  --surface: #ffffff;
  --surface-subtle: #f7f9fb;
  --surface-quiet: #f1f5f7;
  --text: #1c2a33;
  --text-2: #52636f;
  --text-3: #5a6b76;
  --line: #e2e9ed;
  --line-strong: #d2dce2;
  --risk-red: #b5473e;
  --risk-red-soft: #fbefed;
  --risk-amber: #a56a16;
  --risk-amber-soft: #fff7e8;
  --shadow-soft: 0 1px 2px rgba(28,42,51,.04), 0 8px 24px rgba(28,42,51,.045);
  --shadow-float: 0 14px 36px rgba(28,42,51,.09);
  --radius-card: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --bg-hover: #f5f8fa;
  --text-disabled: #83929b;
  --google-blue: var(--sagicor-blue-dark);
  --google-blue-hover: #00698f;
  --google-blue-light: var(--sagicor-blue-soft);
  --google-yellow: var(--risk-amber);
  --google-yellow-light: var(--risk-amber-soft);
  --bg-surface: var(--surface);
  --text-primary: var(--text);
  --text-secondary: var(--text-2);
  --border-color: var(--line);
  --blue: var(--sagicor-blue-dark);
  --blue-dark: #00698f;
  --ink: var(--text);
  --muted: var(--text-2);
  --border: var(--line);
  --bg: #f6f8f9;
  --card: var(--surface);
  --ent-bg: #f6f8f9;
  --ent-surface: var(--surface);
  --ent-border: var(--line);
  --ent-border-light: #edf2f4;
  --ent-text-main: var(--text);
  --ent-text-muted: var(--text-2);
  --ent-text-subtle: var(--text-3);
  --ent-primary: var(--sagicor-blue-dark);
  --ent-primary-light: var(--sagicor-blue-soft);
  --ent-primary-hover: #00698f;
  --ent-radius: 12px;
  --ent-radius-sm: 9px;
  --sidebar-width: 264px;
  --topbar-height: 72px;
}

html, body { background: #f6f8f9; color: var(--text); }
body { letter-spacing: -.005em; }
a { color: var(--sagicor-blue-dark); }
a:hover { color: #00698f; text-decoration: none; }

/* Shell */
.sidebar { background: rgba(255,255,255,.98); border-right: 1px solid var(--line); }
.brand {
  min-height: 86px;
  height: auto;
  padding: 14px 20px 13px;
  gap: 12px;
  border-bottom: 1px solid #edf2f4;
}
.brand-logo {
  width: 78px;
  height: 46px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}
.brand-copy { min-width: 0; border-left: 1px solid var(--line); padding-left: 12px; }
.brand-copy strong { font-size: 13px; line-height: 1.25; font-weight: 700; color: var(--text); }
.brand-copy small { margin-top: 3px; font-size: 9px; letter-spacing: .08em; color: var(--text-3); }
.side-nav { padding: 16px 10px 20px; gap: 4px; }
.side-nav > .nav-home {
  min-height: 42px;
  margin: 0 4px 12px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-2);
}
.side-nav a { margin: 0 4px; min-height: 38px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.side-nav a:hover { background: #f4f8fa; color: var(--text); }
.side-nav a.active { background: var(--sagicor-blue-soft); color: #006f99; box-shadow: inset 3px 0 0 var(--sagicor-blue); }
.nav-category { margin: 0 0 5px; }
.nav-category-btn { padding: 8px 12px; font-size: 9.5px; letter-spacing: .11em; color: var(--text-3); border-radius: 8px; }
.nav-category-btn:hover { background: #fafcfd; color: var(--text); }
.nav-category-btn .nav-chevron { font-size: 14px; transition: transform .18s ease; }
.nav-category.collapsed .nav-chevron { transform: rotate(-90deg); }
.operations-nav { margin: 14px 4px 0; padding: 12px; border-top: 1px solid var(--line); }
.operations-nav summary { color: var(--text-3); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.sidebar-footer { padding: 16px 18px; background: #fbfcfd; }
.avatar { background: var(--sagicor-blue-soft); color: var(--sagicor-blue-dark); border-color: #d4edf7; }

.topbar {
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(10px);
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
}
.topbar .eyebrow { color: var(--text-3); letter-spacing: .1em; font-size: 9px; }
.topbar h1 { font-size: 20px; font-weight: 650; color: var(--text); }
.workspace-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px; border-radius: var(--radius-pill);
  border: 1px solid #dce6ea; background: #fff; color: var(--text-2);
  font-size: 11px; font-weight: 650;
}
.workspace-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--sagicor-green); }
.content-wrapper { max-width: 1540px; padding: 28px 34px 48px; }

/* Demo indicator */
.demo-banner {
  margin: 0 0 22px;
  padding: 9px 13px;
  border: 1px solid #d7e9d0;
  border-left: 3px solid var(--sagicor-green);
  background: #f7fbf3;
  color: #4d6d40;
  border-radius: 10px;
  font-size: 11px;
}
.demo-banner::before { background: var(--sagicor-green); }

/* Shared page hierarchy */
.portfolio-heading {
  margin: 2px 0 24px;
  align-items: center;
}
.portfolio-heading h2 { font-size: clamp(24px,2vw,32px); line-height: 1.12; color: var(--text); letter-spacing: -.035em; }
.portfolio-heading p { color: var(--text-2); font-size: 13px; line-height: 1.65; max-width: 68ch; }
.eyebrow { color: var(--sagicor-blue-dark); font-size: 9.5px; letter-spacing: .14em; }
.page-intro { max-width: 74ch; }

/* Hero cards */
.executive-hero, .profile-hero, .catalogue-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  margin: 0 0 22px;
  padding: 28px 30px;
  border: 1px solid #dfe9ed;
  border-radius: 20px;
  background: linear-gradient(120deg,#ffffff 0%,#fbfdfe 62%,#eef9fc 100%);
  box-shadow: var(--shadow-soft);
}
.executive-hero::after, .catalogue-hero::after {
  content: '';
  position: absolute;
  width: 230px; height: 230px; border-radius: 50%;
  right: -90px; top: -105px;
  border: 34px solid rgba(0,168,224,.055);
  box-shadow: 0 0 0 34px rgba(120,190,32,.035);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; max-width: 760px; }
.hero-kicker { display:inline-flex; align-items:center; gap:8px; color:var(--sagicor-blue-dark); font-size:10px; font-weight:750; text-transform:uppercase; letter-spacing:.13em; }
.hero-kicker::before { content:''; width:22px; height:3px; border-radius:4px; background:linear-gradient(90deg,var(--sagicor-blue),var(--sagicor-green)); }
.executive-hero h2, .catalogue-hero h2, .profile-hero h2 { margin: 9px 0 9px; font-size: clamp(26px,2.5vw,38px); letter-spacing: -.04em; line-height:1.08; }
.executive-hero p, .catalogue-hero p, .profile-hero p { margin:0; color:var(--text-2); line-height:1.65; font-size:13px; }
.hero-meta { position:relative; z-index:1; display:grid; grid-template-columns:repeat(2,minmax(100px,1fr)); gap:10px; align-self:center; min-width:290px; }
.hero-meta .hero-stat { background:rgba(255,255,255,.86); border:1px solid #e0eaee; border-radius:12px; padding:14px; }
.hero-meta span { display:block; color:var(--text-3); font-size:9px; text-transform:uppercase; letter-spacing:.08em; }
.hero-meta strong { display:block; margin-top:5px; font-size:20px; letter-spacing:-.03em; }

/* Cards and panels */
.panel, .md-card, .card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.panel { padding: 22px 24px; }
.panel h3 { font-size: 14px; font-weight: 700; color: var(--text); }
.panel-subtitle { color: var(--text-2); font-size: 11.5px; line-height: 1.6; }
.panel-header { border-bottom: 0; padding-bottom: 0; }
.panel-header > div > .panel-subtitle { margin: 6px 0 0; }
.section-label { margin: 28px 0 12px; color:var(--text-3); font-size:10px; font-weight:750; letter-spacing:.1em; text-transform:uppercase; }

/* Buttons */
.btn, button, input[type="submit"] { border-radius: 10px; min-height: 38px; padding: 9px 14px; font-size: 12px; font-weight: 650; box-shadow: none; }
.btn-primary, .btn.primary, button.primary, input[type="submit"].primary { background: var(--sagicor-blue-dark); border-color: var(--sagicor-blue-dark); color:#fff; }
.btn-primary:hover, .btn.primary:hover { background:#00698f; border-color:#00698f; color:#fff; }
.btn-secondary { background:#fff; color:var(--text); border:1px solid var(--line-strong); }
.btn-secondary:hover { background:#f8fbfc; border-color:#bfcdd4; }
.btn-soft { background:var(--sagicor-blue-soft); color:var(--sagicor-blue-dark); border:1px solid #d6eef7; }

/* KPI hierarchy: primary cards are larger and fewer; supporting metrics are compact. */
.kpi-grid { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; margin: 0 0 22px; }
.kpi {
  position:relative;
  gap: 9px;
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 17px;
  box-shadow: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.kpi:hover { transform:translateY(-1px); border-color:#bfd7e1; box-shadow:var(--shadow-soft); }
.kpi::before { content:''; width:28px; height:3px; border-radius:4px; background:#dbe8ed; }
.kpi:nth-child(1)::before, .kpi:nth-child(2)::before { background:var(--sagicor-blue); }
.kpi:nth-child(5)::before, .kpi:nth-child(6)::before { background:var(--sagicor-green); }
.kpi strong { font-size: 28px; font-weight: 650; color:var(--text); }
.kpi span { font-size: 10px; letter-spacing:.02em; text-transform:none; font-weight:650; color:var(--text-2); }
.kpi small { margin-top:auto; color:var(--sagicor-blue-dark); font-size:9.5px; }
.metric-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; margin:-4px 0 24px; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:var(--line); }
.metric-strip-item { background:#fff; padding:13px 15px; display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.metric-strip-item span { color:var(--text-2); font-size:10px; }
.metric-strip-item strong { color:var(--text); font-size:16px; }

/* Tables */
.table-scroll, .table-wrap, .table-responsive { border:1px solid #e8eef1; border-radius:12px; background:#fff; }
.portfolio-table, .md-table { font-size:11.5px; }
.portfolio-table th, .md-table th { background:#f8fafb; color:#6c7b84; font-size:9px; letter-spacing:.07em; text-transform:uppercase; padding:11px 12px; border-bottom:1px solid #e4eaee; }
.portfolio-table td, .md-table td { padding:12px; color:#31424c; border-bottom:1px solid #edf1f3; }
.portfolio-table tbody tr:hover, .md-table tbody tr:hover td { background:#fbfdfe; }
.table-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 12px; }
.table-count { color:var(--text-2); font-size:11px; }

/* Status */
.pill, .status-pill { border-radius:var(--radius-pill); padding:4px 9px; font-size:9.5px; font-weight:700; }
.pill.risk-high, .status-pill.danger { background:var(--risk-red-soft); color:#9e3d36; }
.pill.risk-medium, .status-pill.open { background:var(--risk-amber-soft); color:#8d5d13; }
.pill.good { background:var(--sagicor-green-soft); color:#4c7d23; }

/* Charts */
.chart-bars { gap: 12px; }
.bar-row { grid-template-columns: 92px 1fr 46px; }
.bar-track { height:9px; background:#edf2f4; border-radius:99px; }
.bar-fill { border-radius:99px; background:linear-gradient(90deg,#4db8dc,var(--sagicor-blue-dark)); }
.bar-fill.stage-3 { background:#d9a43b; }
.bar-fill.stage-4 { background:#ba5b54; }
.trend-chart { min-height:170px; height:170px; gap:9px; }
.trend-column .bar { width:48%; background:linear-gradient(180deg,#63c4e4,#1a88b0); }
.trend-column:hover .bar { background:linear-gradient(180deg,#54b8d9,#006f99); }

/* Insights */
.insight-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.insight-card { position:relative; min-height:96px; padding:16px 16px 16px 43px; border:1px solid var(--line); border-radius:12px; background:#fcfdfe; color:#40515b; font-size:12px; line-height:1.6; }
.insight-card .finding-index { position:absolute; left:14px; top:16px; width:20px; height:20px; border-radius:50%; background:var(--sagicor-blue-soft); color:var(--sagicor-blue-dark); display:grid; place-items:center; font-size:9px; }
.finding { color:#40515b; }

/* Report catalogue */
.report-group { margin:0 0 28px; }
.report-group-header { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin:0 0 11px; }
.report-group-header h3 { margin:0; font-size:14px; }
.report-group-header p { margin:3px 0 0; color:var(--text-2); font-size:11px; }
.report-catalogue { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.report-card { min-height:156px; padding:18px; border-radius:14px; box-shadow:none; }
.report-card:hover { border-color:#b8d5e0; box-shadow:var(--shadow-soft); transform:translateY(-1px); }
.report-card small { color:var(--text-3); font-size:8.5px; letter-spacing:.08em; text-transform:uppercase; }
.report-card h3 { font-size:14px; margin:15px 0 7px; }
.report-card p { font-size:11px; line-height:1.6; }
.report-card .open { color:var(--sagicor-blue-dark); font-weight:650; }

/* Filters */
.report-filter { border-radius:14px; box-shadow:none; background:#fff; padding:16px 18px; }
.filter-grid { gap:12px; }
.report-filter label { color:var(--text-2); font-size:9.5px; font-weight:650; }
.report-filter input,.report-filter select,.form-control { min-height:38px; border:1px solid var(--line-strong); border-radius:9px; background:#fff; color:var(--text); }
.report-filter input:focus,.report-filter select:focus,.form-control:focus { outline:0; border-color:#73cbe8; box-shadow:0 0 0 3px rgba(0,168,224,.1); }
.report-filter details { border-top:1px solid #edf1f3; padding-top:9px; }
.report-filter summary { color:var(--sagicor-blue-dark); font-weight:650; }

/* Methodology is important but should not dominate stakeholder pages. */
.method-note { background:#f7f9fa; color:var(--text-2); border:1px solid #e7edef; font-size:10.5px; line-height:1.6; }
.report-methodology { margin:14px 0 20px; border:1px solid var(--line); background:#fbfcfd; border-radius:11px; padding:10px 13px; color:var(--text-2); font-size:10.5px; }
.report-methodology summary { cursor:pointer; color:var(--text-2); font-weight:650; }
.report-methodology .method-note { border:0; background:transparent; margin:8px 0 0; padding:4px 0; }

/* Profiles */
.profile-hero { padding:25px 28px; }
.profile-hero .portfolio-heading { margin:0; width:100%; }
.profile-primary-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:18px 0 0; }
.profile-primary-metrics > div { padding:13px 14px; border:1px solid var(--line); border-radius:11px; background:#fff; }
.profile-primary-metrics small { display:block; color:var(--text-3); font-size:8.5px; text-transform:uppercase; letter-spacing:.06em; }
.profile-primary-metrics strong { display:block; margin-top:5px; font-size:14px; }
.profile-nav { position:sticky; top:82px; z-index:20; padding:8px; background:rgba(246,248,249,.95); backdrop-filter:blur(7px); border:1px solid var(--line); border-radius:12px; }
.profile-nav a { border:0; background:transparent; color:var(--text-2); font-size:10.5px; font-weight:650; }
.profile-nav a:hover { background:#fff; color:var(--sagicor-blue-dark); }
.profile-facts { gap:10px; }
.profile-facts > div { padding:13px 14px; background:#f8fafb; border-radius:10px; }
.profile-facts small { font-size:8.5px; color:var(--text-3); }
.profile-facts strong { font-size:12px; }

/* Underwriter */
.review-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.review-summary-card { padding:18px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.review-summary-card span { display:block; color:var(--text-2); font-size:10px; }
.review-summary-card strong { display:block; margin-top:7px; font-size:25px; letter-spacing:-.03em; }
.review-actions-form { display:grid; grid-template-columns:140px 120px minmax(150px,1fr) auto; gap:7px; min-width:520px; }

/* Login */
.auth-page-redesign { min-height:100vh; margin:0; display:grid; place-items:center; padding:24px; background:radial-gradient(circle at 12% 12%,rgba(0,168,224,.08),transparent 30%),radial-gradient(circle at 88% 80%,rgba(120,190,32,.07),transparent 32%),#f5f8f9; }
.auth-shell { width:min(920px,100%); display:grid; grid-template-columns:1.05fr .95fr; overflow:hidden; border:1px solid #dfe7eb; border-radius:24px; background:#fff; box-shadow:0 24px 64px rgba(27,52,67,.12); }
.auth-brand-panel { position:relative; padding:48px; background:linear-gradient(155deg,#f9fdff 0%,#eef9fd 58%,#f4faee 100%); overflow:hidden; }
.auth-brand-panel::after { content:''; position:absolute; width:300px;height:300px;border-radius:50%;border:46px solid rgba(0,168,224,.07);right:-140px;bottom:-150px;box-shadow:0 0 0 45px rgba(120,190,32,.045); }
.auth-logo { width:155px; height:auto; object-fit:contain; position:relative; z-index:1; }
.auth-brand-panel h1 { margin:50px 0 12px; font-size:34px; line-height:1.08; letter-spacing:-.04em; color:var(--text); position:relative; z-index:1; }
.auth-brand-panel p { max-width:36ch; margin:0; font-size:13px; line-height:1.7; color:var(--text-2); position:relative; z-index:1; }
.auth-brand-line { margin-top:28px; display:inline-flex; align-items:center; gap:8px; font-size:10px; text-transform:uppercase; letter-spacing:.1em; font-weight:700; color:var(--sagicor-blue-dark); position:relative; z-index:1; }
.auth-brand-line::before { content:''; width:24px;height:3px;border-radius:4px;background:linear-gradient(90deg,var(--sagicor-blue),var(--sagicor-green)); }
.auth-form-panel { padding:52px 48px; align-self:center; }
.auth-form-panel h2 { margin:0 0 6px; font-size:23px; letter-spacing:-.025em; }
.auth-form-panel > p { margin:0 0 28px; color:var(--text-2); font-size:12px; }
.auth-form-panel .stacked-form { gap:16px; }
.auth-form-panel label { font-size:10px; font-weight:700; color:var(--text-2); }
.auth-form-panel input { min-height:44px; border:1px solid var(--line-strong); border-radius:10px; padding:10px 12px; font:inherit; }
.auth-form-panel input:focus { outline:0; border-color:#6fc9e7; box-shadow:0 0 0 3px rgba(0,168,224,.11); }
.auth-form-panel .btn-primary { width:100%; min-height:44px; margin-top:4px; background:var(--sagicor-blue-dark); border-radius:10px; }
.auth-footnote { margin-top:24px; padding-top:18px; border-top:1px solid var(--line); color:var(--text-3); font-size:10px; line-height:1.6; }

@media(max-width:1280px){
  .kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .metric-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .report-catalogue{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero-meta{min-width:240px}
}
@media(max-width:900px){
  .content-wrapper{padding:22px 20px 40px}
  .executive-hero,.catalogue-hero,.profile-hero{flex-direction:column;padding:22px}
  .hero-meta{min-width:0;width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}
  .insight-list{grid-template-columns:1fr}
  .profile-primary-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .auth-shell{grid-template-columns:1fr;max-width:520px}
  .auth-brand-panel{padding:30px 34px}.auth-brand-panel h1{margin:28px 0 10px;font-size:27px}.auth-form-panel{padding:34px}
}
@media(max-width:760px){
  .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .metric-strip{grid-template-columns:1fr}
  .report-catalogue{grid-template-columns:1fr}
  .review-summary{grid-template-columns:1fr}
  .profile-primary-metrics{grid-template-columns:1fr 1fr}
  .topbar{padding:0 18px}
  .workspace-chip{display:none}
}
@media(max-width:520px){
  .kpi-grid{grid-template-columns:1fr 1fr}
  .profile-primary-metrics{grid-template-columns:1fr}
  .auth-page-redesign{padding:12px}.auth-brand-panel,.auth-form-panel{padding:26px}.auth-logo{width:130px}
}

/* Local visual QA: keep profile sections readable and report cards full-width. */
.profile-hero { display: block; }
.profile-hero .profile-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-hero .profile-primary-metrics > div,
.profile-hero .profile-facts > div { min-width: 0; overflow-wrap: anywhere; }
.kpi-grid-report { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.auth-logo { display: block; }
@media(max-width:900px){
  .profile-hero .profile-facts,
  .kpi-grid-report { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(max-width:520px){
  .profile-hero .profile-facts { grid-template-columns: 1fr; }
}

/* Keep the expanded business navigation usable without consuming the tablet viewport. */
@media(max-width:900px){
  .sidebar .side-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; padding:8px 12px; }
  .side-nav > .nav-home { grid-column:1 / -1; margin-bottom:4px; }
  .sidebar .nav-category-content { padding:4px; gap:4px; }
  .sidebar .side-nav a { white-space:normal; min-height:32px; padding:6px 9px; }
  .sidebar .operations-nav { margin:0; padding:8px 12px; }
  .review-case .review-actions-form { min-width:0; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .review-case .review-actions-form > * { min-width:0; }
}
@media(max-width:520px){
  .review-case .review-actions-form { grid-template-columns:1fr; }
}
/* Vehicle-centred investigation: summary first, evidence by intent. */
.workspace-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:18px 0;padding:10px;background:#fff;border:1px solid #dce4e9;border-radius:12px}
.workspace-tabs a{padding:10px 12px;border-radius:8px;color:#375768;font-size:13px;text-decoration:none}
.workspace-tabs a[aria-selected=true]{background:#e8f2f5;color:#16465a;font-weight:700}
.workspace-tabs a:focus-visible,.incident-marker:focus-visible{outline:3px solid #006d8b;outline-offset:3px}
.workspace-panel[hidden],.review-form [hidden]{display:none!important}
.workspace-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:18px 0 24px}
.workspace-facts dt{font-size:12px;color:#617480}.workspace-facts dd{margin:6px 0;font-weight:600;overflow-wrap:anywhere}
.cell-secondary{display:block;color:#647581;font-size:11px;margin-top:5px;white-space:normal}
.attention-reasons{padding-left:20px;line-height:1.9}.download-actions{font-size:12px;line-height:1.8;overflow-wrap:anywhere}.evidence-downloads{display:flex;flex-direction:column;gap:16px}
.review-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:24px 0}.review-form label,.incident-filters label{display:grid;gap:7px;min-width:0;font-size:13px;font-weight:600}.review-form .form-control{width:100%;min-width:0;box-sizing:border-box}.review-form textarea{resize:vertical}.form-wide{grid-column:1/-1}.review-error{padding:14px;background:#fff2ee;border-left:4px solid #b44739}
.communication-item{padding:16px 0;border-bottom:1px solid #e4eaee}.communication-item summary{cursor:pointer;display:flex;flex-wrap:wrap;align-items:center;gap:12px}.communication-item summary small{flex-basis:100%;color:#637583}.message-content{white-space:pre-wrap}.audit-json{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
.incident-filters{display:flex;flex-wrap:wrap;gap:16px;align-items:end;margin:18px 0}.incident-filters label{flex:1 1 180px}.incident-filters select{width:100%;min-width:0}.incident-counts{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.incident-map-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(230px,1fr);gap:20px}#incident-map{width:100%;height:auto;max-height:500px;border:1px solid #dce4e9;border-radius:10px}.incident-marker{cursor:pointer}.incident-popup{max-height:500px;overflow:auto;padding:16px;background:#f7f9fa;border-radius:10px}.map-event{border-top:1px solid #dce4e9;padding:14px 0}.map-event p{font-size:12px;margin:6px 0}.portfolio-table td:first-child,.portfolio-table th:first-child{position:sticky;left:0;background:#fff;z-index:1}
@media(max-width:1100px){.workspace-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.incident-map-layout{grid-template-columns:1fr}.incident-popup{max-height:330px}.review-form{gap:14px}}
@media(max-width:800px){.review-form{grid-template-columns:1fr}.workspace-tabs a{flex:1 1 130px;text-align:center}.workspace-panel.panel{padding:18px}.portfolio-actions{flex-wrap:wrap}.workspace-facts{gap:14px}}
.table-top-scroll{overflow-x:auto;overflow-y:hidden;height:18px;max-width:100%;margin:8px 0}.table-top-scroll>div{height:1px}.table-top-scroll[hidden]{display:none}


/* November predeployment UI review — targeted normalization; no business logic. */
html, body, input, select, textarea, button { font-family: var(--font-ui); }
body { font-size: var(--text-size); line-height: 1.5; }
.topbar .eyebrow, .eyebrow { color:var(--text-2); font-size:11px; }
.nav-category-btn { color:var(--text-2); font-size:11px; min-height:36px; }
.brand-copy small { font-size:11px; color:var(--text-2); }
.demo-banner { font-size:12px; }
.auth-form-panel label { font-size:12px; }
.auth-form-panel>p, .auth-footnote { font-size:12px; }
.portfolio-table, .md-table, .data-table { font-size:12.5px; }
.portfolio-table th, .md-table th, .data-table th { font-size:11px; color:var(--text-2); }
.portfolio-table td, .md-table td, .data-table td { font-size:12.5px; }
.report-filter label, .form-group label, .metric-label, .kpi-label { font-size:12px; }
.table-wrap, .table-responsive, .table-scroll { max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.md-card, .card, .panel, .kpi-card, .portfolio-grid>*, .kpi-grid>* { min-width:0; }
input:not([type=checkbox]):not([type=radio]), select, textarea { max-width:100%; min-width:0; }
:where(a,button,input,select,textarea,summary):focus-visible { outline:3px solid var(--sagicor-blue-dark); outline-offset:3px; }
.skip-link { position:fixed; top:-100px; left:12px; z-index:1000; border-radius:8px; padding:10px 14px; background:#fff; box-shadow:var(--shadow-float); color:var(--sagicor-blue-dark); }
.skip-link:focus { top:12px; }
.mobile-nav-toggle { display:none; }
/* Retire the 350px minimum nested grid that hides installation controls at narrow widths. */
.installation-page-heading { display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:0 0 20px; }
.installation-heading { font-size:clamp(22px,2.2vw,28px);font-weight:700;line-height:1.2;margin:0 0 6px;letter-spacing:-.02em; }
.installation-intro { font-size:13px;line-height:1.6;color:var(--text-2);margin:0;max-width:64ch; }
.installation-job-form { min-width:0; }
.installation-layout { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:20px;margin-bottom:20px; }
.installation-layout > *,.installation-details-grid > * { min-width:0; }
.installation-card { min-width:0; }
.installation-details-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px; }
.installation-field { display:flex;flex-direction:column;gap:6px;min-width:0;margin-bottom:14px; }
.installation-label { font-size:12px;font-weight:650;color:var(--text-2);line-height:1.45; }
.installation-field .form-control { display:block;width:100%;min-width:0;max-width:100%;min-height:42px;box-sizing:border-box;padding:10px 12px;border:1px solid var(--line-strong);border-radius:9px;background:#fff;color:var(--text);font:inherit; }
.installation-field textarea.form-control { min-height:96px;resize:vertical; }
.installation-field .form-control:focus-visible { outline:3px solid rgba(0,125,168,.38);outline-offset:1px; }
.installation-actions { display:flex;justify-content:flex-end;flex-wrap:wrap;align-items:center;gap:12px;padding:8px 0 0; }
.installation-actions .btn { min-width:142px; }
@media(max-width:1100px){.installation-layout{grid-template-columns:1fr}}
@media(max-width:600px){.installation-details-grid{grid-template-columns:1fr}.installation-actions{flex-direction:column}.installation-actions .btn{width:100%;min-width:0}.installation-page-heading>.btn{width:auto;min-height:42px}}
/* Keep page headers and admin actions inside the available viewport rather than concealing overflow. */
@media(max-width:600px){
  .content-wrapper { padding:18px 14px 36px; }
  .main-content { width:100%; max-width:100%; min-width:0; }
  .page-header .form-actions, .page-header-actions .form-actions { max-width:100%; width:100%; flex-wrap:wrap; }
  .page-header .form-actions>form { flex:1 1 100%;max-width:100%;min-width:0; }
  .page-header .form-actions button { width:100%; }
  .topbar { display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;min-height:60px; }
  .topbar .topbar-titles { flex:1 1 auto;min-width:0;text-align:left; }
  .topbar .topbar-actions { width:auto; max-width:fit-content; flex:0 0 auto; }
  .notification-bell, .notification-bell>summary { width:auto; }
  .notification-bell .notification-count { display:inline-flex!important; }
  .topbar h1 { font-size:17px; }
  .topbar .eyebrow { font-size:10px; }
  .profile-hero, .report-catalogue, .portfolio-grid, .grid-2 { max-width:100%;min-width:0; }
}
/* Mobile navigation is collapsed by default and accessible via a single button. */
@media(max-width:900px){
  .app-shell { display:flex;flex-direction:column; }
  .sidebar { position:relative;display:flex;flex-direction:column;width:100%;max-width:100%;height:auto;min-height:0;flex-basis:auto;gap:0;border-right:0;border-bottom:1px solid var(--line); }
  .sidebar .brand { min-height:70px;height:70px;padding:12px 16px;padding-right:115px;margin:0; }
  .sidebar .brand-logo { width:66px;height:42px; }
  .sidebar .brand-copy strong { font-size:13px; }
  .mobile-nav-toggle { position:absolute;top:14px;right:14px;display:inline-flex!important;align-items:center;justify-content:center;gap:7px;width:auto!important;min-height:42px;padding:7px 13px;border:1px solid var(--line-strong);border-radius:10px;background:#fff;color:var(--text);font:600 13px var(--font-ui);cursor:pointer;z-index:102; }
  .sidebar .side-nav { display:none!important;grid-template-columns:none;flex-direction:column;flex-wrap:nowrap;align-items:stretch;flex:0 1 auto;min-width:0;max-height:min(72vh,580px);overflow-y:auto;overflow-x:hidden;padding:10px 12px 16px;box-sizing:border-box; }
  .sidebar .side-nav.is-mobile-open { display:flex!important; }
  .sidebar .side-nav>* { flex-shrink:0;min-width:0;max-width:100%; }
  .sidebar.is-navigation-open .brand { height:auto;min-height:78px; }
  .sidebar .side-nav .nav-home { grid-column:auto;margin:0 0 7px;min-height:44px; }
  .sidebar .side-nav>a { display:flex;min-height:44px;margin:2px 0;font-size:13px; }
  .sidebar .nav-category { margin:4px 0; }
  .sidebar .nav-category-btn { min-height:44px;width:100%;padding:10px 12px;font-size:12px;letter-spacing:.05em; }
  .sidebar .nav-category-content { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px; }
  .sidebar .nav-category.collapsed .nav-category-content { display:none; }
  .sidebar .nav-category-content a { min-height:44px;margin:0;padding:10px 12px;font-size:13px;white-space:normal; }
  .sidebar .operations-nav { margin:6px 0;padding:12px; }
  .sidebar .operations-nav summary { min-height:38px;font-size:12px; }
  .sidebar-footer { display:none; }
  .topbar { position:relative;min-height:64px;height:auto; }
}
@media(max-width:520px){
  .sidebar .nav-category-content { grid-template-columns:1fr; }
  .sidebar .side-nav.is-mobile-open { max-height:min(74vh,520px); }
  .sidebar .brand-copy small { font-size:10px; }
}

.mobile-account-nav { display:none; }
@media(max-width:900px){
  .mobile-account-nav { display:flex;flex-direction:column;gap:8px;padding:14px 8px 4px;border-top:1px solid var(--line);color:var(--text-2);font-size:12px;overflow-wrap:anywhere; }
  .sidebar .mobile-account-nav a { min-height:44px;margin:0;padding:10px 12px;display:flex;align-items:center;font-weight:600;color:var(--sagicor-blue-dark); }
}

/* Actual-application QA: contain the open bell and long program KPI labels. */
.kpi-card .metric-note, .kpi-card .kpi-label { overflow-wrap:anywhere; }
@media(max-width:900px){
  .topbar .notification-bell { position:static; }
  .topbar .notification-panel { left:14px;right:14px;transform:none;width:auto;max-width:none;box-sizing:border-box;overflow-wrap:anywhere; }
}
@media(max-width:600px){
  .search-bar select.form-control { min-width:0; }
}
