:root {
  --bg: #f4efe6;
  --surface: #ffffff;
  --surface-soft: #eef4fb;
  --ink: #1d2220;
  --muted: #66756c;
  --primary: #1f5fa8;
  --primary-dark: #153f70;
  --accent: #b86b54;
  --border: #d3dceb;
  --shadow: 0 20px 40px rgba(21, 63, 112, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(184, 107, 84, 0.12), transparent 28%),
    linear-gradient(180deg, #f7f8fc 0%, #edf4fb 100%);
}

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

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.hero {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(31, 95, 168, 0.96), rgba(21, 63, 112, 0.94));
  color: white;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  opacity: 0.75;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
}

.subtitle {
  max-width: 720px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.address-line {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.auth-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-strip a {
  color: white;
  font-weight: 600;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.main-nav a.active {
  background: white;
  color: var(--primary-dark);
}

.content {
  display: grid;
  gap: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card,
.panel,
.auth-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 20px;
  border-radius: var(--radius);
}

.stat-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 28px;
}

.panel {
  padding: 20px;
  border-radius: var(--radius);
}

.panel-head h2,
.list-card h2,
.list-card h3 {
  margin: 0 0 8px;
}

.panel-head p,
.muted {
  margin: 0;
  color: var(--muted);
}

.panel-grid,
.two-up {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.inline-filter {
  display: grid;
  gap: 12px;
}

.inline-form {
  align-items: end;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.form-card,
.list-card,
.helper-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
}

.list-card {
  overflow-x: auto;
}

/* Dashboard compact grid: every panel flows into responsive columns and tall
   cards scroll inside their own box (with a pinned title), so the whole
   dashboard fits on one screen without page scrolling. */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.dash-grid > section { display: contents; }
.dash-grid .list-card { margin: 0; max-height: 340px; overflow: auto; }
/* content-width tables so Head/Amount columns sit close together, not spread
   across the full card width */
.dash-grid .list-card table { width: auto; min-width: 55%; }
.dash-grid .list-card td, .dash-grid .list-card th { padding-right: 20px; }
.dash-grid .list-card td.amount-cell, .dash-grid .list-card th:last-child { padding-right: 6px; }
.dash-grid .list-card h2 {
  position: sticky;
  top: 0;
  background: var(--surface);
  margin: 0 0 8px;
  padding-top: 2px;
  z-index: 2;
}
.dash-grid .list-card.dash-span-all { grid-column: 1 / -1; max-height: none; overflow: visible; }
@media (min-width: 880px) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.stack-form {
  display: grid;
  gap: 14px;
}

.form-card > .stack-form,
.form-card > form.stack-form {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}

.stack-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.stack-form button,
.stack-form .helper-box,
.stack-form .form-note,
.stack-form .full-span {
  grid-column: 1 / -1;
}

.stack-form.compact-form,
.inline-form {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.section-intro {
  margin-bottom: 16px;
}

.bank-entry-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.bank-entry-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.bank-entry-summary .stat-card {
  padding: 16px;
  border-radius: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.bank-table-card {
  overflow-x: auto;
}

.click-hint {
  color: var(--muted);
  font-size: 13px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.danger-form button {
  background: #c95b57;
}

.danger-form button:hover {
  background: #a9413d;
}

.checkbox-grid {
  display: grid;
  gap: 10px;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fbfdfb;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

button {
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--primary-dark);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-size: 14px;
}

.summary-row td {
  font-weight: 700;
  background: var(--surface-soft);
}

.auth-card {
  max-width: 440px;
  margin: 48px auto;
  padding: 34px 30px;
  border-radius: 24px;
}
.auth-brand {
  text-align: center;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(2, 62, 138, 0.12);
}
.auth-logo {
  height: 62px;
  width: auto;
  display: inline-block;
  margin-bottom: 8px;
}
.auth-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary, #023E8A);
}
.auth-address {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted, #64748b);
}
.auth-title {
  margin: 0 0 16px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark, #123c58);
}
.auth-footnote {
  margin: 16px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted, #94a3b8);
}

.error {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fdeceb;
  color: #8e2d25;
}

.helper-box ul {
  padding-left: 18px;
  margin-bottom: 0;
}

@media (min-width: 880px) {
  .panel-grid,
  .report-grid {
    grid-template-columns: minmax(300px, 380px) 1fr;
  }

  /* annexure card pairs: equal columns so tables don't get squeezed/clipped */
  .two-up {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .two-up > * { min-width: 0; overflow-x: auto; }

  .panel-grid.bank-grid {
    grid-template-columns: minmax(280px, 340px) 1fr;
  }

  .bank-entry-grid {
    grid-template-columns: minmax(260px, 320px) 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1180px);
  }

  .hero,
  .panel,
  .auth-card,
  .stat-card {
    padding: 18px;
    border-radius: 20px;
  }

  th,
  td {
    font-size: 14px;
  }
}


:root {
  --bg: #f7fbff;
  --surface: #ffffff;
  --surface-soft: #eef8fd;
  --ink: #12263a;
  --muted: #4f6477;
  --primary: #023e8a;
  --primary-dark: #012a5e;
  --accent: #00b4d8;
  --border: #c8deef;
  --highlight: #ade8f4;
  --shadow: 0 18px 36px rgba(2, 62, 138, 0.10);
  --radius: 22px;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  background:
    radial-gradient(circle at top left, rgba(173, 232, 244, 0.55), transparent 30%),
    linear-gradient(180deg, #f7fbff 0%, #edf7fc 100%);
}

h1,
h2,
h3,
p,
span,
label,
th,
td,
a,
button,
input,
select,
textarea {
  text-align: left;
}

.hero {
  gap: 18px;
  padding: 30px;
  background: linear-gradient(135deg, #023e8a 0%, #0353a4 58%, #00b4d8 100%);
}

.hero h1 {
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.panel-head h2,
.list-card h2,
.list-card h3 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-dark);
}

.subtitle,
.panel-head p,
.muted,
.click-hint {
  color: var(--muted);
}

.auth-strip {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
}

.main-nav {
  gap: 8px;
}

.main-nav a {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.main-nav a.active {
  background: var(--highlight);
  color: var(--primary-dark);
}

.panel,
.stat-card,
.auth-card,
.form-card,
.list-card,
.helper-box {
  border-color: var(--border);
}

.form-card,
.list-card,
.helper-box {
  border-radius: 18px;
}

.form-card > .stack-form,
.form-card > form.stack-form {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.stack-form label {
  align-content: start;
  font-size: 14px;
}

input,
select,
textarea {
  background: #ffffff;
  border-color: #bfd7eb;
}

/* Post-import review banner on the Bank Reconciliation screen */
.recon-import-banner {
  background: #f0f9ff;
  border: 1px solid #7dd3fc;
  border-left: 5px solid #0284c7;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.recon-import-banner .rib-title { font-weight: 800; color: #075985; margin-bottom: 4px; }
.recon-import-banner .rib-body { font-size: 14px; margin-bottom: 6px; }
.recon-import-banner .rib-hint { font-size: 12.5px; color: var(--muted); }
.recon-import-banner .rib-ok { color: #047857; font-weight: 700; }
.recon-import-banner .rib-warn { color: #b45309; font-weight: 700; }

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(0, 180, 216, 0.24);
  border-color: var(--accent);
}

button {
  background: var(--primary);
}

button:hover {
  background: #0353a4;
}

th {
  color: var(--primary-dark);
  background: #f4faff;
}

.list-card table {
  min-width: 100%;
}

@media (min-width: 960px) {
  .panel-grid,
  .report-grid {
    grid-template-columns: minmax(360px, 430px) 1fr;
  }
  .two-up {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .panel-grid.bank-grid {
    grid-template-columns: minmax(320px, 390px) 1fr;
  }
}


.app-body {
  margin: 0;
  background: linear-gradient(180deg, #f4f9fd 0%, #eef6fb 100%);
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #012a5e 0%, #023e8a 72%, #0353a4 100%);
  color: #fff;
  padding: 24px 18px;
}

.sidebar-brand h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.sidebar-brand p {
  margin: 8px 0 0;
  color: rgba(255,255,255,0.78);
}

.sidebar-scroll {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.nav-top { margin-bottom: 6px; }

/* Collapsible section (native <details>/<summary>) */
.nav-section {
  border-radius: 12px;
  overflow: hidden;
}
.nav-section[open] { background: rgba(255,255,255,0.03); }

.nav-heading {
  margin: 0;
  color: rgba(255,255,255,0.72);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}
.nav-heading::-webkit-details-marker { display: none; }
.nav-heading:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-caret {
  font-size: 16px;
  line-height: 1;
  transition: transform .18s ease;
  opacity: 0.7;
}
.nav-section[open] .nav-caret { transform: rotate(90deg); }

.nav-links {
  display: grid;
  gap: 6px;
  padding: 2px 6px 8px;
}

.nav-links a {
  display: block;
  padding: 11px 14px;
  border-radius: 12px;
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  font-weight: 600;
}

.nav-links a.active {
  background: var(--highlight);
  color: var(--primary-dark);
  border-color: rgba(173, 232, 244, 0.9);
}

.workspace-shell {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.workspace-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.workspace-topbar h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 3vw, 38px);
  color: var(--primary-dark);
}

.auth-strip.compact {
  border-color: var(--border);
  background: var(--surface-soft);
}

.auth-strip.compact span,
.auth-strip.compact a {
  color: var(--primary-dark);
}

.workspace-content {
  gap: 18px;
}

.ledger-panel {
  padding: 22px;
}

/* Full-width ledger/report body: selector bar on top, then summary, then tables */
.ledger-full { display: block; width: 100%; }
.ledger-full > form {
  background: var(--surface-alt, #f6f8fb);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
}
.ledger-full > form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted, #64748b); font-weight: 600; }
.ledger-full .bank-entry-summary,
.ledger-full .dash-kpi-grid { margin: 0 0 18px; }
.ledger-full table { width: 100%; }
.ledger-full h3 { margin-top: 22px; }

.panel-head-wide {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-head-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ledger-grid {
  align-items: start;
}

.pane-card {
  display: grid;
  gap: 16px;
}

.pane-head {
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.pane-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--primary-dark);
}

.pane-head p {
  margin: 0;
  color: var(--muted);
}

.list-card table {
  min-width: 960px;
}

/* Annexure/report card pairs (P&L, Vendor Expense, etc.) are simple 2-column
   tables — fit them to their column so they don't force a horizontal scroll. */
.two-up .list-card table,
.report-view .list-card table,
.report-view .report-grid table {
  min-width: 100%;
}
.two-up .list-card td:first-child,
.two-up .list-card th:first-child,
.report-view .list-card td:first-child,
.report-view .list-card th:first-child {
  white-space: normal;
  word-break: break-word;
}
/* Reports: balance the Monthly Income / Expense Groups pair into equal halves. */
@media (min-width: 960px) {
  .report-view .panel-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.form-card > .stack-form,
.form-card > form.stack-form {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (min-width: 1080px) {
  .app-shell {
    display: grid;
    grid-template-columns: 300px 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }

  .sidebar-scroll {
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding-right: 4px;
  }

  .workspace-shell {
    padding: 22px;
  }
}

@media (max-width: 1079px) {
  .sidebar {
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }

  .nav-links {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}


/* ═══════════════════════════════════════════════════════
   CRESOLV IMPORT HUB  —  Bank Statement & Invoice Upload
   Brand: Primary #023E8A · Accent #00B4D8 · Hi #ADE8F4
   ═══════════════════════════════════════════════════════ */

/* ── Import hub page wrapper ── */
.import-hub {
  display: grid;
  gap: 24px;
}

/* ── Hero header bar with logo ── */
.import-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  border-radius: 20px;
  background: linear-gradient(120deg, #023e8a 0%, #0353a4 55%, #00b4d8 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(2, 62, 138, 0.22);
}

.import-hero-logo {
  height: 48px;
  filter: brightness(0) invert(1);
}

.import-hero-text h1 {
  margin: 0;
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.import-hero-text p {
  margin: 4px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.80);
}

/* ── Type selector tabs ── */
.import-type-selector {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.import-type-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
}

.import-type-btn:hover {
  border-color: var(--accent);
  background: #f0fbfe;
}

.import-type-btn.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, #eaf9fd 0%, #d6f4fb 100%);
  box-shadow: 0 4px 14px rgba(0, 180, 216, 0.18);
}

.import-type-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--surface-soft);
}

.import-type-btn.active .import-type-icon {
  background: var(--accent);
  color: #fff;
}

/* ── Two-panel import layout ── */
.import-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .import-layout {
    grid-template-columns: 340px 1fr;
    align-items: start;
  }
}

/* ── Upload pane ── */
.import-upload-pane {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  display: grid;
  gap: 20px;
}

.import-pane-label {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
}

.import-pane-title {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
}

.import-pane-desc {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Drop zone ── */
.import-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 36px 20px;
  border-radius: 16px;
  border: 2px dashed var(--border);
  background: #f7fbff;
  cursor: pointer;
  transition: border-color .18s, background .18s;
  text-align: center;
}

.import-dropzone:hover,
.import-dropzone.drag-over {
  border-color: var(--accent);
  background: #ebf8fd;
}

.import-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.import-dropzone-icon {
  font-size: 40px;
  line-height: 1;
}

.import-dropzone-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
}

.import-dropzone-hint {
  font-size: 13px;
  color: var(--muted);
}

.import-dropzone-filename {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  display: none;
}

/* ── Format guide ── */
.import-format-guide {
  border-radius: 14px;
  border: 1px solid #c8edf8;
  background: linear-gradient(135deg, #f2fbff 0%, #e6f7fc 100%);
  padding: 16px;
}

.import-format-guide h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.import-format-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.import-col-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #9dd9ef;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
}

.import-col-chip.required {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Progress / status ── */
.import-status {
  display: grid;
  gap: 10px;
}

.import-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.import-status-row.info  { background: #eaf8fd; color: #015a7e; }
.import-status-row.ok    { background: #e6f8ee; color: #1a6b38; }
.import-status-row.warn  { background: #fff8e6; color: #7a5200; }
.import-status-row.error { background: #fdeaea; color: #8e1c1c; }

.import-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.info .import-status-dot  { background: var(--accent); }
.ok .import-status-dot    { background: #2baa5e; }
.warn .import-status-dot  { background: #f59c00; }
.error .import-status-dot { background: #d93030; }

/* ── Mapping / preview pane ── */
.import-preview-pane {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  display: grid;
  gap: 20px;
}

/* ── FY + action row inside preview ── */
.import-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
}

.import-action-row label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  flex: 1;
  min-width: 160px;
}

.import-action-row select,
.import-action-row input {
  border-radius: 12px;
}

/* ── Stats summary bar ── */
.import-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.import-stat {
  flex: 1;
  min-width: 110px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  display: grid;
  gap: 4px;
}

.import-stat-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.import-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
}

.import-stat-value.accent { color: var(--accent); }
.import-stat-value.ok     { color: #1a8a45; }
.import-stat-value.warn   { color: #c47a00; }

/* ── Preview table ── */
.import-preview-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.import-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.import-preview-table th {
  padding: 10px 12px;
  background: #f0f8ff;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.import-preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf4f9;
  color: var(--ink);
}

.import-preview-table tr:last-child td {
  border-bottom: none;
}

.import-preview-table tr:hover td {
  background: #f7fbff;
}

.import-preview-table .badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.import-preview-table .badge-cr  { background: #e1f7ea; color: #1a6b38; }
.import-preview-table .badge-dr  { background: #fff0ec; color: #8e2d1a; }
.import-preview-table .badge-new { background: #e6f2ff; color: #023e8a; }
.import-preview-table .badge-dup { background: #f0f0f0; color: #666; }

/* ── Import CTA button ── */
.import-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 14px;
  background: linear-gradient(135deg, #023e8a 0%, #0353a4 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(2, 62, 138, 0.28);
  transition: background .18s, transform .14s, box-shadow .14s;
}

.import-cta-btn:hover {
  background: linear-gradient(135deg, #012a5e 0%, #023e8a 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(2, 62, 138, 0.35);
}

.import-cta-btn:active {
  transform: translateY(0);
}

/* ── Mapping queue section ── */
.import-map-queue {
  display: grid;
  gap: 16px;
  margin-top: 4px;
}

.import-map-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.import-map-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #f5faff;
  border-bottom: 1px solid var(--border);
}

.import-map-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.import-map-badge.cr { background: #d6f4e8; color: #12683a; }
.import-map-badge.dr { background: #fde8e3; color: #8e2d1a; }

.import-map-narration {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.import-map-amount {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-dark);
}

.import-map-body {
  padding: 16px 18px;
}

/* ── Dropdown trigger helper ── */
.import-select-wrapper {
  position: relative;
}

/* ── Excel template download link ── */
.import-template-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--accent);
  background: #f2fbfe;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.import-template-link:hover {
  background: var(--highlight);
}

/* ── Hidden panels controlled by JS ── */
.import-panel { display: none; }
.import-panel.active { display: grid; gap: 20px; }


/* ═══════════════════════════════════════════════════════════
   CRESOLV IMPORT HUB — Brand tokens & page styles
   Primary: #023E8A  Accent: #00B4D8  Highlight: #ADE8F4
   ═══════════════════════════════════════════════════════════ */

:root {
  --crs-primary:   #023E8A;
  --crs-primary-h: #01265a;
  --crs-accent:    #00B4D8;
  --crs-highlight: #ADE8F4;
  --crs-bg:        #f0f8ff;
  --crs-surface:   #ffffff;
  --crs-ink:       #0d1b2a;
  --crs-muted:     #52687a;
  --crs-border:    #c5dff0;
  --crs-radius:    16px;
  --crs-shadow:    0 8px 32px rgba(2,62,138,.10);
}

/* ── Import Hub wrapper ── */
.import-hub {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Import Hub hero banner ── */
.import-hero {
  background: linear-gradient(120deg, var(--crs-primary) 0%, #0466c8 60%, #0096c7 100%);
  border-radius: 20px 20px 0 0;
  padding: 28px 32px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.import-hero-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.import-hero-logo {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
  display: block;
}

.import-hero-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.3);
}

.import-hero-text h1 {
  margin: 0 0 2px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
}

.import-hero-text p {
  margin: 0;
  font-size: 13px;
  color: var(--crs-highlight);
  font-weight: 500;
}

/* ── Selector bar ── */
.import-selector-bar {
  background: var(--crs-primary);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.08);
}

.import-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  letter-spacing: .01em;
  position: relative;
}

.import-tab-btn:hover {
  color: var(--crs-highlight);
}

.import-tab-btn.active {
  color: #fff;
  border-bottom-color: var(--crs-accent);
}

.import-tab-btn .tab-icon {
  font-size: 16px;
  line-height: 1;
}

/* ── Import body container ── */
.import-body {
  background: var(--crs-bg);
  border-radius: 0 0 20px 20px;
  padding: 28px 32px 32px;
  box-shadow: var(--crs-shadow);
}

/* ── Import panel (one per tab) ── */
.import-pane {
  display: none;
}
.import-pane.active {
  display: grid;
  gap: 24px;
}

/* ── Two-col layout for upload + format guide ── */
.import-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 768px) {
  .import-cols { grid-template-columns: 1fr; }
  .import-hero { padding: 20px; }
  .import-body { padding: 18px; }
  .import-selector-bar { padding: 0 16px; }
}

/* ── Upload card ── */
.import-upload-card {
  background: var(--crs-surface);
  border-radius: var(--crs-radius);
  border: 1px solid var(--crs-border);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(2,62,138,.05);
}

.import-upload-card h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  color: var(--crs-primary);
  letter-spacing: -.2px;
}

.import-upload-card p.desc {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--crs-muted);
  line-height: 1.5;
}

/* ── Drop zone (Cresolv branded) ── */
.crs-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 20px;
  border-radius: 14px;
  border: 2px dashed var(--crs-border);
  background: linear-gradient(135deg, #f5fbff 0%, #eaf6fd 100%);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  text-align: center;
  min-height: 160px;
}

.crs-dropzone:hover,
.crs-dropzone.drag-over {
  border-color: var(--crs-accent);
  background: linear-gradient(135deg, #e4f5fd 0%, #d5effa 100%);
  transform: translateY(-1px);
}

.crs-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.crs-dropzone-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--crs-primary) 0%, var(--crs-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,180,216,.3);
}

.crs-dropzone-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--crs-primary);
}

.crs-dropzone-hint {
  font-size: 12.5px;
  color: var(--crs-muted);
}

.crs-dropzone-filename {
  font-size: 13px;
  font-weight: 700;
  color: var(--crs-accent);
  display: none;
  align-items: center;
  gap: 6px;
}

.crs-dropzone-filename::before { content: "📎 "; }

/* ── Submit button ── */
.crs-submit-btn {
  margin-top: 16px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(90deg, var(--crs-primary) 0%, #0466c8 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .01em;
  box-shadow: 0 4px 16px rgba(2,62,138,.25);
  transition: opacity .15s, transform .12s, box-shadow .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.crs-submit-btn:hover {
  opacity: .92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2,62,138,.32);
}

.crs-submit-btn:active {
  transform: translateY(0);
}

/* ── Format guide card ── */
.import-guide-card {
  background: var(--crs-surface);
  border-radius: var(--crs-radius);
  border: 1px solid var(--crs-border);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(2,62,138,.05);
}

.import-guide-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  color: var(--crs-primary);
}

.import-guide-card p.desc {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--crs-muted);
  line-height: 1.5;
}

/* ── Column table ── */
.format-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.format-table thead th {
  background: var(--crs-primary);
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.format-table thead th:first-child { border-radius: 8px 0 0 0; }
.format-table thead th:last-child  { border-radius: 0 8px 0 0; }

.format-table tbody tr:nth-child(odd) { background: #f2f8fd; }
.format-table tbody tr:nth-child(even) { background: #fff; }

.format-table td {
  padding: 7px 12px;
  color: var(--crs-ink);
  border-bottom: 1px solid var(--crs-border);
  vertical-align: top;
}

.format-table td:first-child {
  font-weight: 700;
  color: var(--crs-accent);
  white-space: nowrap;
}

.format-table td.required-badge::after {
  content: " *";
  color: #e63946;
  font-weight: 900;
}

/* ── Download template button ── */
.crs-template-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1.5px solid var(--crs-accent);
  background: #e9f8fd;
  color: var(--crs-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .12s;
  margin-top: 16px;
}

.crs-template-btn:hover {
  background: var(--crs-highlight);
  transform: translateY(-1px);
}

/* ── Progress / status strip ── */
.import-status-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.import-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #e9f8fd;
  color: var(--crs-primary);
  border: 1px solid var(--crs-border);
}

.import-status-chip.success {
  background: #e8faf1;
  color: #1a7a4a;
  border-color: #b6e8cc;
}

.import-status-chip.warn {
  background: #fff8e1;
  color: #8a6200;
  border-color: #f0d97a;
}

/* ── Section header for inline tips ── */
.import-tip-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #e6f4ff 0%, #f0fbff 100%);
  border-radius: 10px;
  border-left: 4px solid var(--crs-accent);
  font-size: 13.5px;
  color: var(--crs-ink);
  line-height: 1.55;
}

.import-tip-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}


/* ═══════════════════════════════════════════════════════════
   BANK RECONCILIATION REVIEW SCREEN
   ═══════════════════════════════════════════════════════════ */

.recon-panel {
  display: grid;
  gap: 18px;
}

.recon-fy-form select {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 13px;
}

.recon-tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
}

.recon-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.recon-tab.active {
  color: var(--primary-dark);
  border-bottom-color: var(--accent);
}

.recon-summary-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.recon-ok { color: #1a7a4a; }
.recon-warn { color: #c1121f; }

.recon-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.recon-filter-chip {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.recon-filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.recon-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.recon-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.recon-table thead th {
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.recon-table tbody tr:nth-child(odd) { background: var(--surface-soft); }

.recon-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 13.5px;
}

.recon-narration {
  max-width: 320px;
  word-break: break-word;
  color: var(--primary-dark);
}

.recon-amount {
  font-weight: 800;
  color: var(--primary-dark);
  white-space: nowrap;
}

.recon-empty {
  text-align: center;
  padding: 30px;
  color: var(--muted);
}

.recon-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.recon-badge-ok {
  background: #e8faf1;
  color: #1a7a4a;
}

.recon-badge-warn {
  background: #fdecec;
  color: #c1121f;
}

.recon-badge-suggest {
  background: #fff8e1;
  color: #8a6200;
}

.recon-badge-posted {
  background: var(--highlight);
  color: var(--primary-dark);
}

.recon-row-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 280px;
}

.recon-row-form-credit {
  flex-direction: column;
  align-items: stretch;
}

.recon-select {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  min-width: 160px;
}

/* Employee + project pickers added to the debit row — keep them compact so the
   row wraps neatly rather than stretching. */
.recon-select-emp { min-width: 150px; max-width: 190px; background: #ecfdf5; }
.recon-select-proj { min-width: 170px; max-width: 230px; background: #eef2ff; }

.recon-split-btn {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px dashed var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  margin-top: 4px;
}
.recon-split-btn:hover { background: #eef2ff; color: #1e293b; }
.recon-split-modal { max-width: 520px; }
.recon-split-modal .split-line { display: flex; gap: 8px; margin-bottom: 6px; }
.recon-split-modal .split-amt { width: 120px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); }
.recon-split-modal label { display: block; margin-bottom: 8px; font-size: 13px; }

.recon-confirm-btn {
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.recon-confirm-btn:hover {
  background: var(--primary-dark);
}

.recon-suggest-note {
  margin: 0 0 4px;
  font-size: 12px;
  color: #8a6200;
}

.recon-modal {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 380px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}

.recon-modal h3 {
  margin: 0 0 14px;
  color: var(--primary-dark);
  font-size: 17px;
}

.recon-modal label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.recon-modal input,
.recon-modal select {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13.5px;
}

.recon-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.recon-modal-actions button {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.recon-modal-actions button[type="submit"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

@media (max-width: 768px) {
  .recon-table { min-width: 700px; }
  .recon-row-form { flex-direction: column; align-items: stretch; }
}

/* ═══════════════════════════════════════════════════════════
   BANK UPLOAD CONFIRMATION BANNER
   ═══════════════════════════════════════════════════════════ */

.upload-confirmation-banner {
  background: #e8faf1;
  border: 1px solid #b6e8cc;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: grid;
  gap: 4px;
}

.upload-banner-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #1a7a4a;
}

.upload-banner-detail {
  margin: 0;
  font-size: 13.5px;
  color: var(--primary-dark);
}

.upload-banner-warn {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #8a6200;
}

/* ═══════════════════════════════════════════════════════════
   BANK BOOK - ENTRY PICKER & FIFO ALLOCATION PREVIEW
   ═══════════════════════════════════════════════════════════ */

.fifo-preview-box {
  background: #f0f8ff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 4px 0 8px;
}

.fifo-preview-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-dark);
}

.fifo-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 8px;
}

.fifo-preview-table th {
  text-align: left;
  padding: 6px 8px;
  background: var(--surface-soft);
  font-weight: 700;
  color: var(--primary-dark);
}

.fifo-preview-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

.fifo-leftover-note {
  margin: 4px 0 8px;
  font-size: 12.5px;
  color: #8a6200;
  font-weight: 700;
}

.fifo-toggle {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary-dark);
}

.fifo-toggle input {
  width: auto;
}

.fifo-toggle-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.fifo-tds-summary {
  margin: 4px 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--surface-soft);
  padding: 8px 10px;
  border-radius: 8px;
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD — small-org financial overview
   ═══════════════════════════════════════════════════════════ */

.dash-header { margin-bottom: 18px; }

.dash-actions {
  background: #fff8e1;
  border: 1px solid #f0c05a;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
}
.dash-actions-label {
  font-size: 12px;
  font-weight: 800;
  color: #8a6200;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.dash-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-action-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .15s;
}
.dash-action-chip:hover { opacity: .85; }
.dash-chip-warn { background: #fff0cc; color: #8a6200; border: 1px solid #f0c05a; }
.dash-chip-ok   { font-size: 13px; font-weight: 600; color: #1a7a4a; }

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}
.dash-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: grid;
  gap: 2px;
}
.dash-kpi span { font-size: 12px; color: var(--muted); }
.dash-kpi strong { font-size: 22px; font-weight: 800; color: var(--primary-dark); }
.dash-kpi small { font-size: 11px; color: var(--muted); }
.dash-kpi-warn strong { color: #c1121f; }
.dash-kpi-ok strong   { color: #1a7a4a; }

.amount-cell { text-align: right; font-variant-numeric: tabular-nums; }
.text-warn   { color: #c1121f; font-weight: 700; }
.text-danger { color: #9b1a1a; font-weight: 800; }

/* bulk confirm button */
.bulk-confirm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: #1a7a4a;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .12s;
}
.bulk-confirm-btn:hover { opacity: .9; transform: translateY(-1px); }

/* ============================================================
   UAT polish pass — dashboard KPIs, charts, P&L, role UI
   (additive; appended so existing rules are untouched)
   ============================================================ */
.text-ok { color: #059669 !important; }
.text-danger { color: #e11d48 !important; }
.text-warn { color: #d97706 !important; }

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.dash-kpi {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  transition: box-shadow .15s ease, transform .15s ease;
}
.dash-kpi:hover { box-shadow: 0 8px 20px rgba(16,24,40,.08); transform: translateY(-1px); }
.dash-kpi > span { font-size: 12px; color: var(--muted, #64748b); font-weight: 600; letter-spacing: .01em; }
.dash-kpi > strong { font-size: 24px; font-weight: 800; color: var(--primary-dark, #0f172a); line-height: 1.1; }
.dash-kpi > small { font-size: 11px; color: var(--muted, #94a3b8); }
.dash-kpi-ok { border-left: 4px solid #059669; }
.dash-kpi-warn { border-left: 4px solid #d97706; }

/* Charts sit in the existing .list-card; give SVGs breathing room */
.list-card svg { display: block; margin: 6px 0 2px; }
.list-card h2 { font-size: 15px; font-weight: 700; color: var(--primary-dark, #0f172a); margin: 0 0 10px; }

/* Pending-action chips */
.dash-actions { margin: 14px 0 6px; }
.dash-actions-label { font-size: 12px; font-weight: 700; color: var(--muted,#64748b); margin: 0 0 6px; text-transform: uppercase; letter-spacing:.04em; }
.dash-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-action-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent;
}
.dash-action-chip strong { font-size: 13px; }
.dash-chip-warn { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.dash-chip-ok, .dash-chip-info { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.dash-chip-danger { background:#fef2f2; color:#b91c1c; border-color:#fecaca; }

/* Amount cells right-aligned and tabular */
.amount-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 640px) {
  .dash-kpi > strong { font-size: 20px; }
  .panel.two-up { grid-template-columns: 1fr !important; }
}

/* Billing Plan + Monthly Invoice */
.pill { display:inline-block; padding:2px 8px; border-radius:999px; background:#eef2ff; color:#3730a3; font-size:11px; font-weight:600; }
.link-danger { background:none; border:none; color:#dc2626; cursor:pointer; font:inherit; padding:0 0 0 8px; text-decoration:underline; }
.link-plain { background:none; border:none; color:var(--primary,#023e8a); cursor:pointer; font:inherit; text-decoration:underline; padding:0 0 0 6px; }

/* ============================================================
   Cresolv branding + guided form flow
   ============================================================ */
:root { --crs-brand: #023E8A; --crs-brand-dark: #012a5e; --crs-accent: #00b4d8; }
.sidebar-brand { text-align:center; }
.brand-logo {
  display:block; max-width:150px; max-height:52px; margin:2px auto 10px;
  object-fit:contain;
}
.sidebar-brand .eyebrow { letter-spacing:.08em; text-transform:uppercase; font-size:10px; opacity:.7; }

/* Next-step banner */
.flow-banner {
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  background:linear-gradient(90deg, #e8f1fc, #f3f9ff);
  border:1px solid #cfe0f5; border-left:5px solid var(--crs-brand);
  border-radius:12px; padding:12px 16px; margin:0 0 18px;
}
.flow-check {
  background:var(--crs-brand); color:#fff; width:24px; height:24px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center; font-size:13px; flex:none;
}
.flow-msg { font-size:14px; color:var(--crs-brand-dark); }
.flow-steps { display:flex; gap:8px; flex-wrap:wrap; margin-left:auto; }
.flow-next-btn {
  background:var(--crs-brand); color:#fff !important; text-decoration:none;
  padding:7px 14px; border-radius:8px; font-size:13px; font-weight:600;
  transition:background .15s ease;
}
.flow-next-btn:hover { background:var(--crs-brand-dark); }
.flow-dismiss { font-size:12px; color:#64748b; text-decoration:underline; }

/* Per-row quick actions */
.row-actions a { margin-right:10px; font-size:12px; font-weight:600; color:var(--crs-brand); text-decoration:none; white-space:nowrap; }
.row-actions a:hover { text-decoration:underline; }

/* ============================================================
   OFFICIAL CRESOLV ONE BRAND SYSTEM (authoritative overrides)
   Primary #023E8A · Accent #00B4D8 · Highlight #ADE8F4
   ============================================================ */
:root {
  --crs-primary: #023E8A; --crs-primary-dark: #012a5e;
  --crs-accent: #00B4D8;  --crs-highlight: #ADE8F4;
  --crs-brand: #023E8A;   --crs-brand-dark: #012a5e;
  /* remap legacy variable names to the official palette */
  --primary: #023E8A; --primary-dark: #012a5e; --accent: #00B4D8;
  --highlight: #ADE8F4; --crs-primary-h: #012a5e;
  --ink: #12263a; --muted: #5b6b7d;
}

/* Typography hierarchy: H1 display · H2 heading · Body 14px */
body, .app-body {
  font-family: "Segoe UI", "Helvetica Neue", Roboto, -apple-system, Arial, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--ink);
}
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; color: var(--crs-primary-dark); }
h2 { font-size: 19px; font-weight: 700; line-height: 1.25; color: var(--crs-primary-dark); }
h3 { font-size: 15px; font-weight: 700; letter-spacing: .01em; color: var(--crs-primary); }
p, td, th, label, input, select, textarea, button { font-size: 14px; }
small, .subtitle, .eyebrow, .brand-address { font-size: 12px; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }

/* Brand logo in the (dark) sidebar */
.brand-logo { display:block; width:100%; max-width:190px; height:auto; margin:0 auto 8px; }
.sidebar-brand { text-align:center; }
.brand-address { opacity:.75; margin:2px 0 0; }

/* Accent-driven interactive elements */
a { color: var(--crs-primary); }
a:hover { color: var(--crs-accent); }
.sidebar a.active { background: rgba(255,255,255,0.14); border-left:3px solid var(--crs-highlight); color:#fff; }
button, .bulk-confirm-btn, .flow-next-btn {
  background: var(--crs-primary); color:#fff; border:none;
}
button:hover, .bulk-confirm-btn:hover, .flow-next-btn:hover { background: var(--crs-primary-dark); }
.chip { background: var(--crs-highlight); color: var(--crs-primary-dark); }
.pill { background:#e6f6fb; color: var(--crs-primary-dark); }
.dash-kpi > strong { color: var(--crs-primary-dark); }
.dash-kpi-ok { border-left-color: var(--crs-accent); }
.text-ok { color: #0a8a5f !important; }

/* Real Cresolv One logo placement */
.brand-logo-chip {
  background:#fff; border-radius:12px; padding:10px 12px; margin:0 auto 10px;
  max-width:190px; box-shadow:0 2px 8px rgba(0,0,0,.18);
}
.brand-logo-img { display:block; width:100%; height:auto; }

/* Monthly Invoice rate-variance check */
.plan-rate-cell { font-size:12px; color:var(--muted,#64748b); white-space:nowrap; text-align:right; }
.rate-input.rate-off { border:2px solid #e11d48 !important; background:#fef2f2 !important; }
.plan-rate-cell.rate-off-note { color:#e11d48; font-weight:700; }
