/* CheckBridge — one stylesheet for the public site and the app */
:root {
  --navy: #0F2A44;
  --navy-2: #1B3B5C;
  --teal: #14866D;
  --teal-2: #0F6E59;
  --teal-soft: #E3F3EE;
  --paper: #F7F5F0;
  --card: #FFFFFF;
  --ink: #13202D;
  --muted: #5C6B7A;
  --line: #E2DED5;
  --warn: #B4531A;
  --warn-soft: #FBEDE3;
  --bad: #B3261E;
  --bad-soft: #FBE9E7;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 42, 68, .06), 0 4px 16px rgba(15, 42, 68, .06);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.55; font-size: 16px; }
a { color: var(--teal-2); }
a:hover { color: var(--navy); }
img { max-width: 100%; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); margin: 0 0 .5rem; }
h2 { font-size: 1.45rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
p { margin: 0 0 1rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Top bar */
.topbar { background: var(--navy); color: #fff; }
.topbar .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; }
.brand:hover { color: #fff; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.topbar nav a, .topbar nav button { color: #D6E2EE; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .95rem; background: none; border: 0; font: inherit; cursor: pointer; }
.topbar nav a:hover, .topbar nav button:hover, .topbar nav a.on { color: #fff; background: rgba(255,255,255,.08); }
.topbar nav .btn { color: #fff; }
.topbar form { margin: 0; display: inline; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-2); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-danger { background: #fff; color: var(--bad); border-color: #E9B9B4; }
.btn-danger:hover { background: var(--bad-soft); color: var(--bad); }
.btn-lg { padding: 14px 22px; font-size: 1.05rem; }
.btn-sm { padding: 6px 10px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Cards / layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
main { padding: 28px 0 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--navy); border-color: var(--teal); font-weight: 600; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; border: 1px solid; }
.alert-ok { background: var(--teal-soft); border-color: #B5DED1; color: #0B4F3F; }
.alert-error { background: var(--bad-soft); border-color: #EFC2BD; color: #7A1A14; }
.alert-warn { background: var(--warn-soft); border-color: #F0CDB2; color: #6E3311; }
.alert-info { background: #EEF3F8; border-color: #CFDCE8; color: var(--navy); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #EEF3F8; color: var(--navy); }
.badge-ok { background: var(--teal-soft); color: #0B4F3F; }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }

/* Forms */
label { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 6px; color: var(--navy); }
.field { margin-bottom: 16px; }
.hint { font-size: .84rem; color: var(--muted); margin-top: 4px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #CFC9BD; border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 3px solid rgba(20, 134, 109, .25); outline-offset: 1px; border-color: var(--teal); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--teal); vertical-align: middle; }
.check-label { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--ink); }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; }
legend { font-weight: 600; color: var(--navy); padding: 0 6px; font-size: .92rem; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.amt, th.amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:hover { background: #FBFAF7; }

/* Queue */
.group-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.group-head h2 { margin: 0; font-size: 1.15rem; }
.print-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--line); }
.print-bar .field { margin: 0; }
.print-bar input[type=number] { width: 140px; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }

/* Public site */
.hero { background: var(--navy); color: #E7EEF5; padding: 56px 0 72px; overflow: hidden; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); max-width: 16ch; }
.hero p.lede { font-size: 1.2rem; max-width: 56ch; color: #C9D6E3; }
.hero .grid { align-items: center; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.hero-art { background: #F9F7F1; border-radius: 12px; padding: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35); transform: rotate(-1.2deg); }
.hero-art img { display: block; width: 100%; border-radius: 6px; }
.section { padding: 56px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--teal); margin-bottom: 8px; }
.hero .kicker { color: #7FD4BF; }
.steps { counter-reset: s; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 0; list-style: none; }
.steps li { counter-increment: s; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-2); font-weight: 700; margin-bottom: 10px; }
.steps h3 { margin-top: 0; }
.feature h3 { margin-top: 0; }
.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; }
.plan.popular { border: 2px solid var(--teal); }
.plan .tag { position: absolute; top: -12px; left: 24px; background: var(--teal); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h3 { margin: 0 0 4px; font-size: 1.25rem; }
.plan .price { font-size: 2.4rem; font-weight: 800; color: var(--navy); margin: 8px 0 0; letter-spacing: -0.02em; }
.plan .price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan ul { padding-left: 0; list-style: none; margin: 16px 0 20px; flex: 1; }
.plan li { padding: 5px 0 5px 26px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 12px; height: 7px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.plan .btn { width: 100%; }
.plan.current { outline: 3px solid rgba(20,134,109,.25); }
details.faq { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; font-weight: 600; color: var(--navy); }
details.faq p { margin: 10px 0 0; }
.compare th, .compare td { text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; }
footer.site { background: #0B2033; color: #9FB2C4; padding: 36px 0; font-size: .9rem; }
footer.site a { color: #D6E2EE; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
footer.site nav { display: flex; gap: 16px; flex-wrap: wrap; }
.prose { max-width: 72ch; }
.prose li { margin-bottom: 6px; }

/* Auth */
.auth { max-width: 460px; margin: 40px auto; }
.auth .card { padding: 28px; }

/* Designer */
.preview-frame { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.logo-thumb { max-height: 70px; max-width: 160px; border: 1px solid var(--line); border-radius: 6px; padding: 6px; background: #fff; }

/* Photo reading */
.photo-box { border: 2px dashed #CFC9BD; border-radius: 10px; padding: 16px; background: #FCFBF8; }
.photo-box .qr { width: 200px; height: 200px; background: #fff; border-radius: 8px; padding: 8px; border: 1px solid var(--line); }
.photo-status { margin-top: 10px; }
.photo-preview { max-height: 160px; border-radius: 6px; border: 1px solid var(--line); margin-top: 10px; display: block; }

/* Mobile handoff page */
.phone { max-width: 440px; margin: 0 auto; padding: 24px 16px; text-align: center; }
.phone .btn { width: 100%; margin-top: 12px; }
.phone .big-input { display: block; width: 100%; padding: 18px; border: 2px dashed var(--teal); border-radius: 12px; background: var(--teal-soft); color: var(--teal-2); font-weight: 700; cursor: pointer; }
.phone .big-input input { display: none; }

.trial-bar { background: #FFF7E6; border-bottom: 1px solid #F3DFB6; color: #6A4A0C; font-size: .9rem; padding: 8px 0; }
.trial-bar .wrap { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.trial-bar.ended { background: var(--bad-soft); border-color: #EFC2BD; color: #7A1A14; }

@media (max-width: 640px) {
  .topbar .wrap { padding-top: 8px; padding-bottom: 8px; }
  .topbar nav { margin-left: 0; width: 100%; }
  .hero { padding: 36px 0 48px; }
  .card { padding: 16px; }
  .preview-frame { height: 420px; }
  th, td { padding: 8px 6px; }
}
@media print { .topbar, .trial-bar, footer { display: none; } }
.card-warn { border-color: #F0CDB2; }
.print-all { border-color: var(--teal); }
.waiting { margin-top: 10px; min-height: 22px; }
.waiting-line { display: flex; align-items: baseline; gap: 2px; }
.waiting-count { font-size: 1.5rem; font-weight: 700; color: var(--navy); line-height: 1; }
.master-print { margin-bottom: 16px; }
[hidden] { display: none !important; }
.setup-alert { display: flex; gap: 14px; align-items: flex-start; background: var(--warn-soft); border: 2px solid var(--warn); border-radius: 12px; padding: 16px 18px; margin: 0 0 16px; color: #4A2408; }
.setup-alert h2 { margin: 0 0 4px; font-size: 1.15rem; color: #4A2408; }
.setup-alert p { margin: 0 0 8px; }
.setup-alert ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.setup-alert li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.setup-alert-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--warn); color: #fff; font-weight: 800; font-size: 1.2rem; display: grid; place-items: center; }
.setup-alert-body { flex: 1; min-width: 0; }
.waiting-warn { margin-top: 6px; font-size: .8rem; }

/* Pay bills */
.btn-warn-soft { background: var(--warn-soft); color: #7A3410; border-color: var(--warn); }
.btn-warn-soft:hover { color: #4A2408; border-color: #7A3410; }
.bill-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.bill-filters .field { margin: 0; flex: 1 1 200px; }
.bill-company { padding: 0; overflow: hidden; }
.bill-company-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; background: #FBFAF7; border-bottom: 1px solid var(--line); }
.bill-company-head h2 { margin: 0; font-size: 1.2rem; }
.bill-company-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.bill-company-controls .field { margin: 0; }
.bill-company-controls select { min-width: 230px; }
.bill-table { min-width: 820px; }
.bill-table td:first-child, .bill-table th:first-child { padding-left: 18px; }
.bill-table td:last-child, .bill-table th:last-child { padding-right: 18px; }
.bill-table tr.is-picked td { background: #F4FAF8; }
.qb-link { text-decoration: none; font-weight: 500; }
.amt-input { width: 120px; text-align: right; font-variant-numeric: tabular-nums; }
.pay-bar { position: sticky; bottom: 0; z-index: 5; background: var(--navy); color: #fff; margin: 16px -16px 0; box-shadow: 0 -4px 18px rgba(15, 42, 68, .18); }
.pay-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.pay-bar-main { font-size: 1.1rem; font-weight: 700; }
.pay-bar-sub { color: #C9D6E3; }
.pay-bar .btn-primary[disabled] { opacity: .55; }
.review-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.review-stats .card { margin: 0; padding: 14px 16px; }
.review-stats .label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.review-stats .value { font-size: 1.6rem; font-weight: 700; color: var(--navy); }
.credit-box { background: var(--teal-soft); border: 1px solid #9FD3C3; border-radius: var(--radius); padding: 12px 14px; margin: 10px 18px; }
.credit-box .check-label { min-height: 40px; }
.pdf-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 28px 16px; min-height: 200px; border: 1px dashed var(--line); border-radius: 8px; background: #FBFAF7; color: var(--navy); }
.pdf-fallback p { margin: 0; max-width: 34ch; color: var(--muted); font-size: .92rem; }
.ifield { width: 100%; height: 46px; border: 0; display: block; }
.exp-row { display: flex; gap: 8px; }
.card-form .row { display: flex; gap: 12px; flex-wrap: wrap; }
.card-form .row .field { flex: 1 1 140px; }
.label { font-weight: 600; display: block; margin-bottom: 6px; }
details > summary { list-style: none; display: inline-block; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
