:root {
  --nv: #14233f;
  --nv2: #1a2e50;
  --or: #e8531e;
  --sky: #6bb7e0;
  --ink: #1c2430;
  --mu: #6b7785;
  --li: #e3e8ee;
  --bg: #eef1f5;
  --cd: #ffffff;
  --ok: #0f9d58;
  --wb: #fdf3e0;
  --wc: #c9820a;
  --bb: #fdeaea;
  --bc: #d23b3b;
  --sh: 0 1px 3px rgba(20, 35, 63, .06), 0 6px 20px rgba(20, 35, 63, .08);
  --r: 11px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 13.5px; line-height: 1.5; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 13px; }
input[type=number]::-webkit-inner-spin-button { opacity: .5; }

/* ─── TOPBAR & NAVIGATION ─── */
.topbar {
  background: var(--nv);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 14px rgba(0,0,0,.2);
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar .brand-title {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}
.topbar .brand-title span {
  color: var(--sky);
  font-weight: 400;
  font-size: 13px;
}

.nav-tabs {
  display: flex;
  gap: 6px;
  margin-left: 24px;
}
.nav-tab {
  background: transparent;
  color: rgba(255,255,255,.75);
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  transition: .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-tab:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.nav-tab.active {
  background: rgba(255,255,255,.18);
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--or);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.role-badge {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.role-admin { background: #e8daff; color: #5e2ca5; }
.role-manager { background: #e2f0fd; color: #1060b2; }
.role-user { background: #e6f6ec; color: #0d703d; }

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 500;
  font-size: 13px;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--nv);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ─── BUTTONS ─── */
.btn {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: .15s;
  white-space: nowrap;
}
.btn-p { background: var(--or); color: #fff; }
.btn-p:hover { background: #cf4515; }
.btn-s { background: rgba(255,255,255,.13); color: #fff; }
.btn-s:hover { background: rgba(255,255,255,.23); }
.btn-g { background: #fff; color: var(--nv); border: 1px solid var(--li); }
.btn-g:hover { border-color: var(--or); color: var(--or); }
.btn-sm { padding: 5px 11px; font-size: 11.5px; border-radius: 6px; }
.btn-d { background: var(--bb); color: var(--bc); border: none; }
.btn-d:hover { background: #f8d0d0; }
.btn-ok { background: #e8f6ee; color: #0b6b3c; border: none; }
.btn-ok:hover { background: #d4edd9; }

/* ─── MAIN CONTAINER & VIEWS ─── */
.app-container {
  min-height: calc(100vh - 53px);
}
.view-section {
  display: none;
}
.view-section.active {
  display: block;
}

/* ─── DASHBOARD / LANDING PAGE ─── */
.dash-header {
  background: #fff;
  padding: 20px 32px;
  border-bottom: 1px solid var(--li);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-title h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--nv);
}
.dash-title p {
  color: var(--mu);
  font-size: 13px;
  margin-top: 2px;
}
.dash-content {
  padding: 24px 32px;
  max-width: 1600px;
  margin: 0 auto;
  box-sizing: border-box;
}

.filters-bar {
  background: #fff;
  padding: 14px 18px;
  border-radius: var(--r);
  border: 1px solid var(--li);
  box-shadow: var(--sh);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.search-input {
  position: relative;
  flex: 1;
  max-width: 420px;
}
.search-input input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--li);
  border-radius: 7px;
}
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mu);
}

.status-pills {
  display: flex;
  gap: 8px;
}
.pill-filter {
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--li);
  cursor: pointer;
  transition: .15s;
}
.pill-filter.active {
  background: var(--nv);
  color: #fff;
  border-color: var(--nv);
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--li);
  border-radius: 7px;
  background: #fff;
  color: var(--nv);
  font-size: 12.5px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.filter-select:hover {
  border-color: #cbd5e1;
}
.filter-select:focus {
  border-color: var(--p);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

/* Data Table */
.table-card {
  background: #fff;
  border-radius: var(--r);
  border: 1px solid var(--li);
  box-shadow: var(--sh);
  overflow-x: auto;
  width: 100%;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.data-table th {
  background: #f8f9fc;
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--mu);
  border-bottom: 1px solid var(--li);
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f4f8;
  font-size: 13px;
  vertical-align: middle;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tr:hover {
  background: #fbfcfd;
}

.badge-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}
.status-draft { background: #f0f3f7; color: var(--nv); }
.status-sent { background: #e3f2fd; color: #0d47a1; }
.status-accepted { background: #e8f5e9; color: #1b5e20; }
.status-rejected { background: #ffebee; color: #c62828; }

.ver-badge {
  background: var(--wb);
  color: var(--wc);
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

/* ─── EDITOR LAYOUT ─── */
.editor-wrap {
  display: grid;
  grid-template-columns: 40% 60%;
  height: calc(100vh - 53px);
}
.builder {
  overflow-y: auto;
  padding: 16px;
  background: #f0f3f7;
  border-right: 1px solid var(--li);
}
.preview {
  overflow-y: auto;
  background: #d5dae2;
  padding: 20px 24px;
}

.editor-actions-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  align-items: center;
}

.preview-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 820px;
  margin: 0 auto 12px auto;
  gap: 12px;
  flex-wrap: wrap;
}
.preview-export-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sec {
  background: var(--cd);
  border: 1px solid var(--li);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--sh);
}
.sh {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--or);
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sn {
  background: var(--nv);
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  margin-right: 7px;
}

.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.f { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.f:last-child { margin-bottom: 0; }
.f label { font-size: 11px; font-weight: 600; color: var(--mu); text-transform: uppercase; letter-spacing: .04em; }
.f input, .f select, .f textarea {
  padding: 8px 10px; border: 1px solid var(--li); border-radius: 7px; background: #fff; color: var(--ink); width: 100%;
}
.f input:focus, .f select:focus, .f textarea:focus {
  outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(107,183,224,.16);
}

/* Product Search Dropdown */
.srchwrap { position: relative; margin-bottom: 9px; }
.sdrop {
  position: absolute; top: calc(100% + 3px); left: 0; right: 0; background: #fff;
  border: 1px solid var(--li); border-radius: 9px; box-shadow: 0 10px 32px rgba(20,35,63,.14);
  z-index: 60; max-height: 280px; overflow-y: auto; display: none;
}
.sdrop.open { display: block; }
.sdgrp {
  padding: 5px 10px 2px; font-size: 10px; font-weight: 700; text-transform: uppercase;
  color: var(--mu); background: #f8f9fb; border-bottom: 1px solid var(--li); position: sticky; top: 0;
}
.sdi { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f3f4f6; }
.sdi:hover, .sdi.sel { background: #eef5fd; }
.sdi .sn2 { font-weight: 600; font-size: 13px; color: var(--ink); }
.sdi .sm2 { font-size: 11px; color: var(--mu); }

/* Line Item Cards */
.lc { border: 1px solid var(--li); border-radius: 10px; margin-bottom: 8px; background: #fff; overflow: hidden; }
.lc.fl-msp { border-color: #d23b3b; box-shadow: 0 0 0 2px rgba(210,59,59,.1); }
.lc.fl-loss { border-color: #a32424; box-shadow: 0 0 0 2px rgba(163,36,36,.13); }
.lc.fl-thin { border-color: #c9820a; box-shadow: 0 0 0 2px rgba(201,130,10,.1); }
.lch { display: flex; align-items: flex-start; justify-content: space-between; padding: 9px 11px 8px; background: #fafbfc; border-bottom: 1px solid var(--li); gap: 8px; }
.lcb { padding: 9px 11px; }

/* Document Preview Sheet */
.pvlbl { font-size: 11.5px; color: var(--mu); margin-bottom: 0; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.dwrap { max-width: 820px; margin: 0 auto; }
.doc { background: #fff; padding: 20px 38px; border-radius: 4px; box-shadow: 0 4px 24px rgba(0,0,0,.15); color: #222; font-family: 'Inter', sans-serif; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.doc th, .doc td { padding: 8px 10px; border-bottom: 1px solid #e2e8f0; font-size: 12.5px; }

/* ─── MODALS & DRAWERS ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(14,26,47,.65); backdrop-filter: blur(4px);
  z-index: 99999; display: none; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.active { display: flex !important; opacity: 1 !important; pointer-events: auto !important; }
.modal-box {
  background: #fff; width: 100%; max-width: 520px; border-radius: 14px; box-shadow: 0 20px 48px rgba(0,0,0,.25); padding: 28px;
}

/* ACL Grid Table */
.acl-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.acl-table th { background: #f4f6f9; padding: 10px; font-size: 11px; text-transform: uppercase; color: var(--mu); border-bottom: 1px solid var(--li); }
.acl-table td { padding: 12px 10px; border-bottom: 1px solid #eee; text-align: center; }
.acl-table td:first-child { text-align: left; font-weight: 600; }

/* ─── STANDALONE ISOLATED LOGIN PAGE ─── */
.login-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  background: linear-gradient(135deg, #0b1526 0%, #152744 50%, #080e1a 100%);
  z-index: 999999;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
.login-card {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.55);
  padding: 40px 32px;
  text-align: center;
  box-sizing: border-box;
}
.login-brand {
  margin-bottom: 28px;
}
.login-logo {
  max-width: 220px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto 16px auto;
  display: block;
}
.login-brand h2 {
  font-size: 20px;
  font-weight: 800;
  color: #14233f;
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}
.login-sub {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  font-weight: 500;
}
.login-error-banner {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  font-size: 13px;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 24px;
  text-align: left;
  line-height: 1.45;
  font-weight: 500;
}
.login-google-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 14.5px;
  font-weight: 600;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.login-google-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

/* ─── TOP MIDDLE FLASH NOTIFICATION TOAST ─── */
.toast-notification {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 9999999;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  background: #1e293b;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.toast-notification.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.toast-notification.toast-success {
  background: #065f46;
  border: 1px solid #10b981;
  color: #ecfdf5;
}
.toast-notification.toast-error {
  background: #991b1b;
  border: 1px solid #f87171;
  color: #fef2f2;
}
.toast-notification.toast-info {
  background: #1e3a8a;
  border: 1px solid #60a5fa;
  color: #eff6ff;
}

/* ─── SETTINGS & INTEGRATIONS VIEW ─── */
.settings-card {
  background: #ffffff;
  border: 1px solid var(--li);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 24px 28px;
  margin-bottom: 24px;
}
.settings-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--li);
  flex-wrap: wrap;
  gap: 12px;
}
.settings-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--nv);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.settings-card-desc {
  font-size: 13px;
  color: var(--mu);
  margin-top: 4px;
  margin-bottom: 0;
}
.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.integration-card {
  border: 1px solid var(--li);
  border-radius: 10px;
  padding: 18px 20px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100px;
}

/* ─── BUILDER SECTIONS 5-8, MARGINS & OVERRIDES ─── */
.msum {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.msc {
  background: #f6f8fb;
  border: 1px solid var(--li);
  border-radius: 8px;
  padding: 10px 11px;
}
.msc .ml {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--mu);
}
.msc .mv {
  font-size: 16px;
  font-weight: 800;
  color: var(--nv);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.msc .ms {
  font-size: 11px;
  color: var(--mu);
  margin-top: 1px;
}

.ovd {
  background: #f8f9fb;
  border: 1px solid var(--li);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  color: #334155;
}
.ovd.mod {
  border-color: var(--or);
  background: #fffaf7;
}
.ovbdg {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: #fff0e6;
  color: #b85a00;
  margin-left: 6px;
  vertical-align: middle;
}
.bk-g {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.bk-g .f {
  margin-bottom: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}
.chip {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid var(--li);
  background: #fff;
  color: var(--mu);
  cursor: pointer;
  transition: .12s;
  user-select: none;
}
.chip:hover {
  border-color: var(--nv);
  color: var(--nv);
}
.chip.on {
  background: var(--nv);
  border-color: var(--nv);
  color: #fff;
}
.chipnote {
  font-size: 10.5px;
  color: var(--mu);
  align-self: center;
  margin-left: 2px;
  font-style: italic;
}

.bandpill {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 9px;
  background: #f1f4f7;
  color: #5a6672;
  margin-left: 5px;
}
.bandpill.tight {
  background: #fdf1e6;
  color: #a8541b;
}
.tierpill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 1px 6px;
  border-radius: 9px;
  background: #ede8fb;
  color: #5b3fa8;
}

/* ─── LINE CARDS (V9 MATCH) ─── */
.lc { border: 1px solid var(--li); border-radius: 10px; margin-bottom: 8px; background: #fff; overflow: hidden; }
.lc.fl-msp { border-color: #d23b3b; box-shadow: 0 0 0 2px rgba(210,59,59,.1); }
.lc.fl-loss { border-color: #a32424; box-shadow: 0 0 0 2px rgba(163,36,36,.13); }
.lc.fl-thin { border-color: #c9820a; box-shadow: 0 0 0 2px rgba(201,130,10,.1); }
.lc.fl-cust { border-color: var(--sky); }
.lch { display: flex; align-items: flex-start; justify-content: space-between; padding: 9px 11px 8px; background: #fafbfc; border-bottom: 1px solid var(--li); gap: 8px; }
.lch-l { flex: 1; min-width: 0; }
.lcn { font-weight: 700; font-size: 13px; color: var(--nv); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; }
.lcm { font-size: 11px; color: var(--mu); margin-top: 3px; line-height: 1.6; display: flex; align-items: center; flex-wrap: wrap; }
.lcx { background: none; border: none; color: var(--mu); font-size: 18px; line-height: 1; padding: 0 5px; border-radius: 4px; flex-shrink: 0; cursor: pointer; }
.lcx:hover { background: var(--bb); color: var(--bc); }
.lcb { padding: 10px 11px; }
.lr { display: grid; gap: 8px; margin-bottom: 8px; }
.lr:last-child { margin-bottom: 0; }
.lr3 { grid-template-columns: 0.85fr 1fr 1.05fr; }
.lr2 { grid-template-columns: 1fr 1fr; }
.lr4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.lf { display: flex; flex-direction: column; gap: 3px; }
.lf label { font-size: 10px; font-weight: 600; color: var(--mu); text-transform: uppercase; letter-spacing: .04em; }
.lf input, .lf select { padding: 6px 8px; border: 1px solid var(--li); border-radius: 6px; font-size: 12.5px; width: 100%; box-sizing: border-box; }
.lf input:focus, .lf select:focus { outline: none; border-color: var(--sky); }
.lf input.ro2 { background: #f4f6f8; color: var(--mu); }
/* Internal cost row */
.lc-int { background: #f7f8fa; border-top: 1px dashed #dde1e8; padding: 8px 11px; display: grid; grid-template-columns: 1.2fr 1.1fr 0.9fr; gap: 8px; align-items: end; }
.li-lbl { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--mu); margin-bottom: 2px; }
.li-val { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Flag strip */
.lcflag { padding: 7px 11px; font-size: 12px; font-weight: 600; display: flex; gap: 8px; align-items: flex-start; }
.lcflag.bad { background: var(--bb); color: #a32424; }
.lcflag.warn { background: var(--wb); color: #8a5a06; }

/* Badges & Pills */
.bdg { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; white-space: nowrap; margin-right: 6px; }
.bl { background: #e8f3fe; color: #1a6ab8; }
.bg { background: #e8f8ef; color: #157a46; }
.bh { background: #f3eef9; color: #6b36c2; }
.bs { background: #fff0e6; color: #b85a00; }
.bw { background: #fff8e1; color: #8a6500; }
.bc { background: #e6f4ff; color: #0063b8; }
.mok { background: #e8f6ee; color: #0f9d58; }
.mwn { background: var(--wb); color: var(--wc); }
.mbd { background: var(--bb); color: var(--bc); }
.bandpill { display: inline-block; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 9px; background: #f1f4f7; color: #5a6672; margin-left: 5px; }
.bandpill.tight { background: #fdf1e6; color: #a8541b; }
.tierpill { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; padding: 1px 6px; border-radius: 9px; background: #ede8fb; color: #5b3fa8; margin-left: 5px; }

.lctools {
  display: flex;
  gap: 3px;
  align-items: center;
}
.lcbtn {
  background: none;
  border: 1px solid var(--li);
  color: var(--mu);
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
  transition: .12s;
}
.lcbtn:hover {
  border-color: var(--nv);
  color: var(--nv);
  background: #f5f8fc;
}

.bnr {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12.5px;
  line-height: 1.45;
}
.bnr-ico {
  font-size: 16px;
  flex-shrink: 0;
}
.bnr-body {
  flex: 1;
}
.bnr.bad {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.bnr.warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.bnr.ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.bnr-ref {
  margin-top: 8px;
}
.bnr-ref input {
  padding: 6px 10px;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  width: 100%;
  max-width: 240px;
}

.hod-stamp {
  background: #fdeaea;
  border: 1px solid #f0b8b8;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 9pt;
  color: #a32424;
  font-weight: 600;
  text-align: center;
  margin-bottom: 14px;
  font-family: Arial, sans-serif;
}

/* ─── FINANCE COMPACT METRICS STRIP ─── */
.finance-metrics-strip {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 18px;
  margin-bottom: 18px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  flex-wrap: wrap;
}

.finance-metric-item {
  flex: 1;
  min-width: 140px;
  padding: 4px 16px;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.finance-metric-item:first-child {
  padding-left: 0;
}

.finance-metric-item:last-child {
  border-right: none;
  padding-right: 0;
}

.finance-metric-val {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--nv);
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.finance-metric-lbl {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 3px;
  white-space: nowrap;
}
