:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #5b6577;
  --line: #e2e6ee;
  --brand: #0b1f3a;
  --accent: #f59f0b;
  --accent-ink: #3d2600;
  --good: #0f7b52;
  --warn: #b45309;
  --bad: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 32px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------------------------------------------------------------- topbar */

.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.02em; font-size: 17px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(140deg, #0b1f3a, #24456f);
  display: grid; place-items: center; color: var(--accent); font-size: 14px; font-weight: 900;
}
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; font-size: 14.5px; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px;
  padding: 11px 18px; font-size: 14.5px; font-weight: 650;
  cursor: pointer; transition: transform .06s ease, background .15s ease, border-color .15s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #16324f; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #ffb02e; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #c8d0de; background: #fff; }
.btn-danger { background: #fff; border-color: #f0c3bd; color: var(--bad); }
.btn-danger:hover { background: #fdf3f2; }
.btn-sm { padding: 8px 13px; font-size: 13.5px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- hero */

.hero { background: var(--brand); color: #fff; padding: 76px 0 84px; position: relative; overflow: hidden; }
.hero::after {
  content: ''; position: absolute; inset: auto -10% -55% 45%;
  height: 520px; background: radial-gradient(circle, rgba(245, 159, 11, .28), transparent 62%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.hero h1 { font-size: 46px; line-height: 1.08; letter-spacing: -.03em; margin: 0 0 18px; font-weight: 800; }
.hero p.lead { font-size: 17.5px; color: #c6d2e2; margin: 0 0 28px; max-width: 540px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: 13px; color: #93a4bc; margin-top: 14px; }
.hero-card {
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px; padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.doc-line { height: 9px; border-radius: 6px; background: rgba(255, 255, 255, .16); margin-bottom: 10px; }
.doc-line.short { width: 58%; }
.doc-line.accent { background: rgba(245, 159, 11, .75); width: 38%; }
.doc-title { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #8ea3bf; margin: 0 0 14px; font-weight: 700; }
.doc-tag {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  background: rgba(15, 123, 82, .18); color: #6ee7b7;
  padding: 3px 9px; border-radius: 999px; margin-top: 6px;
}

/* ---------------------------------------------------------------- sections */

.section { padding: 76px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: 32px; letter-spacing: -.02em; margin: 0 0 12px; font-weight: 800; }
.section-head p { color: var(--muted); margin: 0; font-size: 16.5px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step-num {
  width: 28px; height: 28px; border-radius: 8px; background: #fff4e0; color: #a56100;
  display: grid; place-items: center; font-weight: 800; font-size: 13px; margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font-size: 16.5px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 4px 0; }
.feature h3 { font-size: 15.5px; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------------------------------------------------------------- pricing */

.pricing-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; }
.toggle {
  display: inline-flex; background: #eef1f6; border-radius: 10px; padding: 4px; gap: 2px;
}
.toggle button {
  border: 0; background: transparent; padding: 8px 15px; border-radius: 7px;
  font-size: 13.5px; font-weight: 650; color: var(--muted); cursor: pointer; font-family: inherit;
}
.toggle button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.toggle .save { color: var(--good); font-weight: 700; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px; position: relative; display: flex; flex-direction: column;
}
.plan.popular { border-color: #0b1f3a; box-shadow: var(--shadow); }
.plan-badge {
  position: absolute; top: -11px; left: 24px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.plan h3 { margin: 0 0 4px; font-size: 18px; }
.plan .tagline { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; min-height: 38px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.plan-price .amount { font-size: 38px; font-weight: 800; letter-spacing: -.03em; }
.plan-price .per { color: var(--muted); font-size: 14px; }
.plan-billed { color: var(--muted); font-size: 12.5px; min-height: 20px; margin-bottom: 20px; }
.plan ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.plan li { font-size: 14px; color: #374151; padding-left: 22px; position: relative; }
.plan li::before {
  content: ''; position: absolute; left: 0; top: 6px;
  width: 13px; height: 8px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good);
  transform: rotate(-45deg);
}
.plan .btn { margin-top: auto; }

.faq { display: grid; gap: 14px; max-width: 760px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 15px; }
.faq p { color: var(--muted); font-size: 14.5px; margin: 10px 0 0; }

/* ---------------------------------------------------------------- cards / app chrome */

.page { padding: 40px 0 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: 27px; letter-spacing: -.02em; margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--muted); font-size: 14.5px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h2 { font-size: 16px; margin: 0 0 16px; letter-spacing: -.01em; }
.grid-2 { display: grid; grid-template-columns: 1.35fr .65fr; gap: 20px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 750; letter-spacing: .03em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; background: #eef1f6; color: #475569;
}
.badge.active, .badge.paid { background: #e6f6ef; color: var(--good); }
.badge.trialing { background: #eaf1fe; color: #1d4ed8; }
.badge.past_due, .badge.open { background: #fdf3e5; color: var(--warn); }
.badge.canceled, .badge.paused { background: #fdeceb; color: var(--bad); }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 650; letter-spacing: .02em; text-transform: uppercase; }
.stat .value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.stat .hint { font-size: 12.5px; color: var(--muted); }

.meter { height: 8px; background: #eef1f6; border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, #0b1f3a, #2c5c8f); border-radius: 999px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 10px 10px; font-weight: 700; }
td { padding: 12px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: #fafbfd; }
td.right, th.right { text-align: right; }

.form-row { display: grid; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 13px; font-weight: 650; color: #374151; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14.5px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(11, 31, 58, .18); border-color: #93a6c4; }
textarea { min-height: 84px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; background: var(--brand); }
.auth-card { width: 100%; max-width: 430px; background: #fff; border-radius: 16px; padding: 32px; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); }
.auth-card h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.02em; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.auth-card .alt { font-size: 13.5px; color: var(--muted); text-align: center; margin-top: 18px; }
.auth-card a { color: #1d4ed8; font-weight: 600; }

.alert { border-radius: 10px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 16px; display: none; }
.alert.show { display: block; }
.alert.error { background: #fdeceb; color: #912018; }
.alert.info { background: #eef4ff; color: #1e3a8a; }
.alert.ok { background: #e6f6ef; color: #0b5f40; }

.banner {
  background: #fff8e8; border: 1px solid #f4dca6; color: #7a4b00;
  border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 20px;
}

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .48);
  display: none; align-items: center; justify-content: center; padding: 24px; z-index: 50;
}
.modal-backdrop.show { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 720px; max-height: 88vh; overflow: auto; padding: 26px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.modal-head h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.close-x { border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }

.note { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; margin-bottom: 12px; font-size: 13.5px; }
.note .meta { color: var(--muted); font-size: 12px; }

.footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
  background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 10px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 100;
  max-width: calc(100% - 40px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #912018; }

@media (max-width: 900px) {
  .hero-grid, .grid-2, .grid-3, .steps, .features, .plans { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero { padding: 52px 0 60px; }
  .nav-links { gap: 14px; font-size: 13.5px; }
  .section { padding: 52px 0; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  table { font-size: 13px; }
}

/* ---------------------------------------------------------------- claims */

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.photo { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: #eef1f6; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-del {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border: 0; border-radius: 999px; background: rgba(15, 23, 42, .72); color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.photo-del:hover { background: var(--bad); }

.drop { border: 1.5px dashed #c8d0de; border-radius: 12px; padding: 20px; text-align: center; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.drop:hover, .drop.hot { border-color: var(--brand); background: #f7f9fc; }
.drop:focus-visible { outline: 2px solid rgba(11, 31, 58, .2); }

.room { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; background: #fcfdfe; }
.room input[type=text], .room input[type=number] { padding: 8px 10px; font-size: 13.5px; }
.room-name { flex: 1; font-weight: 700; }
.item-row { display: grid; grid-template-columns: minmax(0, 2.6fr) 80px 70px minmax(0, 1.2fr) 28px; gap: 8px; margin-bottom: 8px; align-items: center; }
.item-row .close-x { padding: 0; }

.claim-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: inherit;
}
.claim-row:hover { border-color: #c8d0de; background: #fff; }
.claim-row h3 { margin: 0 0 2px; font-size: 15.5px; letter-spacing: -.01em; }

/* ---------------------------------------------------------------- print */

#print-area { display: none; }
.print-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #0b1f3a; padding-bottom: 8px; margin-bottom: 18px; }
#print-area h1 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 4px; }
#print-area h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 24px 0 8px; color: #0b1f3a; }
#print-area h3 { font-size: 14px; margin: 16px 0 4px; }
#print-area p, #print-area li { font-size: 12.5px; line-height: 1.55; margin: 0 0 8px; }
#print-area table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 10px; }
#print-area th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #555; padding: 0 6px 4px; border-bottom: 1px solid #ddd; }
#print-area td { padding: 5px 6px; border-bottom: 1px solid #eee; }
#print-area .disclaimer { margin-top: 28px; font-size: 10.5px; color: #555; border-top: 1px solid #ddd; padding-top: 8px; }
#print-area .sample { background: #fff4d6; border: 1px solid #e8c766; padding: 8px 10px; font-size: 11.5px; margin-bottom: 16px; }

@media print {
  .nav, .no-print, .toast, .alert, .banner { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; }
  .wrap { max-width: none; padding: 0; }
  #app { display: none !important; }
  #print-area { display: block; }
  #print-area .print-room { break-inside: avoid; }
}

@media (max-width: 700px) {
  .item-row { grid-template-columns: 1fr 1fr; }
  .claim-row { grid-template-columns: 1fr; }
}

.banner.state { background: #fdeceb; border-color: #f0c3bd; color: #912018; }
.banner.state a { color: #912018; font-weight: 700; text-decoration: underline; }
