:root {
  color-scheme: light;
  --bg: #f4f0e8;
  --surface: #fffaf1;
  --surface-strong: #ffffff;
  --ink: #1d2633;
  --muted: #657180;
  --line: #ded6c8;
  --brand: #126d6a;
  --brand-dark: #0d5452;
  --accent: #c45f3c;
  --good: #176b3a;
  --warn: #af4b26;
  --shadow: 0 16px 40px rgba(29, 38, 51, 0.08);
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(18, 109, 106, 0.14), transparent 34%),
    linear-gradient(315deg, rgba(196, 95, 60, 0.12), transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family:
    Outfit, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body[data-view="business"] {
  color-scheme: dark;
  --bg: #111827;
  --surface: rgba(31, 41, 55, 0.58);
  --surface-strong: rgba(17, 24, 39, 0.88);
  --ink: #f9fafb;
  --muted: #9ca3af;
  --line: rgba(107, 114, 128, 0.48);
  --brand: #10b981;
  --brand-dark: #06b6d4;
  --accent: #4ade80;
  --shadow: 0 22px 70px rgba(16, 185, 129, 0.12);
  background:
    radial-gradient(circle at 78% 12%, rgba(6, 182, 212, 0.18), transparent 28%),
    radial-gradient(circle at 17% 82%, rgba(16, 185, 129, 0.14), transparent 28%),
    linear-gradient(135deg, #111827 0%, #111827 48%, rgba(6, 78, 59, 0.34) 100%);
  background-size: 180% 180%;
  animation: gradient-shift 52s ease infinite;
}

body[data-view="personal"] {
  --bg: #ffe9f3;
  --surface: #ffd8e9;
  --surface-strong: #fff2f8;
  --ink: #61133e;
  --muted: #9a4771;
  --line: rgba(219, 112, 164, 0.34);
  --brand: #d63384;
  --brand-dark: #8a1455;
  --accent: #ff7fbc;
  --good: #9b2f6f;
  --warn: #b44b7d;
  --shadow: 10px 10px 24px rgba(176, 75, 123, 0.2), -10px -10px 24px rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.82), transparent 24%),
    radial-gradient(circle at 78% 10%, rgba(255, 128, 188, 0.3), transparent 28%),
    radial-gradient(circle at 75% 84%, rgba(147, 36, 103, 0.18), transparent 34%),
    linear-gradient(135deg, #fff0f7, #ffd3e7 48%, #f8a6cd);
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
}

body[data-view="lobby"] {
  --bg: #151821;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --ink: #f8fafc;
  --muted: #aeb7c5;
  --line: rgba(255, 255, 255, 0.14);
  --brand: #d9468f;
  --brand-dark: #0891b2;
  background:
    radial-gradient(circle at 22% 18%, rgba(217, 70, 143, 0.24), transparent 30%),
    radial-gradient(circle at 78% 76%, rgba(6, 182, 212, 0.2), transparent 28%),
    linear-gradient(135deg, #151821, #202433 55%, #151821);
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  body[data-view="business"] {
    animation: none;
  }
}

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

button {
  cursor: pointer;
}

.front-door {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 24px;
}

body[data-gate="locked"] .front-door,
body[data-gate="choosing"] .front-door {
  display: grid;
}

body[data-gate="locked"] .app-shell,
body[data-gate="choosing"] .app-shell {
  display: none;
}

.front-door-card {
  position: relative;
  width: min(100%, 860px);
  text-align: center;
}

.book-page {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 50px);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)),
    rgba(17, 24, 39, 0.7);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.34),
    inset 10px 0 22px rgba(255, 255, 255, 0.05),
    inset -18px 0 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(24px) saturate(145%);
  animation: panel-enter 360ms ease both;
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.book-cover {
  grid-template-columns: minmax(180px, 0.72fr) minmax(260px, 1fr);
  gap: clamp(18px, 4vw, 38px);
  text-align: left;
}

.book-inside {
  display: none;
}

body[data-gate="choosing"] .book-cover {
  display: none;
}

body[data-gate="choosing"] .book-inside {
  display: grid;
}

.sia-hero {
  display: block;
  width: min(44vw, 310px);
  aspect-ratio: 1;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center 18%;
  filter: drop-shadow(0 28px 34px rgba(0, 0, 0, 0.34)) drop-shadow(0 0 28px rgba(217, 70, 143, 0.24));
  transform: translateY(6px);
}

.sia-dialogue {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  padding: clamp(20px, 3.5vw, 34px);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 54px rgba(0, 0, 0, 0.18);
}

.sia-dialogue::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 52%;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.09);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  transform: rotate(45deg);
}

.front-door-card h1,
.front-door-card h2 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 5.3rem);
  line-height: 0.95;
}

.front-door-card h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 6vw, 4rem);
}

.front-door-card p:not(.eyebrow) {
  max-width: 34rem;
  margin: 18px 0 26px;
  color: #d6dce6;
  line-height: 1.55;
}

.account-choice {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: min(100%, 540px);
  margin-top: 22px;
}

body[data-gate="choosing"] #enterDoorButton {
  display: none;
}

body[data-gate="choosing"] .account-choice {
  display: grid;
}

.account-choice-button {
  min-height: 128px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 18px;
  color: #ffffff;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 18px 48px rgba(0, 0, 0, 0.16);
}

.account-choice-button span,
.account-choice-button strong {
  display: block;
}

.account-choice-button span {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-choice-button strong {
  font-size: 1.2rem;
  line-height: 1.15;
}

.business-choice {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.72), rgba(8, 145, 178, 0.62));
}

.personal-choice {
  background: linear-gradient(135deg, rgba(255, 127, 188, 0.82), rgba(138, 20, 85, 0.72));
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 28px;
  background: #173c43;
  color: #f9f4ec;
}

body[data-view="business"] .sidebar {
  border-right: 1px solid rgba(107, 114, 128, 0.42);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.64), rgba(17, 24, 39, 0.38));
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(140%);
}

body[data-view="personal"] .sidebar {
  border-right: 1px solid rgba(219, 112, 164, 0.34);
  background: linear-gradient(160deg, #ffb7d7, #f772b1 55%, #8f1d5c);
  color: #fff9fc;
  box-shadow: 14px 0 34px rgba(176, 75, 123, 0.22);
}

.sidebar h1,
.workspace h2,
.workspace h3 {
  margin: 0;
  letter-spacing: 0;
}

.sidebar h1 {
  max-width: 12ch;
  font-size: 2rem;
  line-height: 1.05;
}

body[data-view="business"] .sidebar h1,
body[data-view="business"] .workspace h2,
body[data-view="business"] .summary-tile strong,
body[data-view="business"] .report-box strong {
  background: linear-gradient(135deg, #4ade80, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body[data-view="personal"] .sidebar h1,
body[data-view="personal"] .workspace h2 {
  color: #fff9fc;
  text-shadow: 0 3px 0 rgba(97, 19, 62, 0.16);
}

body[data-view="personal"] .workspace h2 {
  color: #7d1550;
}

body[data-view="personal"] .summary-tile strong,
body[data-view="personal"] .report-box strong {
  color: #b5176b;
}

.brand-line {
  margin: 10px 0 0;
  color: #d1fae5;
  font-size: 0.92rem;
  line-height: 1.4;
}

.eyebrow,
.label {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar .eyebrow,
.sidebar .label {
  color: #a8d7d2;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-list a {
  border-radius: 8px;
  padding: 10px 12px;
  color: #f9f4ec;
  text-decoration: none;
}

.nav-list a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-card {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.14);
}

body[data-view="business"] .sidebar-card {
  border-color: rgba(16, 185, 129, 0.22);
  background: rgba(31, 41, 55, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 50px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

body[data-view="personal"] .sidebar-card {
  border: 0;
  background: rgba(255, 245, 250, 0.2);
  box-shadow: inset 5px 5px 14px rgba(97, 19, 62, 0.16), inset -5px -5px 14px rgba(255, 255, 255, 0.24);
}

.sidebar-card strong,
.sidebar-card small {
  display: block;
}

.sidebar-card strong {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.sidebar-card small {
  color: #dbece8;
}

.sia-sidebar {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 10px;
}

.sia-sidebar img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  background: rgba(255, 255, 255, 0.12);
}

.sia-sidebar span,
.sia-sidebar small {
  display: block;
}

.sia-sidebar span {
  font-size: 1.1rem;
  font-weight: 900;
}

.sia-sidebar small {
  color: currentColor;
  opacity: 0.72;
}

body[data-view="business"] .sia-sidebar {
  border: 1px solid rgba(107, 114, 128, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(17, 24, 39, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 44px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px) saturate(140%);
}

body[data-view="personal"] .sia-sidebar {
  background: rgba(255, 245, 250, 0.32);
  box-shadow: inset 5px 5px 14px rgba(97, 19, 62, 0.14), inset -5px -5px 14px rgba(255, 255, 255, 0.22);
}

.workspace {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 24px;
}

.topbar,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar h2 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.summary-grid,
.report-grid,
.content-grid {
  display: grid;
  gap: 14px;
}

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

.content-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.panel,
.summary-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.9);
  box-shadow: var(--shadow);
}

body[data-view="business"] .panel,
body[data-view="business"] .summary-tile {
  border-color: rgba(107, 114, 128, 0.5);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 24px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(24px) saturate(145%);
}

body[data-view="personal"] .panel,
body[data-view="personal"] .summary-tile {
  border: 0;
  background: linear-gradient(145deg, #fff7fb, #ffd3e7);
  box-shadow: var(--shadow);
}

body[data-view="business"] .panel:hover,
body[data-view="business"] .summary-tile:hover {
  border-color: rgba(52, 211, 153, 0.34);
  box-shadow: 0 22px 70px rgba(16, 185, 129, 0.16);
  transform: translateY(-2px);
  transition: border-color 300ms ease, box-shadow 300ms ease, transform 300ms ease;
}

body[data-view="personal"] .panel:hover,
body[data-view="personal"] .summary-tile:hover {
  transform: translateY(-2px);
  box-shadow: 13px 13px 28px rgba(176, 75, 123, 0.22), -12px -12px 26px rgba(255, 255, 255, 0.86);
  transition: box-shadow 240ms ease, transform 240ms ease;
}

.panel {
  padding: 20px;
}

.summary-tile {
  min-height: 118px;
  padding: 18px;
}

.summary-tile strong {
  display: block;
  font-size: clamp(1.45rem, 2.6vw, 2.3rem);
  line-height: 1.05;
}

.decision-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-left: 6px solid var(--brand);
}

body[data-view="business"] .decision-panel {
  border-left-color: #10b981;
}

body[data-view="personal"] .decision-panel {
  border-left: 0;
  box-shadow: inset 8px 8px 18px rgba(176, 75, 123, 0.17), inset -8px -8px 18px rgba(255, 255, 255, 0.85);
}

.decision-panel p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.transaction-form,
.settings-panel {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #344152;
  font-size: 0.9rem;
  font-weight: 700;
}

body[data-view="business"] label {
  color: #d1d5db;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbbfac;
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--surface-strong);
  color: var(--ink);
}

body[data-view="business"] input,
body[data-view="business"] select,
body[data-view="business"] textarea {
  border-color: rgba(107, 114, 128, 0.58);
  background: rgba(17, 24, 39, 0.78);
  color: #f9fafb;
}

body[data-view="personal"] input,
body[data-view="personal"] select,
body[data-view="personal"] textarea {
  border: 0;
  background: #fff7fb;
  color: #61133e;
  box-shadow: inset 5px 5px 12px rgba(176, 75, 123, 0.16), inset -5px -5px 12px rgba(255, 255, 255, 0.92);
}

textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.account-warning {
  border: 1px solid rgba(248, 113, 113, 0.42);
  border-radius: 8px;
  padding: 12px;
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
  font-weight: 800;
  line-height: 1.45;
}

body[data-view="personal"] .account-warning {
  border: 0;
  background: #ffe0ed;
  color: #8a1455;
  box-shadow: inset 5px 5px 12px rgba(176, 75, 123, 0.14), inset -5px -5px 12px rgba(255, 255, 255, 0.86);
}

.receipt-tools,
.receipt-items {
  display: grid;
  gap: 10px;
}

.compact-header {
  align-items: center;
}

.small-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.86rem;
}

.receipt-item-list {
  display: grid;
  gap: 8px;
}

.receipt-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 90px 120px 44px;
  gap: 8px;
  align-items: center;
}

.receipt-item-row input {
  min-width: 0;
}

.icon-delete-button {
  width: 42px;
  min-height: 42px;
  border: 1px solid #ddb6a8;
  border-radius: 8px;
  background: #fff5f0;
  color: #8b2d19;
  font-weight: 900;
}

.primary-button,
.ghost-button,
.back-button {
  min-height: 43px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: currentColor;
}

.back-button::before {
  content: "<";
  margin-right: 8px;
}

.front-back-button {
  display: none;
  width: 100%;
  margin-top: 14px;
  color: #ffffff;
}

.front-back-button::before {
  display: none;
}

body[data-gate="choosing"] .front-back-button {
  display: inline-flex;
}

body[data-gate="choosing"] .front-back-button::before {
  display: inline;
}

.app-back-button {
  margin-bottom: 12px;
}

.primary-button {
  border: 0;
  background: var(--brand);
  color: #ffffff;
}

body[data-view="business"] .primary-button {
  background: linear-gradient(90deg, #059669, #0891b2);
  box-shadow: 0 12px 34px rgba(6, 182, 212, 0.18);
}

body[data-view="personal"] .primary-button {
  background: linear-gradient(135deg, #ff7fbc, #c21872);
  color: #fff9fc;
  box-shadow: 7px 7px 16px rgba(176, 75, 123, 0.24), -6px -6px 14px rgba(255, 255, 255, 0.8);
}

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

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbbfac;
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
}

body[data-view="business"] .ghost-button {
  border-color: rgba(107, 114, 128, 0.58);
  background: rgba(255, 255, 255, 0.05);
  color: #f9fafb;
}

body[data-view="business"] .back-button {
  border-color: rgba(107, 114, 128, 0.58);
  background: rgba(255, 255, 255, 0.05);
  color: #f9fafb;
  backdrop-filter: blur(16px);
}

body[data-view="personal"] .ghost-button {
  border: 0;
  background: #fff2f8;
  color: #8a1455;
  box-shadow: 6px 6px 14px rgba(176, 75, 123, 0.18), -5px -5px 12px rgba(255, 255, 255, 0.78);
}

body[data-view="personal"] .back-button {
  border: 0;
  background: #fff2f8;
  color: #8a1455;
  box-shadow: 6px 6px 14px rgba(176, 75, 123, 0.18), -5px -5px 12px rgba(255, 255, 255, 0.78);
}

.ghost-button:hover {
  border-color: var(--brand);
}

.file-import input {
  display: none;
}

.full-width {
  width: 100%;
}

.mini-report {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
}

.mini-report strong {
  color: var(--ink);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(18, 109, 106, 0.28);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(18, 109, 106, 0.08);
  color: var(--brand-dark);
  font-size: 0.85rem;
  font-weight: 800;
}

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

.alert-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-strong);
}

.alert-card.warning {
  border-left-color: var(--warn);
}

.alert-card strong,
.alert-card span {
  display: block;
}

.alert-card strong {
  margin-top: 6px;
  font-size: 1.5rem;
}

.alert-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

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

th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

td:last-child,
th:last-child {
  text-align: right;
}

.delete-button {
  border: 1px solid #ddb6a8;
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff5f0;
  color: #8b2d19;
  font-weight: 800;
}

.empty-state {
  color: var(--muted);
  text-align: center;
}

.receipt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.receipt-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.receipt-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e5ded2;
}

.receipt-card div {
  padding: 10px;
}

.receipt-card strong,
.receipt-card small {
  display: block;
}

.receipt-card small {
  margin-top: 4px;
  color: var(--muted);
}

.receipt-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

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

.report-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-strong);
}

body[data-view="business"] .report-box,
body[data-view="business"] .receipt-card,
body[data-view="business"] .alert-card {
  border-color: rgba(107, 114, 128, 0.46);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(17, 24, 39, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 44px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(20px) saturate(145%);
}

body[data-view="personal"] .report-box,
body[data-view="personal"] .receipt-card,
body[data-view="personal"] .alert-card {
  border: 0;
  background: linear-gradient(145deg, #fff8fc, #ffd6ea);
  box-shadow: 8px 8px 18px rgba(176, 75, 123, 0.18), -7px -7px 16px rgba(255, 255, 255, 0.82);
}

body[data-view="personal"] .settings-panel {
  display: none;
}

body[data-view="personal"] .content-grid {
  grid-template-columns: 1fr;
}

.report-box strong {
  font-size: 1.35rem;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

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

  .summary-grid,
  .content-grid,
  .alert-grid,
  .report-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .workspace,
  .sidebar {
    padding: 18px;
  }

  .front-door {
    padding: 14px;
  }

  .book-cover {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .sia-hero {
    width: min(68vw, 230px);
  }

  .sia-dialogue::before {
    display: none;
  }

  .front-door-card p:not(.eyebrow) {
    margin-right: auto;
    margin-left: auto;
  }

  .topbar,
  .section-header,
  .decision-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions,
  .summary-grid,
  .content-grid,
  .alert-grid,
  .report-grid,
  .form-row,
  .receipt-item-row {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    display: grid;
  }
}
