:root {
  --navy: #10254f;
  --blue: #1746a2;
  --blue-soft: #eaf1ff;
  --green: #18b978;
  --green-dark: #0f8f5b;
  --green-soft: #e8f8f1;
  --red: #c2413b;
  --red-soft: #fff0ef;
  --amber: #b56a00;
  --amber-soft: #fff6df;
  --ink: #172033;
  --muted: #667085;
  --line: #dbe3ef;
  --surface: #f5f8fc;
  --white: #fff;
  --shadow: 0 18px 50px rgba(16, 37, 79, .10);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--surface); font-family: Inter, Roboto, Arial, sans-serif; line-height: 1.5; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, .button { touch-action: manipulation; }

.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; padding: 10px 14px; background: var(--navy); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 10px max(20px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(219, 227, 239, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(15px);
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-size: 1.25rem; font-weight: 800; letter-spacing: -.03em; }
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.main-nav, .public-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.main-nav a, .public-nav a { color: var(--ink); font-size: .92rem; font-weight: 650; }
.account-menu { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.account-menu span { display: grid; text-align: right; }
.account-menu small { color: var(--muted); }
.menu-toggle { display: none; }

.subscription-banner { padding: 8px 20px; color: #6b4300; background: var(--amber-soft); text-align: center; font-size: .9rem; }
.subscription-banner a { margin-left: 10px; font-weight: 700; }
.flash { width: min(1180px, calc(100% - 32px)); margin: 18px auto 0; padding: 12px 16px; border-radius: 12px; font-weight: 650; }
.flash-success { color: var(--green-dark); background: var(--green-soft); border: 1px solid #b7ead6; }
.flash-error { color: #8f2f2b; background: var(--red-soft); border: 1px solid #f0c8c5; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 18px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; font-weight: 750; text-align: center; }
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--blue), #245dc2); box-shadow: 0 10px 24px rgba(23, 70, 162, .20); }
.button-secondary { color: var(--navy); background: var(--white); border-color: var(--line); }
.button-ghost { min-height: 36px; color: var(--muted); background: transparent; border-color: var(--line); }
.button-danger { color: #fff; background: var(--red); }
.button-small { min-height: 36px; padding: 7px 12px; border-radius: 9px; font-size: .86rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, .9fr);
  align-items: center;
  gap: 70px;
  min-height: 680px;
  padding: 72px max(24px, calc((100vw - 1180px) / 2));
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 22%, rgba(24, 185, 120, .13), transparent 30%),
    radial-gradient(circle at 5% 10%, rgba(23, 70, 162, .10), transparent 28%),
    var(--white);
}
.eyebrow { margin: 0 0 10px; color: var(--green-dark); font-size: .78rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.hero h1 { max-width: 720px; margin: 0; color: var(--navy); font-size: clamp(3rem, 6vw, 5.4rem); line-height: .98; letter-spacing: -.065em; }
.hero-lead { max-width: 670px; margin: 26px 0; color: var(--muted); font-size: 1.18rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-list { display: flex; flex-wrap: wrap; gap: 18px; margin: 22px 0 0; padding: 0; color: var(--muted); list-style: none; font-size: .88rem; }
.trust-list li::before { content: "✓"; margin-right: 6px; color: var(--green); font-weight: 900; }
.hero-product { position: relative; }
.hero-product::before { content: ""; position: absolute; inset: -60px -90px; z-index: 0; border-radius: 50%; background: radial-gradient(circle, rgba(23, 70, 162, .12), transparent 67%); }
.mock-window { position: relative; z-index: 1; padding: 22px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255, 255, 255, .96); box-shadow: 0 35px 80px rgba(16, 37, 79, .18); transform: rotate(1.5deg); }
.mock-top { display: flex; gap: 6px; margin-bottom: 20px; }
.mock-top span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.mock-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.mock-stats article { padding: 16px; border-radius: 14px; background: var(--surface); }
.mock-stats small, .mock-row small { display: block; color: var(--muted); }
.mock-stats strong { display: block; margin-top: 5px; color: var(--navy); font-size: 1.5rem; }
.mock-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 14px 8px; border-top: 1px solid var(--line); }
.mock-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-weight: 900; }
.mock-row em { padding: 5px 8px; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-size: .75rem; font-style: normal; font-weight: 750; }

.section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 80px 0; }
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.benefits article { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.benefits span { color: var(--green); font-size: .8rem; font-weight: 850; }
.benefits h2 { margin: 8px 0; color: var(--navy); }
.benefits p { margin: 0; color: var(--muted); }
.animation-section { background: var(--white); }
.process-frame { display: block; width: 100%; height: 680px; border: 0; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.feature-grid h2, .pricing h2 { margin: 0 0 18px; color: var(--navy); font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; letter-spacing: -.045em; }
.feature-grid p { color: var(--muted); font-size: 1.05rem; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0; list-style: none; }
.check-grid li { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font-weight: 650; }
.check-grid li::before { content: "✓"; margin-right: 8px; color: var(--green); font-weight: 900; }
.pricing { display: flex; justify-content: space-between; align-items: center; gap: 40px; margin-bottom: 80px; padding: 48px; border-radius: 28px; color: var(--white); background: linear-gradient(135deg, var(--navy), var(--blue)); }
.pricing h2, .pricing .eyebrow { color: var(--white); }
.pricing p { max-width: 720px; margin: 0; color: rgba(255, 255, 255, .8); }

.app-page { width: min(1240px, calc(100% - 40px)); min-height: calc(100vh - 190px); margin: 0 auto; padding: 42px 0 80px; }
.narrow-page { width: min(900px, calc(100% - 40px)); }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.page-heading h1 { margin: 0; color: var(--navy); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.04em; }
.page-heading p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.panel { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 30px rgba(16, 37, 79, .05); }
.panel h2 { margin-top: 0; color: var(--navy); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.stat-card small { color: var(--muted); font-weight: 650; }
.stat-card strong { display: block; margin-top: 5px; color: var(--navy); font-size: 2rem; letter-spacing: -.04em; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
td small { display: block; color: var(--muted); }
.status { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: .77rem; font-weight: 800; white-space: nowrap; }
.status-draft { color: #526074; background: #edf1f6; }
.status-submitted { color: var(--amber); background: var(--amber-soft); }
.status-changes_requested { color: #a14222; background: #fff0e8; }
.status-approved, .status-paid { color: var(--green-dark); background: var(--green-soft); }
.status-rejected { color: var(--red); background: var(--red-soft); }
.empty-state { padding: 45px 20px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; color: var(--navy); font-size: 1.1rem; }

.form-stack { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-full { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: var(--ink); font-size: .9rem; font-weight: 700; }
label small { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; padding: 12px 13px; border: 1px solid #cbd6e4; border-radius: 10px; color: var(--ink); background: var(--white); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(23, 70, 162, .13); }
textarea { resize: vertical; }
.type-switch { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; border: 0; }
.type-switch legend { width: 100%; margin-bottom: 4px; font-weight: 800; }
.type-switch label { display: flex; align-items: center; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); cursor: pointer; }
.type-switch input { width: auto; }
.upload-zone { padding: 24px; border: 2px dashed #b9c8dc; border-radius: 14px; background: var(--surface); text-align: center; cursor: pointer; }
.upload-zone input { border: 0; background: transparent; }
.upload-zone span { color: var(--muted); font-weight: 500; }
.voice-button { width: fit-content; }
.inline-form { display: flex; gap: 10px; align-items: end; }
.inline-form label { min-width: 180px; }

.auth-page { display: grid; min-height: calc(100vh - 150px); place-items: center; padding: 60px 20px; background: radial-gradient(circle at 50% 10%, rgba(23,70,162,.1), transparent 35%); }
.auth-card { width: min(460px, 100%); padding: 36px; border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: var(--shadow); }
.auth-card-wide { width: min(680px, 100%); }
.auth-card h1 { margin: 0 0 24px; color: var(--navy); font-size: 2.3rem; letter-spacing: -.04em; }
.form-foot { margin: 20px 0 0; color: var(--muted); text-align: center; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.amount-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px; border-radius: 14px; background: var(--blue-soft); }
.amount-hero small { color: var(--muted); }
.amount-hero strong { color: var(--navy); font-size: 2rem; }
.detail-list { display: grid; gap: 0; margin: 24px 0; }
.detail-list div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.detail-list dd small { display: block; color: var(--muted); font-weight: 400; }
.submit-box { display: grid; gap: 14px; margin-top: 24px; padding: 20px; border-radius: 14px; background: var(--surface); }
.history ol { margin: 0; padding-left: 20px; }
.history li { margin-bottom: 18px; }
.history li span { display: block; color: var(--muted); font-size: .8rem; }
.history li p { margin: 5px 0 0; }

.kanban { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.kanban-column { min-height: 400px; padding: 18px; border-radius: var(--radius); background: #eaf0f8; }
.kanban-column h2 { margin: 0 0 15px; color: var(--navy); font-size: 1rem; }
.expense-card { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-bottom: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--white); }
.expense-card:hover { text-decoration: none; border-color: #adc0db; box-shadow: 0 8px 20px rgba(16,37,79,.08); }
.expense-card span, .expense-card small { color: var(--muted); font-size: .8rem; }
.expense-card em { grid-row: 1 / span 2; grid-column: 2; color: var(--navy); font-style: normal; font-weight: 800; }

.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; overflow-x: auto; }
.calendar-weekday { padding: 7px 10px; color: var(--muted); font-size: .78rem; font-weight: 800; text-align: center; text-transform: uppercase; }
.calendar-day { min-height: 120px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.calendar-day-empty { border-style: dashed; background: rgba(255, 255, 255, .38); }
.calendar-day > strong { color: var(--muted); }
.calendar-day a { display: grid; margin-top: 6px; padding: 6px; border-radius: 7px; color: var(--navy); background: var(--green-soft); font-size: .78rem; font-weight: 750; }
.calendar-day a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-day.has-expenses { border-color: #a9ddca; }

.two-column { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(320px, .5fr); }
.vehicle-list { display: grid; gap: 10px; }
.vehicle-list article { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; }
.vehicle-list span { color: var(--blue); font-weight: 750; }
.vehicle-list small { color: var(--muted); }
.pricing-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pricing-cards article { position: relative; }
.pricing-cards .featured { border-color: var(--green); box-shadow: 0 16px 35px rgba(24,185,120,.12); }
.pricing-cards h2 { font-size: 2.2rem; }
.notice { margin-top: 20px; padding: 18px; border: 1px solid #efcf8b; border-radius: 12px; color: #6b4300; background: var(--amber-soft); }

.site-footer { display: flex; justify-content: space-between; gap: 30px; padding: 28px max(20px, calc((100vw - 1180px) / 2)); color: var(--muted); background: var(--white); border-top: 1px solid var(--line); font-size: .85rem; }

@media (max-width: 980px) {
  .site-header { flex-wrap: wrap; }
  .menu-toggle { display: inline-flex; margin-left: auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
  .main-nav { display: none; order: 5; width: 100%; flex-wrap: wrap; margin: 0; padding: 8px 0 4px; }
  .main-nav.is-open { display: flex; }
  .account-menu { margin-left: 0; }
  .hero { grid-template-columns: 1fr; gap: 45px; padding-top: 58px; }
  .hero-product { width: min(650px, 100%); }
  .feature-grid, .two-column, .wide-left, .detail-grid { grid-template-columns: 1fr; }
  .history { order: 2; }
  .process-frame { height: 980px; }
}

@media (max-width: 720px) {
  .site-header { gap: 12px; }
  .public-nav a:not(.button) { display: none; }
  .account-menu > span { display: none; }
  .hero { min-height: auto; padding: 50px 20px; }
  .hero h1 { font-size: clamp(2.8rem, 15vw, 4.5rem); }
  .benefits, .stat-grid, .pricing-cards, .kanban, .form-grid, .check-grid { grid-template-columns: 1fr; }
  .form-full { grid-column: auto; }
  .pricing { align-items: flex-start; padding: 30px; flex-direction: column; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .app-page, .narrow-page { width: min(100% - 24px, 1240px); padding-top: 28px; }
  .panel { padding: 20px; }
  .detail-list div { grid-template-columns: 1fr; gap: 4px; }
  .site-footer { flex-direction: column; }
  .process-frame { height: 1030px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
