/*
 * LocalFound app UI — request wizard, customer account, business portal, checkout.
 * Built on the tokens in main.css. Tables collapse to cards below 760px.
 */

/* Flash messages & status ---------------------------------------------- */
.flash { margin: 0 0 22px; padding: 15px 18px; border-radius: 7px; font-size: 15px; line-height: 1.7; border: 1px solid; }
.flash:focus { outline: var(--focus); }
.flash-success { background: var(--success-bg); border-color: #bfe3c9; color: var(--success); }
.flash-error { background: var(--danger-bg); border-color: #f2c4bd; color: var(--danger); }
.flash ul { margin: 8px 0 0; padding-left: 18px; }
.flash a { text-decoration: underline; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 4px; font-size: 12px; line-height: 1.5; font-weight: 600; letter-spacing: .3px; background: #edf3ff; color: #31548b; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.status-ok { background: var(--success-bg); color: var(--success); }
.status-warn { background: var(--warn-bg); color: var(--warn-ink); }
.status-bad { background: var(--danger-bg); color: var(--danger); }
.status-muted { background: #eef0f4; color: #5b6475; }
.sandbox-flag { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 30px; background: var(--warn-bg); color: var(--warn-ink); font-size: 12px; font-weight: 600; }

/* Generic panels -------------------------------------------------------- */
.panel { background: #fff; border: 1px solid #e5e9f2; border-radius: var(--radius); padding: 32px; }
.panel + .panel, .panel + .side-quote, .side-quote + .panel { margin-top: 20px; }
.panel h2 { font-size: 30px; line-height: 1.3; color: var(--blue); margin-bottom: 12px; }
.panel h3 { font-size: 22px; line-height: 1.35; color: var(--blue); margin-bottom: 10px; }
.panel p { font-size: 16px; line-height: 1.8; }
.panel.tight { padding: 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head h2, .panel-head h3 { margin: 0; }
.work-layout { display: grid; grid-template-columns: 1.5fr .75fr; gap: 28px; align-items: start; padding-bottom: 70px; }
.side-quote { padding: 29px; border-radius: var(--radius); background: #eff3fd; }
.side-quote h3 { font-size: 26px; line-height: 1.25; color: var(--blue); }
.side-quote p { margin-top: 14px; font-size: 15px; }
.side-quote ul { list-style: none; padding: 0; margin: 22px 0 0; font-size: 15px; line-height: 1.8; }
.side-quote li { padding: 12px 0; border-top: 1px solid #dce4f6; }
.side-quote li::before { content: '✓'; margin-right: 10px; color: var(--blue); }
.side-quote .footnote { font-size: 13px; line-height: 1.8; }

/* Request wizard -------------------------------------------------------- */
.progress { display: flex; gap: 8px; margin: 0 0 30px; padding: 0; list-style: none; }
.progress li { flex: 1; padding-top: 12px; border-top: 3px solid #e8eae2; font-size: 13px; line-height: 1.5; color: var(--muted); }
.progress li.current, .progress li.done { border-color: #d7a015; color: var(--blue); }
.progress li.current { font-weight: 600; }
.progress button { all: unset; cursor: pointer; }
.progress button:focus-visible { outline: var(--focus); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 25px; }
.field.wide { grid-column: 1 / -1; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; }
.choice { position: relative; display: block; min-height: 135px; padding: 22px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #f6f8fc; text-align: left; font-size: 15px; line-height: 1.55; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice b { display: block; margin-bottom: 12px; font-size: 25px; font-weight: 400; color: var(--blue); }
.choice:has(input:checked) { background: var(--soft-blue); border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.choice:has(input:focus-visible) { outline: var(--focus); outline-offset: 2px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { position: relative; display: inline-flex; align-items: center; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 30px; background: #fff; font-size: 14px; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip:has(input:checked) { background: var(--soft-blue); border-color: var(--blue); color: var(--blue); font-weight: 600; }
.chip:has(input:focus-visible) { outline: var(--focus); outline-offset: 2px; }
.wizard-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.wizard-step + .wizard-step { margin-top: 40px; padding-top: 34px; border-top: 1px solid var(--line); }
.js .wizard-step + .wizard-step { margin-top: 0; padding-top: 0; border-top: 0; }
.js .wizard-step[hidden] { display: none; }
.wizard-step legend { padding: 0; }
.wizard-step h2 { font-size: 30px; line-height: 1.3; color: var(--blue); margin-bottom: 8px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-actions .spacer { flex: 1; }
.review-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
.review-list > div { padding: 14px 16px; border-radius: 6px; background: #f4f6fb; font-size: 15px; overflow-wrap: anywhere; }
.review-list small { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.review-list .wide { grid-column: 1 / -1; white-space: pre-wrap; }
.upload-zone { padding: 22px; border: 1px dashed #c9d3ea; border-radius: var(--radius); background: #f8faff; }
.upload-zone input[type=file] { font-size: 15px; max-width: 100%; }
.hp-field { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.success-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 20px; border-radius: 50%; background: var(--soft-blue); color: var(--blue); font-size: 26px; }

/* App shell (portal / account) ----------------------------------------- */
.app-shell { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; padding-bottom: 70px; }
.portal-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 4px; padding: 14px; background: #f7f8fc; border: 1px solid #e7ebf3; border-radius: var(--radius); }
.portal-nav .nav-label { margin: 6px 12px 8px; font-size: 12px; letter-spacing: 1.2px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.portal-nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 13px; border-radius: 6px; font-size: 15px; line-height: 1.4; color: var(--ink); }
.portal-nav a:hover { background: #eef2fc; }
.portal-nav a[aria-current="page"] { background: var(--blue); color: #fff; }
.portal-nav a .ico { width: 20px; text-align: center; opacity: .85; }
.portal-nav .count { margin-left: auto; min-width: 24px; padding: 1px 7px; border-radius: 20px; background: var(--gold); color: var(--gold-ink); font-size: 12px; font-weight: 700; text-align: center; }
.portal-nav .biz { margin: 12px 4px 4px; padding: 14px 10px 4px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.portal-nav .biz strong { display: block; color: var(--ink); font-size: 14px; }
.portal-main { min-width: 0; }
.portal-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.portal-heading h1, .portal-heading h2 { font-size: 32px; line-height: 1.3; color: var(--blue); letter-spacing: -.8px; }
.portal-heading .eyebrow { margin-bottom: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 22px; }
.stat { display: block; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
a.stat:hover { border-color: #ced9f5; background: #fbfcff; }
.stat small { display: block; font-size: 14px; line-height: 1.5; color: var(--muted); }
.stat strong { display: block; margin-top: 8px; font-size: 34px; line-height: 1.1; font-weight: 500; color: var(--blue); }
.next-action { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 20px 22px; margin-bottom: 14px; border-radius: var(--radius); background: var(--soft-blue); border: 1px solid #d8e2fb; }
.next-action.gold { background: var(--warn-bg); border-color: #f1df9b; }
.next-action h3 { font-size: 19px; color: var(--blue); margin-bottom: 4px; }
.next-action p { font-size: 15px; }
.meter { height: 10px; border-radius: 10px; background: #e8ecf5; overflow: hidden; margin: 12px 0; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #3767c5); border-radius: 10px; }
.todo { list-style: none; padding: 0; margin: 10px 0 0; font-size: 15px; }
.todo li { padding: 6px 0; color: var(--muted); }
.todo li::before { content: '○ '; color: var(--gold-text); }

/* Job cards / lists ----------------------------------------------------- */
.job { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 25px; }
.job + .job { margin-top: 14px; }
.job-top { display: flex; justify-content: space-between; gap: 15px; flex-wrap: wrap; align-items: center; }
.job h3 { margin: 12px 0 8px; font-size: 24px; line-height: 1.3; color: var(--blue); }
.job h3 a:hover { text-decoration: underline; }
.job p { font-size: 16px; line-height: 1.8; }
.job-details { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0; font-size: 14px; line-height: 1.75; color: var(--muted); }
.job-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.7; }
.fee-line strong { font-size: 20px; color: var(--ink); }
.fee-line small { display: block; color: var(--muted); font-size: 13px; }
.photo-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.photo-row img { width: 140px; height: 105px; border-radius: 6px; border: 1px solid var(--line); }

/* Data tables → cards on mobile ---------------------------------------- */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px; }
.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); background: #f7f8fc; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; white-space: nowrap; }

/* Compare responses ----------------------------------------------------- */
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 18px; }
.quote-card { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.quote-card.selected { border-color: var(--blue); background: #f5f8ff; box-shadow: inset 0 0 0 1px var(--blue); }
.quote-card h3 { font-size: 20px; line-height: 1.35; color: var(--blue); margin: 10px 0 4px; }
.quote-card .amount { font-size: 24px; font-weight: 600; color: var(--ink); margin: 10px 0 2px; }
.quote-card dl { margin: 14px 0; display: grid; gap: 10px; }
.quote-card dt { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.quote-card dd { margin: 0; font-size: 15px; line-height: 1.7; }
.quote-card form, .quote-card .card-actions { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }

/* Timeline -------------------------------------------------------------- */
.timeline { list-style: none; padding: 0; margin: 18px 0 0; }
.timeline li { position: relative; padding: 0 0 18px 30px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.timeline li::before { content: ''; position: absolute; left: 7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #c9d3ea; background: #fff; }
.timeline li::after { content: ''; position: absolute; left: 12px; top: 20px; bottom: 0; width: 2px; background: #e3e8f3; }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--blue); border-color: var(--blue); }
.timeline li.current::before { background: var(--gold); border-color: var(--gold); }
.timeline li.current, .timeline li.done { color: var(--ink); }
.timeline strong { display: block; }

/* Contact reveal -------------------------------------------------------- */
.contact-box { padding: 22px; border-radius: var(--radius); background: #f5f8ff; border: 1px solid #d8e2fb; }
.contact-box[data-state="locked"] { background: #f7f8fc; border-style: dashed; }
.contact-box dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; margin: 14px 0 0; font-size: 15px; }
.contact-box dt { color: var(--muted); }
.contact-box dd { margin: 0; overflow-wrap: anywhere; }

/* Checkout -------------------------------------------------------------- */
.checkout-card { max-width: 560px; margin: 0 auto 70px; }
.sandbox-banner { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin-bottom: 20px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #f1df9b; font-size: 14px; line-height: 1.7; }
.sandbox-banner strong { display: block; }
.option-cards { display: grid; gap: 10px; margin: 16px 0; }
.option-card { position: relative; display: flex; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-size: 15px; }
.option-card input { margin-top: 5px; accent-color: var(--blue); width: 18px; height: 18px; flex-shrink: 0; }
.option-card:has(input:checked) { border-color: var(--blue); background: #f5f8ff; }
.option-card strong { display: block; color: var(--ink); }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-bottom: 70px; align-items: start; }
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.service { padding: 24px; border: 1px solid var(--line); background: #fff; border-radius: 9px; display: flex; flex-direction: column; }
.service h3 { margin: 12px 0; font-size: 22px; line-height: 1.3; color: var(--blue); }
.service p { font-size: 15px; margin-bottom: 18px; }
.service details { margin-top: auto; }
.service summary { cursor: pointer; display: inline-flex; }
.settings-section + .settings-section { margin-top: 20px; }
.danger-zone { border-color: #f2c4bd; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1120px) {
	.work-layout { grid-template-columns: 1.4fr .8fr; }
	.stat-grid { grid-template-columns: repeat(2, 1fr); }
	.app-shell { grid-template-columns: 210px 1fr; }
}
@media (max-width: 900px) {
	.work-layout, .auth-grid { grid-template-columns: 1fr; }
	.app-shell { grid-template-columns: 1fr; gap: 18px; }
	.portal-nav { position: static; flex-direction: row; overflow-x: auto; padding: 8px; gap: 6px; scrollbar-width: thin; }
	.portal-nav .nav-label, .portal-nav .biz { display: none; }
	.portal-nav a { flex-shrink: 0; min-height: 44px; font-size: 14px; white-space: nowrap; }
}
@media (max-width: 760px) {
	.panel { padding: 22px; }
	.panel h2, .wizard-step h2 { font-size: 26px; }
	.progress { gap: 5px; }
	.progress li { font-size: 12px; }
	.progress li .step-name { display: none; }
	.progress li.current .step-name { display: inline; }
	.form-grid, .review-list { grid-template-columns: 1fr; gap: 18px; }
	.choice-grid { gap: 7px; }
	.choice { min-height: 145px; padding: 17px 11px; font-size: 14px; }
	.form-actions { flex-wrap: wrap; }
	.form-actions > .btn { flex: 1; }
	.portal-heading h1, .portal-heading h2 { font-size: 27px; }
	.stat { padding: 15px 12px; }
	.stat small { font-size: 12px; }
	.stat strong { font-size: 28px; }
	.job { padding: 20px; }
	.job h3 { font-size: 22px; }
	.job-bottom { flex-direction: column; align-items: stretch; }
	.job-bottom .btn { width: 100%; }
	.services-grid { grid-template-columns: 1fr; }
	.data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
	.data-table { border: 0; background: transparent; }
	.data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
	.data-table tr { margin-bottom: 12px; padding: 6px 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
	.data-table td { display: flex; justify-content: space-between; gap: 14px; padding: 9px 16px; border: 0; text-align: right; }
	.data-table td::before { content: attr(data-label); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); text-align: left; flex-shrink: 0; }
	.data-table .num { text-align: right; }
	.contact-box dl { grid-template-columns: 1fr; gap: 2px; }
	.contact-box dd { margin-bottom: 8px; }
}
@media (max-width: 390px) {
	.choice-grid { grid-template-columns: 1fr; }
	.choice { min-height: 70px; display: flex; align-items: center; gap: 15px; }
	.choice b { margin: 0; }
	.stat-grid { grid-template-columns: 1fr; }
	.stat { display: flex; align-items: center; justify-content: space-between; }
	.stat strong { margin: 0; }
}
.js .no-js-only { display: none; }
