:root {
  color-scheme: light;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --accent: #f59e0b;
  --accent-ink: #111111;
  background: #f8fafc;
  color: #1f2937;
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-y: auto;
}

body[data-session-loading='true'] [data-tab-panel],
body[data-session-loading='true'] .tab-bar,
body[data-session-loading='true'] .main-menu,
body[data-session-loading='true'] .profile-menu,
body[data-session-loading='true'] .status-bar {
  visibility: hidden;
}

body[data-session-loading='true'] .app-shell::after {
  content: 'Loading your workspace...';
  display: grid;
  place-items: center;
  min-height: 42vh;
  color: #f8fafc;
  font-weight: 800;
}

body:not([data-authenticated='true']) {
  background:
    radial-gradient(circle at 28% 18%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 36%),
    linear-gradient(90deg, #0b1717 0%, #101314 47%, #111115 100%);
  color: #f8fafc;
}

.app-shell {
  max-width: min(1480px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 16px;
  margin: -24px -24px 24px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(248, 250, 252, 0.96);
  backdrop-filter: blur(12px);
}

body:not([data-authenticated='true']) .site-header {
  border-bottom-color: color-mix(in srgb, var(--accent) 18%, transparent);
  background: transparent;
}

.brand-block {
  min-width: 0;
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-block h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1;
}

.brand-block p {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-items: end;
  gap: 0;
  width: auto;
  min-width: 0;
}

.main-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

body:not([data-authenticated='true']) [data-menu-scope='app'],
body[data-authenticated='true'] [data-menu-scope='public'] {
  display: none;
}

.main-menu-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.main-menu-link:hover,
.main-menu-link:focus-visible {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #1e1b4b;
}

.main-menu-link.is-active,
.main-menu-link[aria-current='page'] {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.menu-toggle {
  display: none;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.profile-menu {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  max-width: 100%;
}

body:not([data-authenticated='true']) .profile-menu {
  flex-wrap: nowrap;
}

body:not([data-authenticated='true']) .brand-block h1,
body:not([data-authenticated='true']) .main-menu-link {
  color: #f8fafc;
}

body:not([data-authenticated='true']) .brand-block p {
  color: #8ea0a0;
}

body:not([data-authenticated='true']) .main-menu-link:hover,
body:not([data-authenticated='true']) .main-menu-link:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--accent);
}

body:not([data-authenticated='true']) .main-menu-link.is-active,
body:not([data-authenticated='true']) .main-menu-link[aria-current='page'] {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

body:not([data-authenticated='true']) .profile-action.button-primary {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

body:not([data-authenticated='true']) .button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

body:not([data-authenticated='true']) .button-secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #f8fafc;
}

body:not([data-authenticated='true']) .status-bar {
  display: none;
}

.profile-copy {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: min(360px, 34vw);
  padding: 4px 5px 4px 12px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.profile-name {
  max-width: 210px;
  overflow: hidden;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-plan {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 0.9rem;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: minmax(180px, 1fr) auto;
  }

  .main-menu {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow-x: visible;
    padding-bottom: 2px;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .profile-copy {
    max-width: min(300px, 42vw);
  }

  .profile-name {
    max-width: 170px;
  }
}

.tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid #cbd5e1;
}

.tab-button {
  padding: 12px 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.tab-button.is-active {
  border-bottom-color: #4338ca;
  color: #1e1b4b;
}

.status-bar {
  display: none !important;
}

.app-notice {
  max-width: min(1480px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 14px 18px;
  border: 1px solid rgba(245, 199, 68, 0.45);
  border-radius: 8px;
  background: rgba(245, 199, 68, 0.14);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.app-notice[data-tone='warning'] {
  border-color: rgba(255, 184, 77, 0.5);
  background: rgba(255, 184, 77, 0.14);
}

.app-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(248, 250, 252, 0.78);
  backdrop-filter: blur(2px);
  pointer-events: all;
}

.app-busy-overlay[hidden] {
  display: none;
}

.app-busy-card {
  display: grid;
  place-items: center;
  gap: 14px;
  width: min(360px, 100%);
  padding: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #1e1b4b;
  text-align: center;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.app-busy-card strong {
  line-height: 1.35;
}

.panel {
  position: relative;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.panel[hidden] {
  display: none;
}

.scanner-workflow-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  gap: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  color: #1e1b4b;
  text-align: center;
  pointer-events: all;
}

.scanner-workflow-overlay[hidden] {
  display: none;
}

.panel-primary {
  border-color: #c7d2fe;
}

.panel h2 {
  margin-top: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 18px;
  background: #eef2ff;
  border-radius: 14px;
  min-height: 96px;
}

.card span {
  display: block;
  color: #475569;
  margin-bottom: 8px;
}

.card strong {
  font-size: 1.5rem;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.auth-card,
.landing-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.auth-card h3,
.landing-card h3 {
  margin: 0;
}

.landing-panel {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.landing-panel > [id] {
  scroll-margin-top: 112px;
}

.landing-demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 520px);
  gap: 34px;
  align-items: center;
  padding: 72px 16px 76px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
}

.landing-hero {
  display: grid;
  min-height: auto;
  place-items: center;
  padding: 72px 16px 34px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
  text-align: center;
}

.landing-demo-layout .landing-hero {
  place-items: start;
  padding: 0;
  border-bottom: 0;
  text-align: left;
}

.hero-copy {
  display: grid;
  justify-items: center;
  max-width: 900px;
}

.landing-demo-layout .hero-copy {
  justify-items: start;
  max-width: 780px;
}

.landing-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
}

.landing-brand {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.38em;
}

.hero-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 7px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 52%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--accent);
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-badge span {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.68rem;
}

.landing-hero h2 {
  margin: 0 0 28px;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 9vw, 7.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.landing-demo-layout .landing-hero h2 {
  font-size: clamp(3.1rem, 6vw, 6.1rem);
}

.landing-hero p,
.landing-card p,
.workflow-card p,
.section-heading p {
  margin: 0;
  color: #9ca3af;
  line-height: 1.5;
}

.landing-hero .hero-copy > p:not(.landing-brand):not(.hero-badge):not(.hero-trial):not(.landing-kicker) {
  max-width: 690px;
  font-size: 1.22rem;
}

.hero-trial {
  margin-top: 26px;
  color: #9ca3af;
  font-size: 1.08rem;
  font-weight: 700;
}

.hero-trial strong {
  color: var(--accent);
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}

.landing-demo-layout .landing-actions {
  justify-content: flex-start;
}

.landing-status {
  position: static;
  justify-self: center;
  transform: none;
  width: fit-content;
  max-width: 100%;
  margin-top: 22px;
  padding: 0;
  color: #71717a;
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.landing-demo-layout .landing-status {
  justify-self: start;
  margin-top: 22px;
}

.public-link-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 0 auto 26px;
  padding: 14px 12px 0;
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.4;
}

.copyright-line {
  flex-basis: 100%;
  color: #94a3b8;
  text-align: center;
}

.public-link-footer a {
  color: #cbd5e1;
  text-decoration: none;
}

.public-link-footer a:hover,
.public-link-footer a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.landing-section {
  display: grid;
  gap: 18px;
  padding: 78px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
  scroll-margin-top: 112px;
}

.section-heading {
  display: grid;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.persona-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.persona-strip div {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.persona-strip strong {
  color: #ffffff;
  font-size: 0.98rem;
}

.persona-strip span {
  color: #9ca3af;
  font-size: 0.9rem;
  line-height: 1.35;
}

.workflow-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.workflow-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  min-height: 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.workflow-card span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
}

.workflow-card h3 {
  margin: 2px 0 0;
  color: #ffffff;
}

.workflow-card p {
  grid-column: 2;
}

.security-section {
  padding: 18px 0 4px;
  border-top: 0;
  background: transparent;
}

.page-shell {
  display: grid;
  gap: 46px;
  padding: 92px 0 110px;
}

.support-page {
  display: grid;
  gap: 28px;
  padding: 86px 6px 30px;
}

.support-page[hidden] {
  display: none;
}

.support-hero {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 860px;
  margin: 0 auto 6px;
  text-align: center;
}

.support-hero h2 {
  margin: 0;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.96;
}

.support-hero p:not(.landing-brand) {
  max-width: 720px;
  margin: 0;
  color: #cbd5e1;
  font-size: 1.12rem;
  line-height: 1.55;
}

.support-email-button {
  margin-top: 10px;
}

.support-contact-panel,
.support-card,
.support-note {
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.support-contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 24px;
}

.support-contact-panel h3,
.support-card h3,
.support-note h3 {
  margin: 0;
  color: #ffffff;
}

.support-contact-panel h3 {
  margin-top: 10px;
  font-size: 1.55rem;
}

.support-contact-panel p,
.support-card p,
.support-note p {
  margin: 10px 0 0;
  color: #cbd5e1;
  line-height: 1.55;
}

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

.support-card {
  display: grid;
  align-content: start;
  min-height: 180px;
  padding: 18px;
}

.support-card h3 {
  margin-top: 10px;
}

.support-note {
  padding: 18px;
}

.legal-page {
  max-width: 980px;
  margin: 0 auto;
}

.legal-panel {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.legal-panel h3 {
  margin: 14px 0 0;
  color: #ffffff;
}

.legal-panel h3:first-child {
  margin-top: 0;
}

.legal-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.58;
}

.legal-panel a {
  color: var(--accent);
  font-weight: 800;
}

.page-hero {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.page-hero h2 {
  margin: 0;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.page-hero p:not(.landing-brand) {
  max-width: 700px;
  margin: 0;
  color: #9ca3af;
  font-size: 1.12rem;
  line-height: 1.55;
}

.page-grid {
  display: grid;
  gap: 14px;
}

.page-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 180px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.page-card h3 {
  margin: 0;
  color: #ffffff;
}

.page-card p {
  margin: 0;
  color: #9ca3af;
  line-height: 1.5;
}

.demo-request-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.86fr);
  gap: 28px;
  align-items: start;
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.landing-demo-request {
  width: 100%;
  margin: 0;
}

.demo-request-copy {
  display: grid;
  gap: 18px;
  padding: 12px 0;
}

.demo-request-copy .landing-brand {
  margin-bottom: 0;
}

.demo-request-copy h2 {
  max-width: 640px;
  margin: 0;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
}

.demo-proof-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-proof-list {
  max-width: 720px;
  margin-top: 22px;
}

.demo-proof-list li {
  position: relative;
  padding-left: 28px;
  color: #e5e7eb;
  font-weight: 800;
  line-height: 1.45;
}

.demo-proof-list li::before {
  position: absolute;
  left: 0;
  top: 0.2em;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  content: "✓";
  font-size: 0.72rem;
  font-weight: 900;
}

.demo-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.demo-metrics div {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 14px;
  border-left: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}

.demo-metrics strong {
  color: #ffffff;
  font-size: 1.55rem;
  line-height: 1;
}

.demo-metrics span {
  color: #9ca3af;
  font-weight: 800;
  line-height: 1.3;
}

.demo-request-form {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
}

.demo-request-form h3 {
  margin: 0;
  color: #111827;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  text-align: center;
}

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

.demo-request-form label,
.demo-request-form fieldset {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
  color: #111827;
  font-weight: 800;
}

.demo-request-form input,
.demo-request-form select,
.demo-request-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
}

.demo-request-form fieldset {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 0;
  border: 0;
}

.demo-request-form legend {
  grid-column: 1 / -1;
  padding: 0 0 4px;
  font-weight: 900;
}

.demo-request-form fieldset label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  font-weight: 700;
  line-height: 1.32;
}

.demo-request-form input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.demo-form-note {
  margin: 0;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.45;
}

.page-timeline {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
}

.walkthrough-video {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.walkthrough-video-copy {
  display: grid;
  gap: 12px;
}

.walkthrough-video-copy .landing-brand {
  margin-bottom: 0;
}

.walkthrough-video h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.walkthrough-video p {
  margin: 0;
  color: #9ca3af;
  line-height: 1.55;
}

.walkthrough-video-panel {
  display: grid;
  gap: 12px;
}

.walkthrough-video-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), transparent 42%),
    rgba(5, 10, 12, 0.74);
}

.page-timeline article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.page-timeline span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
}

.page-timeline h3 {
  margin: 0 0 6px;
  color: #ffffff;
}

.page-timeline p {
  margin: 0;
  color: #9ca3af;
  line-height: 1.5;
}

.landing-plans {
  display: grid;
  gap: 14px;
  scroll-margin-top: 112px;
}

.benefit-grid,
.production-panel {
  display: grid;
  gap: 14px;
}

.benefit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.benefit-grid section,
.production-panel {
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.benefit-grid h3,
.production-panel h3 {
  margin: 0;
}

.benefit-grid ul {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 20px;
  color: #334155;
}

.production-panel p {
  margin: 8px 0 0;
  color: #475569;
  line-height: 1.5;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan-pill-grid {
  align-items: stretch;
}

.plan-card {
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-height: 210px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.plan-card-featured {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.plan-pill {
  min-height: 0;
  justify-items: center;
  align-content: center;
  padding: 22px 18px;
  text-align: center;
}

.plan-pill .button {
  margin-top: 6px;
}

.current-plan-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(245, 199, 68, 0.34);
  border-radius: 8px;
  background: rgba(245, 199, 68, 0.1);
}

.current-plan-panel strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 1.35rem;
}

.plan-manage-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.current-plan-panel .button {
  flex: 0 0 auto;
}

.plan-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.plan-detail-card {
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.plan-detail-card h3 {
  margin: 0 0 8px;
}

.plan-detail-card p,
.plan-detail-card li {
  color: var(--muted);
  line-height: 1.5;
}

.plan-detail-card ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
}

.plan-card h3,
.cost-panel h3 {
  margin: 0 0 8px;
}

.plan-price {
  margin: 0;
  color: #ffffff;
  font-size: 1.55rem;
  font-weight: 800;
}

.plan-summary {
  margin: 8px 0 0;
  color: #9ca3af;
  line-height: 1.45;
}

.plan-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: #d1d5db;
}

.cost-panel {
  display: none;
  gap: 12px;
  margin-top: 18px;
}

.cost-table-wrapper {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.cost-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.cost-table th,
.cost-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.cost-table th {
  background: #f8fafc;
  color: #334155;
  font-size: 0.86rem;
}

.cost-table tr:last-child td {
  border-bottom: 0;
}

.cost-note {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.45;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: #334155;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font: inherit;
  color-scheme: light;
  background: #f8fafc;
  color: #0f172a;
}

input[type="date"] {
  min-height: 48px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.85;
}

textarea {
  min-height: 140px;
  max-height: 260px;
  resize: vertical;
}

.text-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #e2e8f0;
  color: #0f172a;
  cursor: pointer;
  font-weight: 600;
}

.button:disabled,
td button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button-primary {
  background: #4338ca;
  color: white;
}

.button-secondary {
  background: white;
  border-color: #cbd5e1;
}

.button-tertiary {
  background: #f1f5f9;
}

.scanner {
  display: grid;
  gap: 12px;
}

.scanner-view {
  position: relative;
  height: clamp(220px, 34vh, 320px);
  min-height: 220px;
  background: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
}

.scanner-view video,
.scanner-preview {
  width: 100%;
  height: 100%;
}

.scanner-view video {
  display: none;
  object-fit: cover;
}

.scanner-view canvas {
  display: none;
}

.scanner-preview {
  display: grid;
  place-items: center;
  padding: 18px;
  background: #f8fafc;
  color: #64748b;
  overflow: auto;
  text-align: center;
}

.scanner-preview.scanner-preview-media {
  align-items: start;
  justify-items: center;
}

.scanner-preview img {
  width: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
}

.processing-card {
  display: grid;
  place-items: center;
  gap: 12px;
  color: #334155;
  font-weight: 700;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #cbd5e1;
  border-top-color: #4338ca;
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.scanner-document-window {
  position: absolute;
  top: 7%;
  left: 12%;
  right: 12%;
  bottom: 7%;
  z-index: 2;
  display: none;
  place-items: end center;
  padding: 14px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  box-shadow: 0 0 0 999px rgba(15, 23, 42, 0.5), 0 0 28px rgba(34, 211, 238, 0.2);
  color: white;
  pointer-events: none;
  transition: left 180ms ease, top 180ms ease, width 180ms ease, height 180ms ease, border-color 180ms ease;
}

.scanner-document-window::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background:
    linear-gradient(#22d3ee, #22d3ee) left top / 44px 4px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) left top / 4px 44px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) right top / 44px 4px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) right top / 4px 44px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) left bottom / 44px 4px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) left bottom / 4px 44px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) right bottom / 44px 4px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) right bottom / 4px 44px no-repeat;
}

.scanner-document-window[data-detected='false'] {
  border-color: rgba(251, 191, 36, 0.85);
  box-shadow: 0 0 0 999px rgba(15, 23, 42, 0.38), 0 0 22px rgba(251, 191, 36, 0.22);
}

.scanner-document-window[data-detected='false']::before {
  background:
    linear-gradient(#fbbf24, #fbbf24) left top / 44px 4px no-repeat,
    linear-gradient(#fbbf24, #fbbf24) left top / 4px 44px no-repeat,
    linear-gradient(#fbbf24, #fbbf24) right top / 44px 4px no-repeat,
    linear-gradient(#fbbf24, #fbbf24) right top / 4px 44px no-repeat,
    linear-gradient(#fbbf24, #fbbf24) left bottom / 44px 4px no-repeat,
    linear-gradient(#fbbf24, #fbbf24) left bottom / 4px 44px no-repeat,
    linear-gradient(#fbbf24, #fbbf24) right bottom / 44px 4px no-repeat,
    linear-gradient(#fbbf24, #fbbf24) right bottom / 4px 44px no-repeat;
}

.scanner-document-window span {
  position: relative;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
  font-size: 0.86rem;
  font-weight: 700;
}

.scanner-countdown {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  place-items: center;
  background: rgba(15, 23, 42, 0.2);
  color: white;
  font-size: 5rem;
  font-weight: 800;
  text-shadow: 0 4px 18px rgba(15, 23, 42, 0.55);
  pointer-events: none;
}

.scanner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.scanner-actions .button {
  flex: 1 1 145px;
}

.scanner-hint {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.scanner-feedback {
  display: none;
  padding: 11px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.92rem;
  line-height: 1.35;
}

.scanner-feedback[data-tone='success'] {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.scanner-feedback[data-tone='warning'] {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.line-items-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.line-items-panel h3 {
  margin: 0;
  font-size: 1rem;
}

.line-items-table-wrapper {
  max-height: 260px;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.line-items-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.line-items-table th,
.line-items-table td {
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

.line-items-table th:last-child,
.line-items-table td:last-child {
  width: 110px;
  text-align: right;
}

.pending-receipts {
  display: grid;
  gap: 16px;
}

.pending-receipt {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.pending-receipt[data-scanning='true'] {
  opacity: 0.78;
}

.pending-scan-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 10px;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.82);
  color: #1e1b4b;
  text-align: center;
  pointer-events: all;
}

.pending-receipt-media {
  display: grid;
  align-content: start;
  gap: 10px;
}

.pending-receipt-media img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
}

.pending-image-placeholder {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}

.confidence-badge {
  justify-self: start;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.85rem;
  font-weight: 800;
}

.confidence-badge[data-tone='medium'] {
  background: #fef3c7;
  color: #92400e;
}

.confidence-badge[data-tone='high'] {
  background: #dcfce7;
  color: #166534;
}

.confidence-badge[data-tone='manual'] {
  background: #e2e8f0;
  color: #334155;
}

.review-confidence {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.review-confidence[hidden] {
  display: none;
}

.review-confidence .confidence-badge {
  flex: 0 0 auto;
}

.review-confidence span:last-child,
.confidence-detail {
  flex: 1 1 260px;
  min-width: 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.4;
}

.confidence-detail {
  margin-top: -2px;
}

.table-confidence {
  white-space: nowrap;
}

.pending-actions {
  display: grid;
  gap: 8px;
}

.pending-receipt-fields {
  display: grid;
  gap: 12px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.transaction-filters {
  display: flex;
  flex: 1 1 360px;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.transaction-view-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.transaction-view-tab {
  border: 0;
  border-radius: 6px;
  padding: 8px 11px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.transaction-view-tab.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.transaction-filters select {
  flex: 0 0 130px;
}

.transaction-filters input {
  flex: 1 1 240px;
  min-width: 180px;
  max-width: 360px;
}

.transaction-filters .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.report-form {
  margin-top: 16px;
}

.report-form-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 8px;
}

.report-summary div {
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.report-summary span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 0.85rem;
}

.report-summary strong {
  color: #0f172a;
  font-size: 1.15rem;
}

.report-review {
  margin-top: 18px;
}

.report-review .table-wrapper {
  margin-top: 10px;
}

.report-history-header {
  margin-top: 22px;
}

.report-history-header h3 {
  margin: 0;
}

.report-history {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.report-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
}

.report-history-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.report-history-item p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.88rem;
}

.report-history-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.report-history-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}

.report-history-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
}

#transactionTable {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
  table-layout: fixed;
  font-size: 0.92rem;
}

#transactionTable th:nth-child(1),
#transactionTable td:nth-child(1) {
  width: 5%;
  text-align: center;
}

#transactionTable th:nth-child(2),
#transactionTable td:nth-child(2) {
  width: 8%;
}

#transactionTable th:nth-child(3),
#transactionTable td:nth-child(3) {
  width: 8%;
}

#transactionTable th:nth-child(4),
#transactionTable td:nth-child(4) {
  width: 14%;
}

#transactionTable th:nth-child(5),
#transactionTable td:nth-child(5) {
  width: 7%;
}

#transactionTable th:nth-child(6),
#transactionTable td:nth-child(6),
#transactionTable th:nth-child(8),
#transactionTable td:nth-child(8) {
  width: 10%;
}

#transactionTable th:nth-child(7),
#transactionTable td:nth-child(7) {
  width: 8%;
}

#transactionTable th:nth-child(9),
#transactionTable td:nth-child(9) {
  width: 14%;
}

#transactionTable th:nth-child(10),
#transactionTable td:nth-child(10) {
  width: 9%;
}

#transactionTable th:nth-child(11),
#transactionTable td:nth-child(11) {
  width: 7%;
  text-align: center;
}

.transaction-select,
.transaction-select-all {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.transaction-action-menu {
  position: relative;
  display: inline-flex;
  justify-content: center;
}

.transaction-action-trigger {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
}

.transaction-action-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 25;
  display: none;
  min-width: 128px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}

.transaction-action-menu.is-open .transaction-action-list {
  display: grid;
}

.transaction-action-list button {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.transaction-action-list button:hover,
.transaction-action-list button:focus-visible {
  background: #eef2ff;
  color: #3730a3;
}

.tag-pill {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.transaction-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: #475569;
  font-weight: 700;
}

.transaction-pagination[hidden] {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 9px;
  border-bottom: 1px solid #e2e8f0;
  overflow-wrap: anywhere;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #334155;
}

td button {
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  margin: 0 8px 6px 0;
  padding: 0;
}

.notes-preview {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #334155;
  vertical-align: bottom;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: help;
}

.notes-preview:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

.empty-state {
  padding: 24px;
  color: #64748b;
}

.empty-state.compact {
  padding: 12px;
  font-size: 0.9rem;
}

.pdf-modal,
.image-modal,
.statement-modal,
.tag-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
}

.pdf-modal[hidden],
.image-modal[hidden],
.statement-modal[hidden],
.tag-modal[hidden] {
  display: none;
}

.pdf-dialog,
.image-dialog,
.statement-dialog,
.tag-dialog,
.transaction-edit-dialog,
.transaction-delete-dialog {
  width: min(1040px, 100%);
  height: min(86vh, 820px);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
}

.image-dialog {
  grid-template-rows: auto minmax(0, 1fr);
}

.statement-dialog {
  width: min(1320px, 100%);
  height: min(90vh, 860px);
}

.tag-dialog {
  width: min(520px, 100%);
  height: auto;
  grid-template-rows: auto;
}

.transaction-edit-dialog {
  width: min(760px, 100%);
  height: auto;
  max-height: min(90vh, 760px);
  grid-template-rows: auto minmax(0, 1fr);
}

.transaction-delete-dialog {
  width: min(560px, 100%);
  height: auto;
  grid-template-rows: auto;
}

.tag-modal-body {
  padding: 16px;
}

.tag-modal-body input,
.transaction-edit-body input,
.transaction-edit-body select,
.transaction-edit-body textarea {
  width: 100%;
  margin-top: 8px;
}

.transaction-edit-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  overflow: auto;
  padding: 16px;
}

.transaction-edit-warning {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 800;
  line-height: 1.45;
}

.transaction-edit-notes {
  grid-column: 1 / -1;
}

.transaction-delete-body {
  padding: 16px;
  color: #334155;
  font-weight: 700;
  line-height: 1.5;
}

.button.button-danger {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
}

.button.button-danger:hover,
.button.button-danger:focus-visible {
  border-color: #b91c1c;
  background: #b91c1c;
}

.pdf-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.pdf-dialog-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.statement-summary {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.35;
}

.pdf-dialog-actions {
  display: flex;
  gap: 8px;
}

.statement-review-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.statement-review-toolbar,
.statement-review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.statement-review-footer {
  border-top: 1px solid #e2e8f0;
  border-bottom: 0;
}

.statement-select-all {
  display: inline-flex;
  width: auto;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.statement-select-all input,
.statement-row-select {
  width: 18px;
  height: 18px;
  padding: 0;
}

.statement-grid-wrapper {
  min-height: 0;
  overflow: auto;
}

.statement-grid {
  min-width: 1030px;
  table-layout: fixed;
}

.statement-grid th:nth-child(1),
.statement-grid td:nth-child(1) {
  width: 54px;
  text-align: center;
}

.statement-grid th:nth-child(2),
.statement-grid td:nth-child(2) {
  width: 142px;
}

.statement-grid th:nth-child(3),
.statement-grid td:nth-child(3) {
  width: 120px;
}

.statement-grid th:nth-child(4),
.statement-grid td:nth-child(4) {
  width: 122px;
}

.statement-grid th:nth-child(5),
.statement-grid td:nth-child(5) {
  width: 220px;
}

.statement-grid th:nth-child(6),
.statement-grid td:nth-child(6) {
  width: 160px;
}

.statement-grid th:nth-child(7),
.statement-grid td:nth-child(7) {
  width: 310px;
}

.statement-grid input,
.statement-grid select {
  min-height: 38px;
  padding: 8px 9px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.statement-row-invalid {
  opacity: 0.72;
}

.statement-row-invalid td:first-child {
  border-left: 3px solid #f59e0b;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.event-actions select {
  width: auto;
  min-width: 190px;
}

.admin-events-header {
  margin-top: 28px;
}

.table-subtext {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.78rem;
  word-break: break-word;
}

.admin-summary {
  margin-bottom: 14px;
}

#pdfPreviewFrame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f8fafc;
}

#imagePreview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  background: #0f172a;
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .header-actions {
    grid-column: 1 / -1;
    justify-items: stretch;
    min-width: 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
  }

  .main-menu {
    grid-column: 1 / -1;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  }

  body:not([data-authenticated='true']) .main-menu {
    border-color: color-mix(in srgb, var(--accent) 24%, transparent);
    background: transparent;
    box-shadow: none;
  }

  .main-menu.is-open {
    display: grid;
  }

  .main-menu-link {
    justify-content: flex-start;
    width: 100%;
  }

  .support-page {
    padding-top: 48px;
  }

  .support-hero h2 {
    font-size: clamp(2.6rem, 12vw, 4.2rem);
  }

  .support-contact-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .support-contact-panel .button {
    width: 100%;
  }

  .support-topic-grid {
    grid-template-columns: 1fr;
  }

  .profile-menu {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .profile-copy {
    justify-content: flex-start;
    max-width: 100%;
  }

  .profile-name {
    max-width: 100%;
  }

  .grid-2,
  .grid-3,
  .auth-grid,
  .landing-demo-layout,
  .landing-hero,
  .landing-grid,
  .persona-strip,
  .workflow-row,
  .walkthrough-video,
  .demo-request-section,
  .page-grid-2,
  .page-grid-3,
  .benefit-grid,
  .plan-grid,
  .plan-details-grid,
  .pending-receipt {
    grid-template-columns: 1fr;
  }

  .landing-actions .button {
    flex: 1 1 160px;
  }

  .landing-hero {
    min-height: auto;
    padding-top: 64px;
  }

  .landing-demo-layout {
    padding: 54px 16px 62px;
  }

  .landing-demo-layout .landing-hero {
    text-align: center;
  }

  .landing-demo-layout .hero-copy,
  .landing-demo-layout .landing-status {
    justify-items: center;
    justify-self: center;
  }

  .landing-demo-layout .landing-actions {
    justify-content: center;
  }

  .landing-status {
    position: static;
    transform: none;
    justify-self: center;
    max-width: none;
  }

  .demo-request-section {
    padding: 18px;
  }

  .demo-metrics,
  .demo-form-grid {
    grid-template-columns: 1fr;
  }

  .demo-request-form fieldset {
    grid-template-columns: 1fr;
  }

  .transaction-filters {
    flex-basis: 100%;
    justify-content: stretch;
  }

  .transaction-filters input {
    max-width: none;
  }

  .report-summary,
  .report-history-item {
    grid-template-columns: 1fr;
  }

  .report-history-actions {
    justify-content: stretch;
  }

  .report-history-actions .button {
    flex: 1 1 140px;
  }
}

@media (max-width: 520px) {
  .app-shell {
    padding: 16px;
  }

  .site-header {
    margin: -16px -16px 18px;
    padding: 14px 16px;
  }

  .brand-block h1 {
    font-size: 1.45rem;
  }

  .brand-block p {
    font-size: 0.86rem;
  }

  .main-menu {
    grid-template-columns: 1fr;
  }

  .workflow-card p {
    grid-column: 1 / -1;
  }

  .page-shell {
    padding: 64px 0 82px;
  }

  .page-timeline article {
    grid-template-columns: 1fr;
  }

  .transaction-edit-body {
    grid-template-columns: 1fr;
  }

  .profile-menu {
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
  }

  .profile-copy {
    justify-content: space-between;
    width: 100%;
  }

  .profile-action {
    width: 100%;
    justify-content: center;
  }
}

body[data-authenticated='true'] {
  background:
    radial-gradient(circle at 22% 12%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 34%),
    linear-gradient(90deg, #0b1717 0%, #101314 47%, #111115 100%);
  color: #f8fafc;
}

body[data-authenticated='true'] .site-header {
  border-bottom-color: color-mix(in srgb, var(--accent) 18%, transparent);
  background: transparent;
}

body[data-authenticated='true'] .brand-block h1,
body[data-authenticated='true'] .main-menu-link,
body[data-authenticated='true'] .panel h2,
body[data-authenticated='true'] .panel h3,
body[data-authenticated='true'] label,
body[data-authenticated='true'] th,
body[data-authenticated='true'] .profile-name {
  color: #f8fafc;
}

body[data-authenticated='true'] .brand-block p,
body[data-authenticated='true'] .status-bar,
body[data-authenticated='true'] .scanner-hint,
body[data-authenticated='true'] .empty-state,
body[data-authenticated='true'] .table-subtext,
body[data-authenticated='true'] .confidence-detail,
body[data-authenticated='true'] .report-history-meta,
body[data-authenticated='true'] .plan-summary,
body[data-authenticated='true'] .cost-note,
body[data-authenticated='true'] td,
body[data-authenticated='true'] p {
  color: #a1a1aa;
}

body[data-authenticated='true'] .main-menu-link:hover,
body[data-authenticated='true'] .main-menu-link:focus-visible,
body[data-authenticated='true'] .main-menu-link.is-active,
body[data-authenticated='true'] .main-menu-link[aria-current='page'] {
  border-color: color-mix(in srgb, var(--accent) 48%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

body[data-authenticated='true'] .status-bar,
body[data-authenticated='true'] .profile-plan {
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

body[data-authenticated='true'] .profile-copy {
  border-color: color-mix(in srgb, var(--accent) 18%, transparent);
  background: rgba(255, 255, 255, 0.055);
}

body[data-authenticated='true'] .panel,
body[data-authenticated='true'] .card,
body[data-authenticated='true'] .auth-card,
body[data-authenticated='true'] .landing-card,
body[data-authenticated='true'] .plan-card,
body[data-authenticated='true'] .cost-table-wrapper,
body[data-authenticated='true'] .pending-receipt,
body[data-authenticated='true'] .report-history-item,
body[data-authenticated='true'] .event-actions,
body[data-authenticated='true'] .scanner,
body[data-authenticated='true'] .line-items-panel,
body[data-authenticated='true'] .entry-confidence-panel {
  border-color: color-mix(in srgb, var(--accent) 18%, transparent);
  background: rgba(255, 255, 255, 0.035);
  color: #f8fafc;
}

body[data-authenticated='true'] .panel-primary {
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
}

body[data-authenticated='true'] .card span,
body[data-authenticated='true'] .card strong,
body[data-authenticated='true'] .plan-price,
body[data-authenticated='true'] .cost-panel h3 {
  color: #ffffff;
}

body[data-authenticated='true'] .plan-card-featured {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

body[data-authenticated='true'] input,
body[data-authenticated='true'] select,
body[data-authenticated='true'] textarea {
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
  color-scheme: dark;
  background: rgba(5, 10, 12, 0.78);
  color: #f8fafc;
}

body[data-authenticated='true'] input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 1;
  filter: invert(84%) sepia(44%) saturate(1746%) hue-rotate(349deg) brightness(101%) contrast(96%);
}

body[data-authenticated='true'] input::placeholder,
body[data-authenticated='true'] textarea::placeholder {
  color: #71717a;
}

body[data-authenticated='true'] input:focus,
body[data-authenticated='true'] select:focus,
body[data-authenticated='true'] textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 1px;
}

body[data-authenticated='true'] .button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

body[data-authenticated='true'] .button-secondary,
body[data-authenticated='true'] .button-tertiary,
body[data-authenticated='true'] .button:not(.button-primary) {
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  background: transparent;
  color: #f8fafc;
}

body[data-authenticated='true'] .button-primary:hover,
body[data-authenticated='true'] .button-primary:focus-visible {
  filter: brightness(1.06);
}

body[data-authenticated='true'] .button-secondary:hover,
body[data-authenticated='true'] .button-tertiary:hover,
body[data-authenticated='true'] .button:not(.button-primary):hover,
body[data-authenticated='true'] .button-secondary:focus-visible,
body[data-authenticated='true'] .button-tertiary:focus-visible,
body[data-authenticated='true'] .button:not(.button-primary):focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

body[data-authenticated='true'] table {
  color: #e5e7eb;
}

body[data-authenticated='true'] .transaction-view-tabs {
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
  background: rgba(255, 255, 255, 0.035);
}

body[data-authenticated='true'] .transaction-view-tab {
  color: #cbd5e1;
}

body[data-authenticated='true'] .transaction-view-tab.is-active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  box-shadow: none;
}

body[data-authenticated='true'] .notes-preview {
  color: #f8fafc;
}

body[data-authenticated='true'] td button,
body[data-authenticated='true'] table a {
  color: var(--accent);
}

body[data-authenticated='true'] th {
  background: rgba(255, 255, 255, 0.045);
}

body[data-authenticated='true'] tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

body[data-authenticated='true'] .scanner-preview,
body[data-authenticated='true'] .pending-image-placeholder,
body[data-authenticated='true'] .line-items-table-wrapper,
body[data-authenticated='true'] .cost-table-wrapper,
body[data-authenticated='true'] .modal-body {
  border-color: color-mix(in srgb, var(--accent) 18%, transparent);
  background: rgba(5, 10, 12, 0.74);
  color: #e5e7eb;
}

body[data-authenticated='true'] .scanner-feedback {
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  background: rgba(255, 255, 255, 0.035);
  color: #e5e7eb;
}

body[data-authenticated='true'] .scanner-feedback[data-tone='success'],
body[data-authenticated='true'] .status[data-tone='success'] {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(34, 197, 94, 0.10);
  color: #86efac;
}

body[data-authenticated='true'] .scanner-feedback[data-tone='warning'],
body[data-authenticated='true'] .status[data-tone='warning'] {
  border-color: rgba(245, 158, 11, 0.48);
  background: rgba(245, 158, 11, 0.10);
  color: #fbbf24;
}

body[data-authenticated='true'] .confidence-badge,
body[data-authenticated='true'] .entry-confidence-badge {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

body[data-authenticated='true'] .app-busy-overlay,
body[data-authenticated='true'] .scanner-workflow-overlay,
body[data-authenticated='true'] .pending-scan-overlay {
  background: rgba(5, 10, 12, 0.74);
  color: #f8fafc;
}

body[data-authenticated='true'] .app-busy-card,
body[data-authenticated='true'] .pdf-dialog,
body[data-authenticated='true'] .image-dialog,
body[data-authenticated='true'] .statement-dialog,
body[data-authenticated='true'] .tag-dialog,
body[data-authenticated='true'] .transaction-edit-dialog,
body[data-authenticated='true'] .transaction-delete-dialog {
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  background: #101314;
  color: #f8fafc;
}

body[data-authenticated='true'] .transaction-action-trigger,
body[data-authenticated='true'] .transaction-action-list {
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
  background: #101314;
  color: #f8fafc;
}

body[data-authenticated='true'] .transaction-action-list button {
  color: #f8fafc;
}

body[data-authenticated='true'] .transaction-action-list button:hover,
body[data-authenticated='true'] .transaction-action-list button:focus-visible {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

body[data-authenticated='true'] .transaction-edit-warning {
  border-color: color-mix(in srgb, #f59e0b 70%, transparent);
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}

body[data-authenticated='true'] .transaction-delete-body {
  color: #e5e7eb;
}

body[data-authenticated='true'] .pdf-dialog-header,
body[data-authenticated='true'] .statement-review-toolbar,
body[data-authenticated='true'] .statement-review-footer {
  border-bottom-color: color-mix(in srgb, var(--accent) 18%, transparent);
}

body[data-authenticated='true'] .statement-review-footer {
  border-top-color: color-mix(in srgb, var(--accent) 18%, transparent);
}

body[data-authenticated='true'] .statement-summary {
  color: #9ca3af;
}

@media (max-width: 860px) {
  body[data-authenticated='true'] .main-menu {
    border-color: color-mix(in srgb, var(--accent) 24%, transparent);
    background: transparent;
    box-shadow: none;
  }
}
