:root {
  color-scheme: light;
  --navy-950: #081d39;
  --navy-900: #0d2a4e;
  --navy-800: #123a68;
  --blue-700: #1268c4;
  --blue-600: #1f7ee6;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --gold-600: #b7791f;
  --rose-700: #be123c;
  --ink: #172033;
  --muted: #647084;
  --line: #d8e0ea;
  --line-strong: #b7c4d6;
  --surface: #ffffff;
  --surface-soft: #f5f8fb;
  --surface-blue: #eaf3ff;
  --surface-green: #e9f8f2;
  --surface-gold: #fff7e6;
  --shadow: 0 18px 48px rgba(8, 29, 57, 0.12);
  --radius: 8px;
  --header-height: 74px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

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

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

th {
  color: var(--navy-900);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

td {
  color: #26364d;
}

canvas {
  width: 100%;
  height: 220px;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 5vw;
  border-bottom: 1px solid rgba(216, 224, 234, 0.84);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.brand-mark,
.footer-brand {
  position: relative;
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-mark img {
  width: clamp(150px, 20vw, 220px);
  height: 52px;
  object-fit: contain;
}

.footer-brand img {
  width: 230px;
  height: 86px;
  object-fit: contain;
}

.brand-mark strong,
.footer-brand strong {
  display: block;
  color: var(--navy-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  font-weight: 700;
}

.brand-mark small,
.footer-brand small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.brand-mark span,
.footer-brand span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--navy-900);
  font-size: 0.94rem;
  font-weight: 700;
}

.public-nav a {
  white-space: nowrap;
}

.nav-login {
  color: var(--blue-700);
}

.nav-toggle {
  display: none;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 4px;
  background: currentColor;
}

.button,
button,
input[type="file"]::file-selector-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--blue-700);
  color: #fff;
}

.button-primary:hover {
  background: var(--navy-800);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--navy-900);
}

.button-secondary:hover {
  border-color: var(--blue-700);
  color: var(--blue-700);
}

.button-emerald {
  background: var(--emerald-700);
  color: #fff;
}

.button-gold {
  background: var(--gold-600);
  color: #fff;
}

.button-danger {
  background: var(--rose-700);
  color: #fff;
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--navy-900);
}

.icon-button:hover {
  border-color: var(--blue-700);
  color: var(--blue-700);
}

.section {
  padding: 72px 5vw;
}

.section-soft {
  background: var(--surface-soft);
}

.section-blue {
  background: var(--surface-blue);
}

.section-green {
  background: var(--surface-green);
}

.section-navy {
  background: var(--navy-950);
  color: #fff;
}

.section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - var(--header-height));
  padding: 54px 5vw 38px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 248, 251, 0.96)),
    url("assets/mack-accounting-solutions-logo.png") center 26% / min(760px, 76vw) auto no-repeat;
}

.hero-content {
  width: min(1180px, 100%);
  min-height: calc(100vh - var(--header-height) - 92px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 32px;
}

.hero-copy {
  width: min(760px, 100%);
  padding-top: 26vh;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--emerald-700);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.auth-copy h1 {
  margin: 0;
  color: var(--navy-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-title h2,
.page-hero h1,
.panel-title h2,
.module-head h1 {
  margin: 0;
  color: var(--navy-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1.16;
  letter-spacing: 0;
}

.section-title p,
.hero p,
.page-hero p,
.auth-copy p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero p {
  margin: 18px 0 0;
  color: #38506d;
}

.hero-actions,
.action-row,
.form-actions,
.toolbar,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-actions {
  margin-top: 24px;
}

.hero-preview {
  width: min(1060px, 100%);
  align-self: end;
  margin: 0 auto;
  border: 1px solid rgba(183, 196, 214, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--navy-950);
  color: #fff;
  font-weight: 800;
}

.preview-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.18);
  color: #baf7db;
  font-size: 0.78rem;
  font-weight: 900;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr;
  gap: 14px;
  padding: 16px;
}

.preview-metric,
.stat-card,
.feature-card,
.pricing-card,
.testimonial-card,
.faq-item,
.panel,
.auth-card,
.mini-card,
.doc-tile,
.report-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.preview-metric {
  padding: 14px;
}

.preview-metric span,
.stat-card span,
.mini-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.preview-metric strong,
.stat-card strong,
.mini-card strong {
  display: block;
  margin-top: 6px;
  color: var(--navy-950);
  font-size: 1.35rem;
  line-height: 1.1;
}

.preview-chart {
  display: grid;
  height: 126px;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f6fbff);
}

.preview-chart span {
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--blue-600), var(--emerald-600));
}

.preview-list {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.preview-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #31445d;
  font-size: 0.88rem;
  font-weight: 700;
}

.logo-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 0;
  color: #5a6980;
  font-size: 0.88rem;
  font-weight: 800;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.pricing-card,
.testimonial-card,
.faq-item,
.panel,
.report-tile {
  padding: 22px;
}

.feature-card h3,
.pricing-card h3,
.testimonial-card h3,
.faq-item h3,
.report-tile h3,
.doc-tile h3 {
  margin: 0 0 8px;
  color: var(--navy-900);
  font-size: 1.02rem;
}

.feature-card p,
.pricing-card p,
.testimonial-card p,
.faq-item p,
.report-tile p,
.doc-tile p {
  margin: 0;
  color: var(--muted);
}

.feature-icon,
.status-dot {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-blue);
  color: var(--blue-700);
  font-weight: 900;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin: 0;
  border-radius: 999px;
  background: var(--emerald-600);
}

.pricing-card {
  position: relative;
  display: flex;
  min-height: 430px;
  flex-direction: column;
}

.pricing-card.featured {
  border-color: var(--blue-700);
  box-shadow: 0 16px 36px rgba(18, 104, 196, 0.14);
}

.pricing-hero {
  background: linear-gradient(180deg, #f8fbff, #eef7ff);
}

.price {
  margin: 18px 0;
  color: var(--navy-950);
  font-size: 2rem;
  font-weight: 900;
}

.price small {
  color: var(--muted);
  font-size: 0.9rem;
}

.annual-price,
.includes-label {
  margin: -8px 0 14px;
  color: var(--navy-900);
  font-weight: 900;
}

.best-for {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
  font-size: 0.92rem;
}

.pricing-note {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #33445d;
}

.check-list li::before {
  content: "✓";
  color: var(--emerald-700);
  font-weight: 900;
}

.pricing-card .button {
  margin-top: auto;
}

.billing-toggle {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.billing-toggle button {
  min-width: 112px;
  padding: 10px 14px;
  border-color: transparent;
  background: transparent;
  color: var(--navy-900);
}

.billing-toggle button.active {
  background: var(--blue-700);
  color: #fff;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--blue-700);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.badge.green {
  background: var(--surface-green);
  color: var(--emerald-700);
}

.badge.gold {
  background: var(--surface-gold);
  color: var(--gold-600);
}

.badge.red {
  background: #fff1f2;
  color: var(--rose-700);
}

.steps {
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 54px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--navy-950);
  color: #fff;
  font-weight: 900;
}

.page-hero {
  padding: 74px 5vw 42px;
  background: linear-gradient(180deg, #f8fbff, #fff);
}

.page-hero .section-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 0.42fr);
  align-items: center;
  gap: 38px;
}

.page-logo {
  justify-self: end;
  max-width: 380px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 14px 34px rgba(8, 29, 57, 0.08);
}

.page-hero .section-inner > * {
  min-width: 0;
  max-width: 100%;
}

.auth-layout {
  display: grid;
  min-height: calc(100vh - var(--header-height));
  grid-template-columns: minmax(0, 0.95fr) minmax(390px, 0.65fr);
  gap: 42px;
  padding: 56px 5vw;
  background:
    linear-gradient(90deg, rgba(8, 29, 57, 0.94), rgba(13, 42, 78, 0.84)),
    url("assets/mack-accounting-solutions-logo.png") left 8% center / min(560px, 46vw) auto no-repeat;
}

.auth-copy {
  align-self: end;
  color: #fff;
}

.auth-copy h1,
.auth-copy p {
  color: #fff;
}

.auth-card {
  width: min(520px, 100%);
  justify-self: end;
  padding: 28px;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.label {
  color: var(--navy-900);
  font-size: 0.82rem;
  font-weight: 900;
}

.field input,
.field select,
.field textarea,
.inline-input,
.filters input,
.filters select {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 98px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.42;
}

.checkbox-row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--blue-700);
}

.checkbox-row span {
  display: block;
  min-width: 0;
  color: var(--ink);
}

.app-shell {
  display: grid;
  min-height: calc(100vh - var(--header-height));
  grid-template-columns: 278px minmax(0, 1fr);
  background: #f7f9fc;
}

.app-sidebar {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--navy-950);
  color: #dce8f7;
}

.business-switcher {
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.business-switcher label {
  display: block;
  margin-bottom: 8px;
  color: #aabbd1;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.business-switcher select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: #102b4f;
  color: #fff;
}

.app-nav {
  display: grid;
  gap: 4px;
  padding: 14px 10px;
}

.app-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: #dce8f7;
  font-size: 0.92rem;
  font-weight: 800;
}

.app-nav a:hover,
.app-nav a.active {
  background: rgba(31, 126, 230, 0.22);
  color: #fff;
}

.app-nav .nav-section {
  margin: 14px 10px 4px;
  color: #8ea6c2;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.app-main {
  min-width: 0;
}

.app-topbar {
  position: sticky;
  z-index: 20;
  top: var(--header-height);
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.app-topbar h1 {
  margin: 0;
  color: var(--navy-950);
  font-size: 1.18rem;
}

.app-topbar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.app-content {
  padding: 24px;
}

.module-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.module-head p {
  max-width: 800px;
  margin: 8px 0 0;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}

.stat-card {
  min-width: 0;
  min-height: 116px;
  padding: 16px;
}

.stat-card strong {
  overflow-wrap: anywhere;
}

.stat-card small {
  color: var(--muted);
  font-weight: 800;
}

.stat-card.positive strong {
  color: var(--emerald-700);
}

.stat-card.warning strong {
  color: var(--gold-600);
}

.stat-card.danger strong {
  color: var(--rose-700);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  min-width: 0;
  box-shadow: 0 8px 20px rgba(8, 29, 57, 0.05);
}

.panel.compact {
  padding: 16px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title h2 {
  font-size: 1.2rem;
}

.panel-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-actions .button {
  min-width: 0;
  width: 100%;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fbfcfe;
  color: var(--muted);
  text-align: center;
}

.filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tab {
  min-height: 38px;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--navy-900);
}

.tab.active {
  background: var(--navy-900);
  color: #fff;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kpi-list {
  display: grid;
  gap: 10px;
}

.kpi-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.kpi-list span {
  color: var(--muted);
}

.kpi-list strong {
  color: var(--navy-950);
}

.ledger-balance {
  font-weight: 900;
}

.journal-lines {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.journal-line {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 120px 42px;
  gap: 10px;
}

.journal-total {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin: 12px 0;
  color: var(--navy-900);
  font-weight: 900;
}

.invoice-builder {
  display: grid;
  gap: 16px;
}

.line-items {
  display: grid;
  gap: 10px;
}

.invoice-line,
.receipt-line {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 96px 118px 118px 42px;
  gap: 10px;
  align-items: end;
}

.line-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.line-field span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.line-field output {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--navy-950);
  font-weight: 900;
}

.invoice-summary {
  width: min(360px, 100%);
  margin-left: auto;
}

.invoice-summary div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.invoice-summary .total {
  color: var(--navy-950);
  font-size: 1.12rem;
  font-weight: 900;
}

.workflow-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.workflow-step {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 20px rgba(8, 29, 57, 0.05);
}

.workflow-step span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--navy-900);
  color: #fff;
  font-weight: 900;
}

.workflow-step h2 {
  margin: 12px 0 6px;
  font-size: 1.02rem;
}

.workflow-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.deposit-list {
  display: grid;
  gap: 10px;
}

.deposit-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
}

.deposit-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue-700);
}

.deposit-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.deposit-item strong,
.deposit-item b {
  color: var(--ink);
}

.deposit-item small {
  color: var(--muted);
  font-weight: 800;
}

.split-view {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.45fr);
  gap: 18px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mini-card {
  padding: 14px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.doc-tile {
  padding: 16px;
}

.report-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 18px;
}

.report-menu {
  display: grid;
  gap: 8px;
}

.report-menu button {
  justify-content: flex-start;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--navy-900);
}

.report-menu button.active {
  background: var(--navy-900);
  color: #fff;
}

.statement {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.statement header {
  padding: 26px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.statement h2 {
  margin: 8px 0 0;
  color: var(--navy-950);
  font-family: Georgia, "Times New Roman", serif;
}

.statement-section {
  padding: 18px 26px;
}

.print-logo {
  max-width: 180px;
  max-height: 86px;
  object-fit: contain;
  margin: 0 auto 10px;
}

.print-logo-text {
  color: var(--navy-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 900;
}

.print-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 16px;
}

.print-meta-grid p {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.print-table {
  margin: 16px 0;
  border: 1px solid var(--line);
}

.print-table th,
.print-table td {
  border-right: 1px solid var(--line);
}

.print-table th:last-child,
.print-table td:last-child {
  border-right: 0;
  text-align: right;
}

.print-footer {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.statement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f6;
}

.statement-row.total {
  border-top: 2px solid var(--navy-900);
  border-bottom: 0;
  color: var(--navy-950);
  font-weight: 900;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.permission-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  display: none;
  max-width: min(420px, calc(100vw - 44px));
  padding: 14px 16px;
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--radius);
  background: #ebfff6;
  color: #064e3b;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.toast.show {
  display: block;
}

.modal {
  width: min(760px, calc(100vw - 28px));
  max-height: min(88vh, 900px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(8, 29, 57, 0.56);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 1.3rem;
}

#modalContent {
  padding: 28px;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 34px;
  padding: 46px 5vw 24px;
  border-top: 1px solid var(--line);
  background: #07182f;
  color: #dce8f7;
}

.site-footer p {
  max-width: 420px;
  color: #aabbd1;
}

.site-footer nav {
  display: grid;
  align-content: start;
  gap: 10px;
  font-weight: 800;
}

.site-footer a:hover {
  color: #fff;
}

.footer-brand strong {
  color: #fff;
}

.footer-brand small {
  color: #aabbd1;
}

.copyright {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  margin: 16px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
}

.hide {
  display: none !important;
}

@media (max-width: 1180px) {
  .stat-grid,
  .admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-4,
  .doc-grid,
  .role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
  }

  .public-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    display: none;
    max-height: calc(100vh - var(--header-height));
    overflow: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px 5vw 28px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }

  body.nav-open .public-nav {
    display: flex;
  }

  .public-nav a {
    padding: 13px 0;
  }

  .public-nav .button {
    width: 100%;
  }

  .hero-copy {
    padding-top: 22vh;
  }

  .preview-grid,
  .page-hero .section-inner,
  .auth-layout,
  .app-shell,
  .dashboard-grid,
  .split-view,
  .report-layout,
  .workflow-rail {
    grid-template-columns: 1fr;
  }

  .auth-card {
    justify-self: stretch;
  }

  .app-sidebar {
    position: static;
    height: auto;
  }

  .app-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-nav .nav-section {
    grid-column: 1 / -1;
  }

  .app-topbar {
    top: 0;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .section {
    padding: 48px 20px;
  }

  .site-header {
    padding: 10px 18px;
  }

  .brand-mark img {
    width: 150px;
    height: 46px;
  }

  .hero {
    padding: 40px 20px 24px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 248, 251, 0.96)),
      url("assets/mack-accounting-solutions-logo.png") center 18% / 92vw auto no-repeat;
  }

  .hero-content {
    min-height: calc(100vh - var(--header-height) - 64px);
  }

  .hero-copy {
    padding-top: 24vh;
  }

  .hero h1,
  .page-hero h1,
  .auth-copy h1 {
    font-size: 2rem;
  }

  .section-title {
    display: block;
  }

  .section-title h2,
  .panel-title h2,
  .module-head h1 {
    font-size: 1.55rem;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .stat-grid,
  .mini-grid,
  .doc-grid,
  .role-grid,
  .admin-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hero {
    padding: 50px 20px 32px;
  }

  .page-hero .section-inner {
    width: calc(100vw - 40px);
    max-width: calc(100vw - 40px);
  }

  .auth-layout {
    padding: 40px 20px;
    background:
      linear-gradient(180deg, rgba(8, 29, 57, 0.94), rgba(13, 42, 78, 0.84)),
      url("assets/mack-accounting-solutions-logo.png") center 34px / 82vw auto no-repeat;
  }

  .auth-copy {
    padding-top: 22vh;
  }

  .auth-card {
    padding: 20px;
  }

  .app-content,
  .app-topbar {
    padding: 18px;
  }

  .module-head {
    display: block;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 9px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .table-wrap {
    display: block;
    contain: inline-size;
  }

  .journal-line,
  .invoice-line,
  .receipt-line {
    grid-template-columns: 1fr;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .deposit-item {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .deposit-item b {
    grid-column: 2;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding: 36px 20px 22px;
  }
}

@media print {
  @page {
    margin: 0.5in;
  }

  .site-header,
  .site-footer,
  .app-sidebar,
  .app-topbar,
  .toolbar,
  .tabs,
  .filters,
  .modal-close,
  .button,
  button {
    display: none !important;
  }

  body {
    background: #fff;
  }

  body:has(dialog[open]) > :not(dialog) {
    display: none !important;
  }

  dialog[open].modal {
    position: static;
    display: block;
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  #modalContent {
    padding: 0;
  }

  .app-shell,
  .report-layout,
  .dashboard-grid,
  .split-view {
    display: block;
  }

  .app-content,
  .section,
  .page-hero {
    padding: 0;
  }

  .panel,
  .statement {
    border: 0;
    box-shadow: none;
  }

  .statement {
    max-width: none;
    margin: 0;
    overflow: visible;
  }

  .statement header {
    padding: 0 0 14px;
  }

  .statement-section {
    padding: 0;
  }

  .print-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .print-table th,
  .print-table td {
    padding: 8px;
  }
}
