:root {
  --navy-950: #071727;
  --navy-900: #0b2239;
  --navy-800: #102f4e;
  --navy-700: #17466f;
  --blue-600: #1769aa;
  --green-600: #0a8f75;
  --green-500: #12a486;
  --green-100: #dff7ef;
  --sky-100: #eaf5ff;
  --red-600: #c63f4b;
  --amber-600: #b66a00;
  --ink: #162536;
  --muted: #687789;
  --line: #dfe7ef;
  --canvas: #f5f8fb;
  --white: #fff;
  --shadow: 0 18px 50px rgba(20, 47, 72, 0.11);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(18, 164, 134, 0.28);
  outline-offset: 2px;
}

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-family: "Manrope", sans-serif; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.84rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; }

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--white);
  background: linear-gradient(145deg, var(--green-500), #08715f);
  box-shadow: 0 10px 24px rgba(18, 164, 134, 0.25);
  font-family: "Manrope", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}
.brand-copy strong { display: block; font-family: "Manrope", sans-serif; font-size: 1rem; }
.brand-copy span { color: #a9bfd0; font-size: 0.72rem; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  background: var(--white);
}
.auth-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 6vw, 78px);
  color: var(--white);
  background:
    radial-gradient(circle at 78% 22%, rgba(35, 197, 158, 0.2), transparent 27%),
    linear-gradient(145deg, var(--navy-950), var(--navy-800));
}
.auth-hero::after {
  content: "";
  position: absolute;
  right: -8vw;
  bottom: -17vw;
  width: 44vw;
  height: 44vw;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(255,255,255,.025), 0 0 0 120px rgba(255,255,255,.018);
}
.auth-hero .brand { position: relative; z-index: 1; }
.auth-message { position: relative; z-index: 1; max-width: 690px; }
.auth-message .eyebrow { margin-bottom: 18px; color: #64d9bd; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.auth-message h1 { max-width: 620px; margin-bottom: 22px; font-size: clamp(2.5rem, 5vw, 5.4rem); line-height: .98; letter-spacing: -.06em; }
.auth-message p { max-width: 600px; color: #c4d6e4; font-size: clamp(1rem, 1.6vw, 1.24rem); line-height: 1.65; }
.auth-points { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 34px; }
.auth-points span { padding: 10px 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; background: rgba(255,255,255,.055); color: #dce9f1; font-size: .86rem; }
.auth-panel { display: grid; place-items: center; padding: 38px; background: #fbfdff; }
.auth-card { width: min(430px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: var(--shadow); }
.auth-card h2 { margin-bottom: 8px; font-size: 1.65rem; }
.auth-card > p { margin-bottom: 28px; }
.demo-banner { margin: 22px 0 0; padding: 14px; border-radius: 12px; color: #275849; background: var(--green-100); font-size: .83rem; line-height: 1.45; }

.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label { color: #394b5f; font-size: .82rem; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cad6e2;
  border-radius: 10px;
  color: var(--ink);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(18,164,134,.12); outline: 0; }
.field-hint { margin-top: -2px; color: var(--muted); font-size: .72rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: var(--white); background: var(--green-600); box-shadow: 0 8px 20px rgba(10,143,117,.2); }
.btn-primary:hover { background: #087c66; }
.btn-secondary { color: var(--navy-800); background: var(--sky-100); }
.btn-ghost { border: 1px solid var(--line); color: #3b4e62; background: var(--white); }
.btn-danger { color: var(--red-600); background: #fff0f1; }
.btn-block { width: 100%; }
.icon-btn { width: 38px; min-height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 23px 17px;
  color: var(--white);
  background: var(--navy-900);
  z-index: 20;
}
.sidebar .brand { padding: 0 8px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.nav { display: grid; flex: 1; min-height: 0; align-content: start; gap: 5px; margin-top: 19px; overflow-y: auto; padding-right: 3px; }
.nav-area { display: grid; gap: 3px; }
.nav-area-button {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  border: 0;
  border-radius: 10px;
  color: #bbcedc;
  background: transparent;
  text-align: left;
  font-weight: 700;
}
.nav-area-button:hover,.nav-area-button.active { color: var(--white); background: rgba(255,255,255,.07); }
.nav-area-button.active { box-shadow: inset 3px 0 var(--green-500); }
.nav-chevron { font-size: 1.25rem; transition: transform .16s ease; }
.nav-area-button[aria-expanded="true"] .nav-chevron { transform: rotate(90deg); }
.nav-children { display: none; gap: 2px; padding: 2px 0 6px 31px; }
.nav-children.open { display: grid; }
.nav-subbutton { min-height: 34px; padding: 7px 10px; border: 0; border-radius: 8px; color: #9fb5c6; background: transparent; text-align: left; font-size: .78rem; }
.nav-subbutton:hover { color: var(--white); background: rgba(255,255,255,.06); }
.nav-subbutton.active { color: var(--white); background: linear-gradient(90deg,rgba(18,164,134,.3),rgba(18,164,134,.08)); }
.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  color: #bbcedc;
  background: transparent;
  text-align: left;
  font-size: .9rem;
}
.nav-button:hover { color: var(--white); background: rgba(255,255,255,.07); }
.nav-button.active { color: var(--white); background: linear-gradient(90deg, rgba(18,164,134,.34), rgba(18,164,134,.12)); box-shadow: inset 3px 0 var(--green-500); }
.nav-icon { display: grid; width: 21px; place-items: center; font-size: 1rem; }
.sidebar-footer { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.environment-pill { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 13px; color: #bcd0dc; font-size: .73rem; }
.environment-pill i { width: 7px; height: 7px; border-radius: 50%; background: #f0ad39; box-shadow: 0 0 0 4px rgba(240,173,57,.12); }

.main { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 73px;
  padding: 12px clamp(18px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
}
.mobile-toggle { display: none; }
.company-select { min-width: 230px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--white); font-weight: 600; }
.topbar-spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 9px; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: var(--navy-800); background: var(--green-100); font-weight: 800; }
.user-chip span { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }

.content { padding: 30px clamp(18px, 3vw, 40px) 56px; }
.breadcrumb { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: var(--muted); font-size: .76rem; }
.breadcrumb i { font-style: normal; color: #9aabba; }
.breadcrumb strong { color: var(--green-600); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.page-head h1 { margin-bottom: 7px; font-size: clamp(1.65rem, 3vw, 2.15rem); letter-spacing: -.035em; }
.page-head p { margin-bottom: 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.page-head:has([data-export-financial-statements]) { flex-wrap: wrap; }
.page-actions:has([data-export-financial-statements]) { flex-shrink: 1; max-width: 100%; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 19px; }
.kpi { position: relative; overflow: hidden; min-height: 145px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 30px rgba(20,47,72,.055); }
.kpi::after { content: ""; position: absolute; right: -25px; top: -28px; width: 95px; height: 95px; border-radius: 50%; background: var(--sky-100); }
.kpi.green::after { background: var(--green-100); }
.kpi-label { position: relative; z-index: 1; display: block; margin-bottom: 18px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.kpi strong { position: relative; z-index: 1; display: block; margin-bottom: 9px; color: var(--navy-900); font-family: "Manrope", sans-serif; font-size: 1.65rem; }
.kpi small { color: var(--muted); }
.delta-positive { color: var(--green-600) !important; }
.delta-negative { color: var(--red-600) !important; }
.danger-text { color: var(--red-600) !important; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 18px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 28px rgba(20,47,72,.045); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 19px 21px; border-bottom: 1px solid #edf1f5; }
.card-head h3 { margin: 0; font-size: 1rem; }
.card-body { padding: 21px; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.quick-action { display: grid; gap: 5px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; text-align: left; }
.quick-action:hover { border-color: #a7c6d9; background: var(--sky-100); }
.quick-action strong { font-size: .88rem; }
.quick-action small { color: var(--muted); }

.chart { display: flex; align-items: end; gap: 10px; height: 210px; padding-top: 12px; }
.bar-group { flex: 1; display: flex; align-items: end; justify-content: center; gap: 4px; height: 100%; border-bottom: 1px solid var(--line); }
.bar { width: min(22px, 34%); min-height: 3px; border-radius: 5px 5px 0 0; background: var(--blue-600); }
.bar.expense { background: var(--green-500); opacity: .75; }
.chart-labels { display: flex; gap: 10px; margin-top: 8px; }
.chart-labels span { flex: 1; color: var(--muted); font-size: .68rem; text-align: center; }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: .75rem; }
.legend i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 2px; background: var(--blue-600); }
.legend i.green { background: var(--green-500); }

.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 28px rgba(20,47,72,.04); }
.table-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.search-input { min-width: 220px; flex: 1; max-width: 360px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th { padding: 12px 15px; color: #506275; background: #f8fafc; text-align: left; font-size: .72rem; letter-spacing: .025em; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px 15px; border-top: 1px solid #eef2f5; vertical-align: middle; }
tbody tr:hover { background: #fbfdff; }
.empty-state { padding: 52px 24px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--ink); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.badge.sale { color: #135e93; background: #e7f4ff; }
.badge.purchase { color: #6e5107; background: #fff5d8; }
.badge.expense { color: #8f3640; background: #ffedef; }
.badge.ok { color: #137059; background: var(--green-100); }
.badge.closed { color: #4a5562; background: #e9eef3; }

.tabs { display: flex; gap: 7px; margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--white); white-space: nowrap; }
.tab.active { border-color: var(--navy-800); color: var(--white); background: var(--navy-800); }

.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.report-card { padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.report-card h3 { margin-bottom: 8px; font-size: 1rem; }
.report-card > p { min-height: 42px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.report-value { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 23px 0 17px; }
.report-value strong { color: var(--navy-900); font-size: 1.45rem; }
.vat-book-shell { overflow: hidden; margin-top: 18px; }
.vat-book-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 24px 16px; }
.vat-book-heading h3, .tax-annex-heading h3 { margin: 4px 0; color: var(--navy-900); font-size: 1.1rem; }
.vat-book-heading p { margin: 0; color: var(--muted); font-size: .8rem; }
.vat-book-heading .eyebrow, .tax-annex-heading .eyebrow { color: var(--blue-600); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tax-book-tabs { gap: 0; margin: 0; padding: 0 24px; border-bottom: 1px solid var(--line); }
.tax-book-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 11px 13px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: transparent; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.tax-book-tabs button span { display: inline-grid; min-width: 21px; height: 21px; place-items: center; padding: 0 5px; border-radius: 99px; color: #496071; background: #edf2f5; font-size: .66rem; }
.tax-book-tabs button.active { border-bottom-color: var(--green-500); color: var(--navy-900); }
.tax-book-tabs button.active span { color: #0d604d; background: var(--green-100); }
.vat-book-table { max-height: 520px; border-bottom: 1px solid var(--line); }
.vat-book-table table { min-width: 980px; font-size: .75rem; }
.vat-book-table th { position: sticky; z-index: 2; top: 0; padding: 10px 11px; background: #eef4f7; font-size: .64rem; }
.vat-book-table td { padding: 11px; }
.vat-book-table tfoot td { position: sticky; bottom: 0; border-top: 2px solid #b5c4ce; color: var(--navy-900); background: #f5f8fa; font-weight: 800; }
.vat-book-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 16px 24px; background: #fbfdfe; }
.vat-book-summary div { display: grid; gap: 5px; padding: 12px 14px; border: 1px solid #dfe9ef; border-radius: 11px; background: white; }
.vat-book-summary span { color: var(--muted); font-size: .7rem; }
.vat-book-summary strong { color: var(--navy-900); font-size: .95rem; }
.vat-signature-preview { display: flex; justify-content: center; gap: 70px; padding: 30px 24px 20px; color: var(--muted); font-size: .7rem; }
.vat-signature-preview span { width: min(260px,40%); padding-top: 7px; border-top: 1px solid #8da0ad; text-align: center; }
.official-source-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 18px 21px; border-left: 4px solid var(--green-500); }
.official-source-card p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.official-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.official-links a { padding: 7px 10px; border: 1px solid #cddce5; border-radius: 8px; color: var(--blue-600); background: #f8fbfd; font-size: .7rem; font-weight: 800; text-decoration: none; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.tax-annex-heading { margin: 28px 2px 13px; }
.report-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.report-toolbar .field { width: min(420px,100%); margin: 0; }
.report-toolbar > div:last-child { display: grid; gap: 5px; text-align: right; }
.inventory-catalog-grid { grid-template-columns: minmax(0,2.4fr) minmax(250px,.6fr); }
.branding-card { display: flex; align-items: center; gap: 18px; }
.branding-card img,.branding-preview img { width: 120px; height: 78px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: white; }
.brand-placeholder { display: grid; width: 78px; height: 78px; place-items: center; flex: 0 0 auto; border-radius: 16px; color: white; background: linear-gradient(145deg,var(--navy-800),var(--green-600)); font-family: "Manrope",sans-serif; font-size: 2rem; font-weight: 800; }
.branding-preview { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #f8fbfd; }
.branding-preview strong,.branding-preview span { display: block; }
.branding-preview span { margin-top: 4px; color: var(--muted); font-size: .78rem; }

.summary-list { display: grid; gap: 10px; }
.summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #edf1f5; }
.summary-row:last-child { border-bottom: 0; }
.summary-row.total { padding-top: 15px; color: var(--navy-900); font-weight: 800; }
.validation-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.validation-list li { display: flex; gap: 8px; padding: 9px 11px; border-radius: 9px; background: #f7fafc; font-size: .8rem; }
.validation-list .good { color: var(--green-600); }
.validation-list .warn { color: var(--amber-600); }

.cost-structure-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 18px; }
.entity-list { display: grid; gap: 12px; }
.entity-list > div { display: grid; gap: 4px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdff; }
.entity-list span { color: var(--muted); font-size: .78rem; }
.budget-head { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.budget-head h3 { margin: 15px 0 6px; }
.budget-head p { color: var(--muted); }
.budget-total { display: block; color: var(--navy-900); font-family: "Manrope", sans-serif; font-size: 1.7rem; }
.cost-guide .card-body { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 16px; }
.cost-guide strong { color: var(--green-600); }
.cost-guide span { font-weight: 700; }
.cost-guide p { grid-column: 2; margin: 0; color: var(--muted); font-size: .82rem; }

.allocation-panel { margin: 7px 0 18px; padding: 16px; border: 1px solid #cfe2ee; border-radius: 13px; background: #f7fbfe; }
.allocation-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.allocation-head strong { display: block; margin-bottom: 3px; font-size: .9rem; }
.allocation-head span { display: block; color: var(--muted); font-size: .76rem; }
.allocation-row { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) 125px 38px; align-items: end; gap: 10px; padding: 10px 0; border-top: 1px solid #dfebf2; }
.allocation-row .field { margin: 0; }
.allocation-remove { margin-bottom: 3px; }
.percentage-input { display: flex; align-items: center; }
.percentage-input input { border-radius: 10px 0 0 10px !important; }
.percentage-input span { display: grid; min-height: 44px; padding: 0 10px; place-items: center; border: 1px solid #cad6e2; border-left: 0; border-radius: 0 10px 10px 0; color: var(--muted); background: white; }
.allocation-total { margin-top: 9px; color: var(--green-600); font-size: .78rem; font-weight: 800; text-align: right; }
.allocation-total.invalid { color: var(--red-600); }

.treasury-accounts-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.treasury-account-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 28px rgba(20,47,72,.045); }
.treasury-account-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.treasury-account-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--white); background: linear-gradient(145deg, var(--navy-800), var(--blue-600)); font-family: "Manrope", sans-serif; font-weight: 800; }
.treasury-account-card p { margin-bottom: 5px; color: var(--muted); font-size: .74rem; }
.treasury-account-card h3 { margin-bottom: 5px; font-size: 1rem; }
.treasury-account-number { display: block; min-height: 20px; color: var(--muted); font-size: .78rem; }
.treasury-account-balance { display: block; margin: 20px 0 18px; color: var(--navy-900); font-family: "Manrope", sans-serif; font-size: 1.7rem; }
.money-in { color: var(--green-600); }
.money-out { color: var(--red-600); }
.inline-actions { display: flex; gap: 6px; margin-top: 8px; }
.inline-actions .btn { min-height: 32px; padding: 6px 9px; font-size: .72rem; }
.reconciliation-summary { display: grid; grid-template-columns: 1.35fr repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.reconciliation-summary .card-body { display: grid; gap: 7px; }
.reconciliation-summary strong { color: var(--navy-900); font-family: "Manrope", sans-serif; font-size: 1.5rem; }
.reconciliation-progress { overflow: hidden; height: 7px; border-radius: 99px; background: #e6edf3; }
.reconciliation-progress i { display: block; height: 100%; border-radius: inherit; background: var(--green-500); }
.aging-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.aging-grid .kpi { min-height: 130px; }
.flow-strip { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 14px 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; color: var(--navy-800); background: var(--white); font-size: .8rem; font-weight: 800; white-space: nowrap; }
.flow-strip span { padding: 7px 10px; border-radius: 8px; background: var(--sky-100); }
.flow-strip i { color: var(--green-600); font-style: normal; }
.document-lines-panel { margin: 8px 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #f8fbfd; }
.document-line { display: grid; grid-template-columns: 1.25fr 1.5fr .6fr .75fr .65fr .55fr 38px; align-items: end; gap: 9px; padding: 12px 0; border-top: 1px solid #dfe9ef; }
.document-line .field { margin: 0; }
.document-line .line-remove { margin-bottom: 3px; }
.check-field { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 22px 0 17px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .82rem; font-weight: 700; }
.check-field input { width: 18px; height: 18px; }
.form-note { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; color: #31586c; background: var(--sky-100); font-size: .8rem; line-height: 1.5; }
.import-guide { display: grid; gap: 7px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; }
.import-guide span { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.import-guide .btn { justify-self: start; margin-top: 5px; }

.cash-chart { display: grid; grid-template-columns: repeat(13,minmax(48px,1fr)); align-items: end; gap: 9px; min-height: 190px; overflow-x: auto; padding: 16px 4px 4px; }
.cash-week { display: grid; gap: 5px; min-width: 48px; color: var(--muted); font-size: .66rem; text-align: center; }
.cash-week > strong { color: var(--ink); font-size: .72rem; }
.cash-bars { display: flex; align-items: end; justify-content: center; gap: 4px; height: 116px; border-bottom: 1px solid var(--line); }
.cash-bars i { display: block; width: 14px; min-height: 3px; border-radius: 4px 4px 0 0; }
.cash-in { background: var(--green-500); }
.cash-out { background: var(--red-600); opacity: .76; }
.management-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 24px 27px; border-radius: var(--radius); color: white; background: linear-gradient(125deg,var(--navy-900),var(--blue-600)); box-shadow: var(--shadow); }
.management-hero .eyebrow { color: #bfe6f4; }
.management-hero > div > strong { display: block; margin: 5px 0; font-family: "Manrope",sans-serif; font-size: 2.5rem; }
.management-hero p { margin: 0; color: #d9edf5; }
.health-ring { display: grid; width: 96px; height: 96px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: conic-gradient(var(--green-500) calc(var(--score)*1%),rgba(255,255,255,.17) 0); }
.health-ring::before { content: ""; grid-area: 1/1; width: 70px; height: 70px; border-radius: 50%; background: var(--navy-800); }
.health-ring span { z-index: 1; grid-area: 1/1; font-weight: 800; }
.firm-banner { display: grid; grid-template-columns: 1.5fr repeat(2,minmax(170px,.6fr)); align-items: center; gap: 18px; margin-bottom: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg,#fff,#edf8f5); }
.firm-banner h3 { margin: 12px 0 5px; }
.firm-banner p,.firm-banner span { margin: 0; color: var(--muted); font-size: .78rem; }
.firm-banner > div > strong { display: block; margin-top: 7px; color: var(--navy-900); font-family: "Manrope",sans-serif; font-size: 1.45rem; }
.automation-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.automation-card { min-height: 170px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 8px 28px rgba(20,47,72,.04); }
.automation-card > div { display: flex; align-items: center; justify-content: space-between; }
.automation-bolt { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: #fff5d8; }
.automation-card h3 { margin: 17px 0 7px; font-size: .95rem; }
.automation-card p,.automation-card small { color: var(--muted); font-size: .76rem; line-height: 1.45; }
.quality-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.quality-card { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--line); border-left: 4px solid var(--amber-600); border-radius: 12px; background: white; }
.quality-card.passed { border-left-color: var(--green-500); }
.quality-card.critical { border-left-color: var(--red-600); }
.quality-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: white; background: var(--amber-600); font-weight: 900; }
.quality-card.passed .quality-icon { background: var(--green-500); }
.quality-card.critical .quality-icon { background: var(--red-600); }
.quality-card small { color: var(--muted); font-size: .66rem; text-transform: uppercase; }
.quality-card h3 { margin: 3px 0 4px; font-size: .9rem; }
.quality-card p { margin: 0; color: var(--muted); font-size: .76rem; }
.check-list { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
.check-list label { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.check-list input { width: 17px; height: 17px; }

.access-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); }
.access-toolbar .field { min-width: min(390px,100%); margin: 0; }
.access-tabs { display: flex; gap: 5px; padding: 4px; border-radius: 11px; background: #edf2f6; }
.access-tabs button { min-height: 35px; padding: 7px 14px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-weight: 800; }
.access-tabs button.active { color: var(--navy-800); background: var(--white); box-shadow: 0 3px 10px rgba(20,47,72,.08); }
.access-kpis .kpi { min-height: 125px; }
.access-person { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.access-person .avatar { flex: 0 0 auto; }
.access-person div { display: grid; gap: 3px; }
.access-person small { color: var(--muted); }
.access-role-select { min-width: 155px; min-height: 38px; padding: 6px 9px; }
.access-actions { flex-wrap: nowrap; min-width: max-content; }
.access-actions .btn { min-height: 34px; padding: 6px 9px; font-size: .7rem; }
.access-remove { color: var(--red-600); }
.security-note { padding: 7px 10px; border-radius: 999px; color: #12604f; background: var(--green-100); font-size: .69rem; font-weight: 800; }
.company-access-list { display: grid; gap: 8px; max-height: 220px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.company-access-list label { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 9px; background: var(--white); cursor: pointer; }
.company-access-list input { width: 18px; height: 18px; }
.company-access-list span { display: grid; gap: 3px; }
.company-access-list small { color: var(--muted); }
.access-invite-note { margin: 16px 0 0; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(4,18,31,.58); backdrop-filter: blur(3px); }
.modal { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 20px; background: var(--white); box-shadow: 0 28px 90px rgba(0,0,0,.32); }
.modal.small-modal { width: min(520px, 100%); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 19px 22px; border-bottom: 1px solid var(--line); background: var(--white); }
.modal-head h2 { margin: 0; font-size: 1.18rem; }
.modal-body { padding: 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 17px 22px; border-top: 1px solid var(--line); background: #fbfcfd; }

.toast-region { position: fixed; z-index: 80; right: 20px; bottom: 20px; display: grid; gap: 9px; width: min(380px, calc(100vw - 40px)); }
.toast { padding: 14px 16px; border-left: 4px solid var(--green-500); border-radius: 10px; color: var(--ink); background: var(--white); box-shadow: var(--shadow); animation: slideIn .22s ease-out; }
.toast.error { border-left-color: var(--red-600); }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } }

.setup-callout { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; padding: 15px 17px; border: 1px solid #f1d59e; border-radius: 12px; color: #6d5018; background: #fff9eb; font-size: .84rem; line-height: 1.5; }
.setup-callout strong { display: block; margin-bottom: 3px; }
.license-callout { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 20px; padding: 15px 17px; border: 1px solid #f0c4bd; border-radius: 12px; color: #7b2f25; background: #fff4f2; font-size: .84rem; line-height: 1.5; }
.license-callout > span { display: grid; flex: 0 0 24px; height: 24px; place-items: center; border-radius: 50%; color: #fff; background: var(--red-600); font-weight: 800; }
.license-callout strong { display: block; margin-bottom: 3px; }
.nav-subbutton.locked { color: #8b97a3; }
.nav-subbutton.locked span { margin-left: auto; font-size: .68rem; }
.plan-strip { display: grid; grid-template-columns: repeat(4,minmax(180px,1fr)); gap: 12px; margin: 18px 0; overflow-x: auto; }
.plan-strip article { display: grid; gap: 6px; min-width: 180px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.plan-strip article small { color: var(--muted); font-weight: 700; text-transform: uppercase; }
.plan-strip article strong { color: var(--navy-800); }
.plan-strip article span { color: var(--muted); font-size: .75rem; }
.plan-strip article .btn { justify-self: start; min-height: 32px; padding: 5px 8px; }
.license-actions { flex-wrap: nowrap; min-width: max-content; }
.license-actions .btn { min-height: 34px; padding: 6px 9px; font-size: .7rem; }
.compliance-callout { margin-top: 18px; border-left: 4px solid #d89a21; }
.compliance-callout.ready { border-left-color: var(--green-500); }
.compliance-callout .card-body { display: grid; gap: 6px; }
.compliance-callout p { margin: 0; color: var(--muted); }
.validation-box { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f7fafc; }
.validation-box ul { margin: 8px 0 0; padding-left: 20px; color: var(--red-600); }
.mobile-bottom-nav { display: none; }

.pipeline-board { display: grid; grid-template-columns: repeat(7,minmax(235px,1fr)); gap: 13px; overflow-x: auto; padding: 2px 2px 15px; scroll-snap-type: x proximity; }
.pipeline-column { min-height: 310px; border: 1px solid var(--line); border-radius: 15px; background: #eef3f7; scroll-snap-align: start; }
.pipeline-column > header { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--navy-800); font-size: .8rem; font-weight: 800; }
.pipeline-column > header strong { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--white); font-size: .72rem; }
.pipeline-cards { display: grid; align-content: start; gap: 10px; padding: 10px; }
.opportunity-card { padding: 14px; border: 1px solid #d7e1e9; border-radius: 12px; background: var(--white); box-shadow: 0 7px 18px rgba(20,47,72,.06); }
.opportunity-card.stale { border-left: 4px solid var(--amber-600); }
.opportunity-card h3 { margin: 4px 0 5px; font-size: .88rem; line-height: 1.35; }
.opportunity-card p { margin-bottom: 10px; color: var(--muted); font-size: .75rem; }
.opportunity-value { color: var(--green-600); font-size: .78rem; font-weight: 800; }
.opportunity-meta { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 9px; color: var(--muted); font-size: .69rem; }
.follow-up-warning { display: inline-block; margin-bottom: 9px; padding: 4px 7px; border-radius: 999px; color: #774900; background: #fff1c9; font-size: .66rem; font-weight: 800; }
.field.compact { gap: 4px; margin-bottom: 10px; }
.field.compact span { color: var(--muted); font-size: .68rem; font-weight: 700; }
.field.compact select { min-height: 34px; padding: 5px 7px; font-size: .74rem; }
.opportunity-card .inline-actions .btn { min-height: 34px; padding: 6px 9px; font-size: .7rem; }
.pipeline-empty { padding: 18px 8px; color: var(--muted); text-align: center; font-size: .75rem; }

@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .treasury-accounts-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .reconciliation-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .aging-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .document-line { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .form-grid.three { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .span-3 { grid-column: span 2; }
}

@media (max-width: 840px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { min-height: 410px; padding: 34px; }
  .auth-message h1 { font-size: clamp(2.5rem, 12vw, 4.4rem); }
  .auth-panel { padding: 25px 18px 42px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); width: 258px; transition: transform .22s ease; box-shadow: 18px 0 60px rgba(0,0,0,.22); }
  .sidebar.open { transform: translateX(0); }
  .mobile-toggle { display: inline-grid; place-items: center; }
  .dashboard-grid, .report-grid, .cost-structure-grid, .budget-head, .inventory-catalog-grid { grid-template-columns: 1fr; }
  .treasury-accounts-grid { grid-template-columns: 1fr; }
  .automation-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .plan-strip { grid-template-columns: repeat(2,minmax(180px,1fr)); }
  .firm-banner { grid-template-columns: 1fr 1fr; }
  .firm-banner > div:first-child { grid-column: span 2; }
  .content { padding-bottom: 92px; }
  .mobile-bottom-nav { position: fixed; z-index: 18; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4,1fr); min-height: 64px; padding: 6px 8px max(6px,env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); box-shadow: 0 -8px 26px rgba(20,47,72,.09); }
  .mobile-bottom-nav button { display: grid; place-items: center; gap: 2px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: .67rem; font-weight: 700; }
  .mobile-bottom-nav button span { font-size: 1rem; }
  .mobile-bottom-nav button.active { color: var(--green-600); background: var(--green-100); }
}

@media (max-width: 620px) {
  .content { padding-top: 23px; }
  .topbar { padding: 10px 14px; }
  .company-select { min-width: 0; max-width: 170px; }
  .user-chip span { display: none; }
  .page-head { display: grid; }
  .page-actions .btn { flex: 1; }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi { min-height: 126px; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
  .quick-actions { grid-template-columns: 1fr; }
  .allocation-head { align-items: stretch; flex-direction: column; }
  .allocation-row { grid-template-columns: 1fr; padding: 14px 0; }
  .allocation-remove { justify-self: end; margin: 0; }
  .reconciliation-summary { grid-template-columns: 1fr; }
  .aging-grid, .document-line { grid-template-columns: 1fr; }
  .automation-grid, .quality-grid, .firm-banner { grid-template-columns: 1fr; }
  .plan-strip { grid-template-columns: 1fr; }
  .firm-banner > div:first-child { grid-column: span 1; }
  .cost-guide .card-body { grid-template-columns: 1fr; }
  .cost-guide p { grid-column: 1; }
  .auth-card { padding: 28px 22px; }
  .access-toolbar { align-items: stretch; flex-direction: column; }
  .access-tabs { width: 100%; }
  .access-tabs button { flex: 1; }
  .report-toolbar { align-items: stretch; flex-direction: column; }
  .report-toolbar > div:last-child { text-align: left; }
  .branding-card { align-items: flex-start; flex-direction: column; }
  .vat-book-heading, .official-source-card { align-items: flex-start; flex-direction: column; }
  .tax-book-tabs { padding: 0 14px; }
  .vat-book-summary { grid-template-columns: 1fr; padding: 14px; }
  .official-links { justify-content: flex-start; }
  .vat-signature-preview { gap: 20px; }
}

@media print {
  .sidebar, .topbar, .page-actions, .setup-callout, .table-tools, .btn, .mobile-bottom-nav, .breadcrumb { display: none !important; }
  .app-shell { display: block; }
  .content { padding: 0; }
  .card, .table-card, .report-card { box-shadow: none; break-inside: avoid; }
  body { background: white; }
}
/* Statutory worksheets and financial statements */
.statutory-note{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.statutory-workpaper{border-top:1px solid var(--border,#dbe1e9);padding:16px 0}.statutory-workpaper summary{cursor:pointer;line-height:1.6}.statutory-sources{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px 24px}.statutory-sources a{overflow-wrap:anywhere}.statement-identity{margin-bottom:18px}.statement-identity p{margin:6px 0}.statutory-footer{margin-top:18px}.statutory-calculation{margin-top:16px;padding:16px;border:1px solid #dbe1e9;border-radius:12px}.statutory-form .field{min-width:0}.statutory-form input,.statutory-form select,.statutory-form textarea{max-width:100%}.statutory-form label{overflow-wrap:anywhere}.statutory-form textarea{min-height:110px}@media(max-width:700px){.report-toolbar{flex-wrap:wrap;gap:12px}.tabs{overflow-x:auto;max-width:100%;flex-wrap:wrap}.statutory-sources{grid-template-columns:1fr}.statutory-form .form-grid{grid-template-columns:1fr}.statutory-calculation{padding:10px}}@media print{.report-toolbar,.tabs,.statutory-footer button,[data-edit-note],[data-classify-cash],[data-new-note]{display:none!important}.statement-identity,.table-card,.card{box-shadow:none!important;break-inside:avoid}.statutory-note{white-space:pre-wrap}}
@media print{.balance-classification-controls{display:none!important}}

/* Financial reports share one continuous sheet, on screen and on paper. */
.financial-report { max-width: 1060px; margin: 0 auto; }
.statement-tabs { margin-bottom: 0; }
.statement-toolbar { margin: 14px 0 22px; color: var(--muted); font-size: .84rem; justify-content: space-between; }
.statement-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.statement-toolbar input { accent-color: var(--green-600); width: 16px; height: 16px; }
.financial-paper { max-width: 960px; margin: 0 auto; padding: 40px 48px 32px; background: #fff; border: 1px solid #dce3e9; border-radius: 4px; box-shadow: 0 6px 24px rgba(20,47,72,.045); color: #202d39; }
.financial-paper .statement-identity { margin: 0 0 24px; }
.statement-eyebrow { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 13px; margin-bottom: 24px; border-bottom: 2px solid #133e50; font-size: .67rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #446170; }
.statement-eyebrow span { font-weight: 500; letter-spacing: .06em; }
.financial-paper .statement-company { margin: 0 0 8px; font-size: .95rem; font-weight: 700; }
.financial-paper .statement-identity h2 { margin: 0 0 10px; font-size: 1.6rem; line-height: 1.25; letter-spacing: -.035em; color: #123344; }
.financial-paper .statement-period { margin: 0 0 4px; font-size: .86rem; }
.financial-paper .statement-comparative, .financial-paper .statement-registration { margin: 4px 0; color: #5c6873; font-size: .76rem; }
.financial-paper .statement-registration { margin-top: 12px; }
.statement-meta { display: flex; justify-content: space-between; gap: 10px 22px; flex-wrap: wrap; border-top: 1px solid #e1e6eb; margin-top: 20px; padding-top: 10px; color: #586776; font-size: .67rem; }
.statement-table-wrap { overflow-x: auto; }
.statement-table { width: 100%; min-width: 520px; table-layout: fixed; border-collapse: collapse; font-size: .83rem; line-height: 1.4; }
.statement-table col.statement-concept { width: 54%; }
.statement-table col:not(.statement-concept) { width: 23%; }
.statement-table thead th { background: #f3f6f8; color: #334b5b; padding: 10px 8px; text-align: right; border-bottom: 1px solid #a3b2bd; font-weight: 700; font-size: .76rem; text-transform: none; letter-spacing: 0; }
.statement-table thead th:first-child { text-align: left; }
.statement-table thead small { display: block; margin-top: 3px; font-size: .64rem; color: #5c6873; font-weight: 400; }
.statement-table tbody th, .statement-table tbody td { padding: 7px 8px; border: 0; background: transparent; vertical-align: top; }
.statement-table tbody th { text-align: left; font-weight: 400; font-size: inherit; color: inherit; text-transform: none; letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; }
.statement-table tbody td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.statement-table tbody tr:hover { background: transparent; }
.statement-table .statement-section th { padding: 20px 8px 7px; color: #183c4d; font-weight: 700; font-size: .82rem; letter-spacing: .03em; text-transform: uppercase; break-after: avoid; }
.statement-table .statement-group th { padding: 10px 8px 5px; font-weight: 700; }
.statement-table .statement-detail th { padding-left: 20px; }
.statement-account-code { display: inline-block; color: #77828b; font-size: .7rem; margin-right: 8px; }
.statement-table .statement-subtotal th, .statement-table .statement-subtotal td { padding-top: 9px; padding-bottom: 10px; font-weight: 700; }
.statement-table .statement-subtotal td { border-top: 1px solid #c2cbd2; }
.statement-table .statement-total th, .statement-table .statement-total td { font-weight: 700; border-top: 1px solid #657a88; padding-top: 10px; padding-bottom: 12px; }
.statement-table .statement-grand-total th, .statement-table .statement-grand-total td { font-weight: 700; border-top: 1px solid #294653; border-bottom: 3px double #294653; padding-top: 12px; padding-bottom: 12px; color: #133e50; background: #f3f7f7; }
.statement-review { margin-top: 22px; }
.statement-check { margin: 5px 0; color: #68747e; font-size: .71rem; line-height: 1.55; }
.statement-warning { color: #8a5316; }
.financial-paper .statutory-footer { margin-top: 20px; padding-top: 12px; border-top: 1px solid #dbe2e7; color: #68747e; font-size: .67rem; line-height: 1.55; }
.financial-paper .statutory-footer p { margin: 0 0 5px; }
.financial-paper .statutory-footer p:first-child { font-weight: 700; }
.statement-screen-controls { max-width: 960px; margin: 22px auto; }
.statement-management { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .85rem; }
.statement-management select { width: auto; max-width: 100%; }
.statement-controls { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 18px; }
.statement-controls summary { cursor: pointer; font-weight: 700; font-size: .87rem; }
.statement-controls summary span { display: inline-block; margin-left: 8px; color: var(--muted); font-size: .75rem; font-weight: 400; }
.statement-controls[open] summary { margin-bottom: 18px; }
.statement-notes-year + .statement-notes-year { margin-top: 32px; }
.statement-notes-year > h2 { padding-bottom: 10px; border-bottom: 1px solid #a3b2bd; font-size: 1rem; color: #183c4d; break-after: avoid; }
.statement-note { margin: 24px 0; }
.statement-note-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; break-after: avoid; }
.statement-note-heading h3 { margin: 0 0 5px; font-size: .91rem; }
.statement-note-category { display: block; margin-bottom: 10px; color: #68747e; font-size: .7rem; break-after: avoid; }
.statement-note .statutory-note { margin: 0; font-size: .83rem; line-height: 1.75; orphans: 3; widows: 3; }
.statement-empty { color: #68747e; font-size: .83rem; }
.financial-print-document { padding: 24px; }
.financial-print-document .financial-paper { margin-bottom: 24px; }
.statement-print-actions { max-width: 960px; margin: 0 auto 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: .85rem; }
@media (max-width: 700px) {
 .financial-paper { padding: 24px 18px; }
 .financial-paper .statement-identity h2 { font-size: 1.3rem; }
 .statement-eyebrow { font-size: .61rem; margin-bottom: 20px; }
 .statement-toolbar { align-items: flex-start; }
 .statement-meta { gap: 5px; flex-direction: column; }
 .statement-print-actions { align-items: flex-start; flex-direction: column; }
 .financial-print-document { padding: 12px; }
}
@media print {
 @page { size: letter; margin: 14mm 16mm; }
 .financial-reports-page > .page-head, .financial-reports-page > .license-callout, .statement-screen-controls, .statement-print-actions { display: none !important; }
 .financial-report, .financial-print-document, .financial-reports-page { max-width: none; margin: 0; padding: 0; }
 .financial-paper, .financial-print-document .financial-paper { max-width: none; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; font-family: Arial, sans-serif; }
 .financial-print-document .financial-paper + .financial-paper { break-before: page; }
 .financial-paper h2, .financial-paper h3 { font-family: Arial, sans-serif; }
 .financial-paper .statement-identity { margin-bottom: 12px; break-inside: avoid; }
 .statement-eyebrow { margin-bottom: 8px; padding-bottom: 4px; font-size: 7pt; }
 .financial-paper .statement-company { margin-bottom: 4px; font-size: 11pt; }
 .financial-paper .statement-identity h2 { margin-bottom: 6px; font-size: 17pt; }
 .financial-paper .statement-period { font-size: 9pt; }
 .financial-paper .statement-comparative, .financial-paper .statement-registration { font-size: 8pt; }
 .financial-paper .statement-registration { margin-top: 8px; }
 .statement-meta { margin-top: 8px; padding-top: 7px; font-size: 7pt; }
 .statement-table-wrap { overflow: visible; }
 .statement-table { min-width: 0; font-size: 9pt; }
 .statement-table thead { display: table-header-group; }
 .statement-table tr, .statement-table .statement-row-group { break-inside: avoid; }
 .statement-table thead th { font-size: 8pt; padding: 7px 6px; background: transparent; }
 .statement-table thead small { font-size: 7pt; }
 .statement-table tbody th, .statement-table tbody td { padding: 2px 6px; }
 .statement-table .statement-section th { padding-top: 10px; padding-bottom: 5px; font-size: 9pt; }
 .statement-table .statement-group th { padding-top: 6px; padding-bottom: 4px; }
 .statement-table .statement-section, .statement-table .statement-group { break-after: avoid; }
 .statement-table .statement-detail th { padding-left: 16px; }
 .statement-account-code { font-size: 7pt; }
 .statement-table .statement-subtotal th, .statement-table .statement-subtotal td, .statement-table .statement-total th, .statement-table .statement-total td, .statement-table .statement-grand-total th, .statement-table .statement-grand-total td { padding-top: 4px; padding-bottom: 4px; }
 .statement-table .statement-grand-total th, .statement-table .statement-grand-total td { background: transparent; }
 .statement-table .statement-subtotal, .statement-table .statement-total, .statement-table .statement-grand-total { break-before: avoid; }
 .statement-review { margin-top: 14px; }
 .statement-check { font-size: 7.5pt; color: #454545; }
 .financial-paper .statutory-footer { font-size: 7pt; margin-top: 14px; break-inside: avoid; }
 .statement-note { margin: 18px 0; }
 .statement-note .statutory-note { font-size: 9pt; }
 .statement-note-heading h3 { font-size: 10pt; }
 .statement-note-category { font-size: 8pt; }
}

/* Financial reporting and per-company controls */
.insight-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:22px 0}.insight-card{min-width:0}.insight-card svg{width:100%;height:auto;display:block}.insight-legend{display:flex;gap:18px;font-size:12px;flex-wrap:wrap}.insight-legend span{display:flex;align-items:center;gap:7px}.insight-legend i{width:10px;height:10px;border-radius:3px}.chart-data{font-size:12px;margin-top:8px}.chart-data summary{cursor:pointer;color:var(--primary,#2255a4)}.budget-decision{border:0;border-radius:16px;max-width:min(560px,94vw);padding:26px;color:#17324a;box-shadow:0 24px 90px #142c4850}.budget-decision::backdrop{background:#13263cb3}.budget-decision p{line-height:1.65}.company-control-options{display:grid;gap:16px}.account-link{cursor:pointer;color:#2255a4;background:transparent;border:0;font:inherit;text-align:left;padding:0}.account-link:hover{text-decoration:underline}.report-signatures{display:flex;gap:24px;margin-top:38px}.report-signatures span{flex:1;text-align:center;border-top:1px solid #98a5b5;padding-top:8px}@media(max-width:800px){.insight-grid{grid-template-columns:1fr}}@media print{.insight-card{break-inside:avoid}.chart-data{display:none}}


/* Unified R&R owner console */
.rr-console-tabs{margin:18px 0;overflow-x:auto}.rr-console-tabs .tab{white-space:nowrap}
.rr-console-filters{display:flex;gap:16px;align-items:end;margin:0 0 18px}.rr-console-filters .field{flex:1;max-width:540px}
.rr-company-grid{align-items:stretch}.rr-company-card .card-head{align-items:start}.rr-company-facts{margin:0 0 18px}.rr-company-facts>div{display:grid;grid-template-columns:100px 1fr;gap:10px;padding:10px 0;border-bottom:1px solid var(--border,#e4e8ed)}.rr-company-facts dt{color:var(--muted,#64748b);font-size:12px}.rr-company-facts dd{margin:0;overflow-wrap:anywhere}.rr-company-facts dd .badge{display:block;width:fit-content;margin-top:6px}
.rr-memberships{min-width:320px;max-width:620px}.rr-membership{padding:12px 0;border-bottom:1px solid var(--border,#e4e8ed)}.rr-membership:last-child{border-bottom:0}.rr-membership .inline-actions{flex-wrap:wrap;margin-top:8px}.rr-account-actions{display:grid;gap:8px;min-width:160px}.rr-permission-grid{margin:16px 0}.rr-permission-grid input{width:18px;height:18px;accent-color:#0f766e}.rr-permission-grid th{font-size:11px;white-space:normal}.rr-permission-grid th:first-child{min-width:130px}.rr-permission-grid td{text-align:center}.table-card details pre{max-width:420px;max-height:240px;overflow:auto;white-space:pre-wrap;font-size:11px}.modal:has(#company-profile-form){max-width:1100px}
@media(max-width:700px){.rr-console-filters{display:grid}.rr-company-facts>div{grid-template-columns:90px 1fr}.rr-console-tabs .tab{padding:10px 14px}.rr-memberships{min-width:260px}}
