:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #657084;
  --line: #dfe5ec;
  --surface: #ffffff;
  --soft: #f4f7fa;
  --brand: #183153;
  --accent: #147d73;
  --danger: #b42318;
  --warning: #9a6700;
  --shadow: 0 14px 40px rgba(24,49,83,.09);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: linear-gradient(145deg,#f5f8fb 0%,#eef5f3 100%); color: var(--ink); }
a { color: inherit; }
.site-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 max(20px,calc((100% - 1180px)/2)); background: rgba(24,49,83,.96); color: white; box-shadow: 0 2px 14px rgba(0,0,0,.15); }
.brand { font-size: 20px; font-weight: 800; text-decoration: none; letter-spacing: .06em; white-space: nowrap; }
nav { display: flex; gap: 20px; align-items: center; }
nav a,.link-button { color: #e9f0f7; background: none; border: 0; padding: 0; text-decoration: none; font: inherit; cursor: pointer; }
nav a:hover,.link-button:hover { color: white; text-decoration: underline; }
.nav-form { display: inline; margin: 0; }
.container { width: min(1180px,calc(100% - 32px)); min-height: calc(100vh - 134px); margin: 36px auto; }
footer { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; padding: 48px; border-radius: 24px; background: radial-gradient(circle at 80% 20%,rgba(20,125,115,.18),transparent 42%),var(--brand); color: white; box-shadow: var(--shadow); }
.hero h1 { max-width: 600px; margin: 0 0 16px; font-size: clamp(32px,5vw,56px); line-height: 1.1; }
.hero p { color: #d9e5ee; font-size: 18px; line-height: 1.8; }
.hero-card { padding: 28px; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: rgba(255,255,255,.1); backdrop-filter: blur(12px); }
.hero-card strong { display: block; margin-bottom: 8px; font-size: 22px; }
.hero-card ol { padding-left: 22px; line-height: 2; color: #e8f0f7; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 24px; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(26px,4vw,38px); }
.page-head p { margin: 0; color: var(--muted); }
.card { padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.narrow { width: min(520px,100%); margin: 0 auto; }
.card h1,.card h2 { margin-top: 0; }
.stack { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.plan-time-range { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; margin: 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); }
.plan-time-range legend { padding: 0 8px 0 0; font-weight: 700; }
.plan-time-range legend span { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
.plan-time-range > small { grid-column: 1 / -1; color: var(--muted); }
.plan-core-field { display:grid; gap:8px; }
label { display: grid; gap: 8px; font-weight: 700; }
label small,.help { color: var(--muted); font-weight: 400; line-height: 1.6; }
input,select,textarea { width: 100%; border: 1px solid #bcc7d4; border-radius: 10px; padding: 12px 13px; background: white; color: var(--ink); font: inherit; outline: none; }
input:focus,select:focus,textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20,125,115,.14); }
textarea { min-height: 100px; resize: vertical; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; line-height: 1.6; }
.checkbox input { width: 18px; margin-top: 4px; }
.button,.button-secondary,.button-danger { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; border: 0; border-radius: 10px; padding: 0 18px; background: var(--accent); color: white; font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { background: #0d675f; }
.button-secondary { background: #e8edf3; color: var(--ink); }
.button-danger { background: var(--danger); }
.button-danger:disabled { opacity: .45; cursor: not-allowed; }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; }
.report-items { display: grid; gap: 14px; }
.bulk-import { padding: 18px; border: 1px solid #a9d7cf; border-radius: 14px; background: #effaf7; }
.bulk-import h2 { margin: 0 0 14px; font-size: 18px; }
.bulk-import textarea { background: white; font-family: "SFMono-Regular",Consolas,monospace; }
.bulk-message { min-height: 22px; margin: 10px 0 0; color: #075f4d; font-weight: 700; }
.bulk-message.error { color: var(--danger); }
.format-example { display: grid; gap: 8px; padding: 15px 16px; border: 1px solid #a9d7cf; border-radius: 12px; background: #effaf7; color: #075f4d; }
.format-example span { display: block; }
.plan-total { padding: 15px 16px; border-radius: 12px; background: #e7f1fb; color: #173f69; font-size: 16px; font-weight: 800; }
.report-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: end; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.report-item-number { grid-column: 1 / -1; color: var(--muted); font-size: 13px; font-weight: 800; }
.remove-report { min-height: 44px; border: 1px solid #efaaa4; border-radius: 10px; padding: 0 14px; background: white; color: var(--danger); font-weight: 800; cursor: pointer; }
.remove-report:disabled { visibility: hidden; }
.duplicate-edit-item { border-color: #efaaa4; background: #fff5f4; }
.text-link { color: #0f6f67; font-weight: 700; text-decoration: none; }
.action-link { display: inline-block; border: 1px solid #82bdb5; border-radius: 8px; padding: 7px 10px; background: #effaf7; white-space: nowrap; }
.alert { margin-bottom: 20px; border-radius: 12px; padding: 14px 16px; line-height: 1.6; }
.alert.success { border: 1px solid #86cdb9; background: #eaf8f3; color: #075f4d; }
.alert.error { border: 1px solid #efaaa4; background: #fff1f0; color: #8f1e16; }
.stats { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.stat { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.stat span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.stat strong { font-size: clamp(24px,3vw,34px); }
.dashboard-section { margin-top: 30px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th,td { padding: 15px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--soft); color: #485469; font-size: 13px; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
td small { display: block; margin-top: 5px; color: var(--muted); }
code { font-family: "SFMono-Regular",Consolas,monospace; font-size: 13px; overflow-wrap: anywhere; }
.tracking-list { white-space: pre-line; }
.tracking-entry { display: block; margin-bottom: 7px; }
.tracking-entry:last-child { margin-bottom: 0; }
.tracking-duplicate { margin: 0 -7px 7px; border-left: 4px solid var(--danger); border-radius: 6px; padding: 6px 8px; background: #fff0ee; }
.duplicate-tag { color: var(--danger); font-weight: 800; }
.duplicate-tag a { color: inherit; }
.duplicate-row { background: #fff7f6; }
.danger-text { color: var(--danger); }
.badge { display: inline-block; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge-pending { background: #fff3cf; color: #765200; }
.badge-approved { background: #dff6ed; color: #075f4d; }
.badge-needs_info { background: #fff0d8; color: #8a4b00; }
.badge-needs_verification { background: #ffe1de; color: #94261e; }
.badge-void { background: #eceff3; color: #596273; }
.badge-refund-unpaid { background: #eceff3; color: #596273; }
.badge-refund-pending,.badge-batch-pending_payment { background: #fff3cf; color: #765200; }
.badge-refund-partial { background: #e7f1fb; color: #173f69; }
.badge-refund-paid,.badge-batch-paid { background: #dff6ed; color: #075f4d; }
.badge-batch-cancelled { background: #eceff3; color: #596273; }
.refund-issue { background: #fff7f6; }
.warning-text { color: var(--warning) !important; font-weight: 800; }
.refund-filter-panel { grid-template-columns: repeat(3,minmax(0,1fr)); }
.confirm-actions,.inline-confirm { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.mini-form { display: grid; grid-template-columns: minmax(150px,1fr) auto; gap: 8px; min-width: 320px; }
.user-edit-form { min-width: 320px; margin: 14px 0; }
.empty { padding: 50px; border: 1px dashed #bcc7d4; border-radius: 14px; color: var(--muted); text-align: center; }
.details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; margin: 0; }
.details div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.details dt { margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.details dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,.6fr); gap: 24px; align-items: start; }
.split > *,.stack > *,.merchant-workspace-grid > * { min-width: 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: white; text-decoration: none; font-size: 14px; }
.filters a.active { background: var(--brand); color: white; }
.filter-panel { display: grid; grid-template-columns: 1.1fr 1.5fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.filter-panel label { font-size: 13px; }
.admin-filter-panel { grid-template-columns: repeat(4,minmax(0,1fr)); align-items:start; }
.filter-panel-heading { grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); padding-bottom:13px; }
.filter-panel-heading h2 { margin:0; font-size:18px; }
.filter-panel-heading p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.admin-filter-panel .filter-keyword { grid-column:span 2; }
.admin-filter-panel .plan-filter,.admin-filter-panel .bulk-filter { grid-column:span 2; }
.admin-filter-panel .filter-actions { grid-column:1 / -1; justify-content:flex-end; padding-top:2px; }
.filter-actions { display: flex; gap: 8px; }
.bulk-filter { grid-column: 1 / -1; }
.bulk-filter textarea { min-height: 88px; font-family: "SFMono-Regular",Consolas,monospace; }
.plan-filter { grid-column: span 2; }
.plan-filter select { min-height: 112px; }
.batch-form { display: grid; gap: 14px; }
.batch-toolbar { display: grid; grid-template-columns: minmax(180px,.7fr) minmax(240px,1.3fr) auto; gap: 12px; align-items: end; padding: 16px; border: 1px solid #a9d7cf; border-radius: 14px; background: #effaf7; }
.select-cell { width: 48px; text-align: center; }
.select-cell input { width: 18px; height: 18px; }
.custom-export { margin-bottom: 18px; border: 1px solid #a9d7cf; border-radius: 14px; background: #effaf7; }
.custom-export summary { padding: 16px 18px; color: #075f4d; font-weight: 800; cursor: pointer; }
.custom-export form { padding: 0 18px 18px; }
.report-filter-export-shell { display:grid; gap:0; overflow:visible; margin-bottom:18px; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:var(--shadow); }
.report-filter-export-shell .report-filter-v2 { margin-bottom:0; border:0; border-radius:0; box-shadow:none; }
.report-filter-export-shell .custom-export { margin-bottom:0; border:0; border-top:1px solid var(--line); border-radius:0; background:#f7faf8; }
.report-export-actions { display:grid; grid-template-columns:minmax(220px,300px) minmax(180px,220px) minmax(220px,1fr); align-items:center; gap:12px; border:0; border-top:1px solid var(--line); border-radius:0; padding:14px 18px; background:#f7faf8; }
.report-export-actions > div:first-child { grid-column:1 / 3; }
.report-export-actions strong,.report-export-actions small { display:block; }
.report-export-actions strong { color:#075f4d; font-size:14px; }
.report-export-actions small { margin-top:3px; color:#5f746b; font-size:10px; }
.report-export-actions .button-row { display:grid; grid-column:3; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:0; overflow:hidden; width:100%; max-width:none; margin:0; border:1px solid #176044; border-radius:10px; background:#fff; }
.report-export-actions .button-row > * { margin:0; border:0; border-radius:0; box-shadow:none; }
.report-export-actions .button-row > * { width:100%; }
.report-export-actions .button-row > * + * { border-left:1px solid #a9d7cf; }
.report-export-actions .button-row > *:hover { transform:none; box-shadow:none; }
.field-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 14px 0 18px; }
.field-option { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: 14px; font-weight: 600; }
.field-option input { width: 18px; height: 18px; }
.admin-reports-page { display:grid; }
.report-page-head { align-items:center; margin-bottom:14px; }
.report-page-head p { font-size:12px; }
.report-title-line { display:flex; align-items:center; gap:10px; }
.report-title-line h1 { margin:0; font-size:30px; }
.report-title-line span { border-radius:999px; padding:5px 9px; background:#e7f3eb; color:#176044; font-size:10px; font-weight:850; }
.admin-reports-page .report-filter-export-shell { margin-bottom:14px; box-shadow:0 5px 18px rgba(22,56,38,.045); }
.admin-reports-page .filter-panel-heading { min-height:54px; padding:12px 16px; }
.admin-reports-page .report-filter-primary { min-height:68px; padding:12px 16px; }
.admin-reports-page .report-filter-v2 .filter-actions { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:0; overflow:hidden; width:100%; max-width:none; margin:0; border:1px solid #176044; border-radius:10px; background:#fff; }
.admin-reports-page .report-filter-v2 .filter-actions > * { width:100%; margin:0; border:0; border-radius:0; box-shadow:none; }
.admin-reports-page .report-filter-v2 .filter-actions > * + * { border-left:1px solid #a9d7cf; }
.admin-reports-page .report-filter-v2 .filter-actions > *:hover { transform:none; box-shadow:none; }
.admin-reports-page .report-export-actions { min-height:68px; padding:12px 16px; }
.admin-reports-page .report-filter-v2 .filter-actions,.admin-reports-page .report-export-actions .button-row { height:44px; }
.admin-reports-page .report-filter-v2 .filter-actions > *,.admin-reports-page .report-export-actions .button-row > * { min-height:42px; padding:0 14px; white-space:nowrap; }
.admin-reports-page .custom-export summary { padding:12px 16px; font-size:12px; }
.admin-reports-page .report-table-wrap { border-radius:10px; box-shadow:none; }
.admin-reports-page .admin-report-table { min-width:930px; table-layout:fixed; }
.admin-reports-page .admin-report-table th,.admin-reports-page .admin-report-table td { padding:11px 12px; vertical-align:middle; }
.admin-reports-page .admin-report-table th { background:#f4f7f5; color:#57665e; font-size:10px; letter-spacing:0; text-transform:none; }
.admin-reports-page .admin-report-table td { font-size:12px; line-height:1.45; }
.admin-reports-page .admin-report-table .select-cell { width:44px; padding-right:8px; padding-left:8px; text-align:center; }
.admin-reports-page .report-person-col { width:128px; }
.admin-reports-page .report-tracking-col { width:250px; }
.admin-reports-page .report-plan-col { width:150px; }
.admin-reports-page .report-amount-col { width:105px; }
.admin-reports-page .report-time-col { width:155px; }
.admin-reports-page .report-action-col { width:105px; }
.admin-reports-page .report-person-cell strong { font-size:12px; }
.admin-reports-page .report-plan-cell,.admin-reports-page .report-amount-cell { font-weight:750; }
.admin-reports-page .report-tracking-cell code { font-size:11px; }
.admin-reports-page .report-tracking-cell .tracking-entry { margin-bottom:4px; }
.admin-reports-page .report-time-cell { color:#59675e; white-space:nowrap; }
.admin-reports-page .report-action-cell .action-link { border-radius:7px; padding:6px 9px; font-size:10px; }
.admin-reports-page .pagination { margin-top:14px; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.pagination a { min-width: 34px; padding: 7px; border-radius: 8px; background: white; text-align: center; text-decoration: none; }
.pagination a.current { background: var(--brand); color: white; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.history time { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.plan-list { display: grid; gap: 14px; }
.plan-card { display: grid; grid-template-columns: 1.3fr .8fr .6fr; gap: 12px; align-items: end; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.plan-card-footer { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.export-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.export-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 220px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.export-card h2 { margin: 0 0 10px; }
.export-card p { flex: 1; margin: 0 0 22px; color: var(--muted); line-height: 1.7; }
.export-card.featured { border-color: #86cdb9; background: #effaf7; }
.mobile-addresses { display: grid; gap: 12px; }
.mobile-address { padding: 16px; border: 1px solid #a9d7cf; border-radius: 12px; background: #effaf7; }
.mobile-address span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.mobile-address a { color: #075f4d; font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.mobile-steps { margin: 24px 0; padding-left: 24px; line-height: 2; }
.merchant-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.merchant-heading h1 { margin: 4px 0 7px; font-size: 36px; }
.merchant-heading p { margin: 0; color: var(--muted); }
.merchant-kicker { color: #0f6f67; font-size: 13px; font-weight: 800; }
.merchant-tabs { margin-bottom: 22px; }
.merchant-stats { grid-template-columns: repeat(5,minmax(0,1fr)); }
.merchant-action-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.merchant-action-grid > a,.merchant-action-grid > div { min-height: 116px; border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: white; text-decoration: none; }
.merchant-action-grid strong,.merchant-action-grid span { display: block; }
.merchant-action-grid span { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.merchant-action-grid a { border-color: #a9d7cf; background: #effaf7; }
.merchant-workspace-grid { display: grid; grid-template-columns: minmax(320px,.65fr) minmax(0,1.35fr); gap: 24px; align-items: start; }
.merchant-plan-list { gap: 6px; }
.merchant-plan-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: white; }
.merchant-plan-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.merchant-plan-row .plan-title>strong { font-size: 13px; }
.merchant-plan-row .badge { padding: 3px 7px; font-size: 9px; }
.merchant-plan-row .button-row { gap: 6px; }
.merchant-plan-row .button-secondary,.merchant-plan-row .button-danger { min-height: 32px; border-radius: 7px; padding: 0 10px; font-size: 10px; }
.merchant-plan-link { color: inherit; text-decoration: none; }
.merchant-plan-link > span { color: #0f6f67; font-weight: 700; }
.plan-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.plan-metrics { display: grid; gap: 2px; color: var(--muted); font-size: 10px; line-height:1.3; text-align: right; }
.plan-status-draft { background: #eceff3; color: #596273; }
.plan-status-open { background: #dff6ed; color: #075f4d; }
.plan-status-closed,.plan-status-settling { background: #fff3cf; color: #765200; }
.plan-status-settled { background: #e7f1fb; color: #173f69; }
.plan-status-cancelled { background: #ffe1de; color: #94261e; }

/* PROTOTYPE — throwaway front-end directions for the merchant overview. */
.frontend-prototype { --proto-ink:#17211d; --proto-muted:#66736c; --proto-line:#dce2de; position:relative; margin:-10px 0 90px; color:var(--proto-ink); }
.frontend-prototype a { text-decoration:none; }
.prototype-context { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; padding:22px 0 28px; }
.prototype-context h1 { margin:5px 0 6px; font-size:clamp(30px,4vw,46px); line-height:1.05; letter-spacing:-.04em; }
.prototype-context p { margin:0; color:var(--proto-muted); }
.prototype-eyebrow,.prototype-section-head span,.prototype-aside-label,.prototype-b-toolbar span,.prototype-c-title>div>span { color:#66736c; font-size:11px; font-weight:900; letter-spacing:.13em; text-transform:uppercase; }
.prototype-header-actions { display:flex; gap:9px; flex-wrap:wrap; }
.prototype-header-actions a { border:1px solid var(--proto-line); border-radius:9px; padding:11px 15px; background:#fff; font-size:13px; font-weight:800; }
.prototype-header-actions a.is-primary { border-color:#13231b; background:#13231b; color:#fff; }
.prototype-section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:15px; }
.prototype-section-head h2 { margin:4px 0 0; font-size:23px; letter-spacing:-.03em; }
.prototype-section-head>a { color:#236348; font-size:13px; font-weight:800; }
.prototype-task-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:15px 0 28px; }
.prototype-task { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:14px; min-height:100px; border:1px solid var(--proto-line); border-radius:13px; padding:17px; background:#fff; box-shadow:0 8px 25px rgba(20,34,27,.045); }
.prototype-task-count { display:grid; place-items:center; width:42px; height:42px; border-radius:10px; background:#edf2ef; font-size:22px; font-weight:900; }
.prototype-task strong,.prototype-task small { display:block; }
.prototype-task small { margin-top:5px; color:var(--proto-muted); font-size:12px; line-height:1.45; }
.prototype-task>b { color:#236348; font-size:12px; white-space:nowrap; }
.prototype-task.is-danger { border-color:#efc9c2; background:#fffaf8; }
.prototype-task.is-danger .prototype-task-count { background:#f9ded8; color:#9d2f1f; }
.prototype-task.is-warning .prototype-task-count { background:#f8ebc3; color:#755900; }
.prototype-task.is-info .prototype-task-count { background:#dfece6; color:#1d6145; }
.prototype-plan-list { display:grid; gap:8px; }
.prototype-plan-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; align-items:center; gap:15px; border-bottom:1px solid var(--proto-line); padding:15px 4px; color:inherit; }
.prototype-plan-row:first-child { border-top:1px solid var(--proto-line); }
.prototype-plan-row strong,.prototype-plan-row small { display:block; }
.prototype-plan-row>span:first-child small { margin-top:5px; color:var(--proto-muted); font-size:12px; }
.prototype-plan-numbers { min-width:85px; text-align:right; font-size:12px; }
.prototype-plan-numbers b { font-size:18px; }
.prototype-plan-numbers small { margin-top:3px; color:var(--proto-muted); }
.prototype-row-arrow { color:#236348; font-weight:900; }
.prototype-empty { border:1px dashed var(--proto-line); border-radius:12px; padding:30px; color:var(--proto-muted); text-align:center; }
.prototype-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.prototype-metrics>div { border-left:1px solid var(--proto-line); padding:4px 16px; }
.prototype-metrics>div:first-child { border-left:0; }
.prototype-metrics span,.prototype-metrics strong { display:block; }
.prototype-metrics span { margin-bottom:7px; color:var(--proto-muted); font-size:11px; }
.prototype-metrics strong { font-size:20px; letter-spacing:-.03em; white-space:nowrap; }
.prototype-switcher { position:fixed; z-index:100; left:50%; bottom:22px; display:flex; align-items:center; justify-content:center; flex-wrap:nowrap; gap:6px; margin:0; border:1px solid rgba(255,255,255,.18); border-radius:999px; padding:6px; background:#111814; color:#fff; font-size:initial; box-shadow:0 14px 40px rgba(0,0,0,.28); transform:translateX(-50%); }
.prototype-switcher>a { display:grid; place-items:center; min-width:38px; height:38px; border-radius:999px; color:#fff; font-size:18px; font-weight:900; }
.prototype-switcher>a:hover { background:rgba(255,255,255,.12); }
.prototype-switcher>span { min-width:150px; padding:0 8px; text-align:center; }
.prototype-switcher small,.prototype-switcher strong { display:block; }
.prototype-switcher small { color:#9eaaa3; font-size:9px; letter-spacing:.13em; text-transform:uppercase; }
.prototype-switcher strong { margin-top:2px; font-size:12px; }
.prototype-switcher .prototype-exit { min-width:auto; border-left:1px solid #3d4741; border-radius:0; padding:0 9px; color:#b9c3bd; font-size:11px; }

/* A — attention-first daily workspace */
.prototype-a { --proto-green:#185b3f; }
.prototype-a-lead { display:flex; align-items:flex-end; justify-content:space-between; gap:25px; border-radius:18px; padding:28px 30px; background:#183f2e; color:#fff; box-shadow:0 18px 40px rgba(24,63,46,.16); }
.prototype-a-lead span { color:#a9c6b7; font-size:12px; font-weight:800; }
.prototype-a-lead h2 { margin:8px 0; font-size:clamp(25px,4vw,38px); letter-spacing:-.035em; }
.prototype-a-lead p { max-width:620px; margin:0; color:#bed0c6; line-height:1.55; }
.prototype-a-lead time { border:1px solid rgba(255,255,255,.17); border-radius:999px; padding:9px 13px; color:#dce9e2; font-size:12px; white-space:nowrap; }
.prototype-a-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(290px,.6fr); gap:30px; }
.prototype-a-grid aside { border-radius:16px; padding:22px; background:#eceee8; }
.prototype-a-grid aside .prototype-metrics { grid-template-columns:repeat(2,1fr); margin:13px 0 18px; }
.prototype-a-grid aside .prototype-metrics>div { border:0; border-top:1px solid #d5dad4; padding:14px 7px; }
.prototype-wide-link { display:block; border-top:1px solid #ccd4ce; padding:15px 7px 0; color:#185b3f; font-size:13px; font-weight:900; }

/* B — lifecycle-first plan cockpit */
.prototype-b .prototype-context { border-bottom:1px solid var(--proto-line); }
.prototype-b>.prototype-metrics { max-width:650px; margin:20px 0 32px auto; }
.prototype-b-toolbar { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-bottom:15px; }
.prototype-b-toolbar h2 { margin:5px 0 0; font-size:27px; }
.prototype-b-toolbar>div:last-child { display:flex; gap:8px; }
.prototype-b-toolbar a { border:1px solid var(--proto-line); border-radius:8px; padding:8px 11px; background:#fff; font-size:12px; font-weight:800; }
.prototype-pipeline { display:grid; grid-template-columns:repeat(5,minmax(165px,1fr)); gap:9px; overflow-x:auto; padding-bottom:8px; }
.prototype-stage { min-height:280px; border:1px solid var(--proto-line); border-radius:12px; background:#eef1ef; }
.prototype-stage>header { display:flex; justify-content:space-between; border-bottom:1px solid var(--proto-line); padding:13px; font-size:12px; font-weight:900; }
.prototype-stage>header b { display:grid; place-items:center; min-width:22px; height:22px; border-radius:999px; background:#d7ded9; }
.prototype-stage>div { display:grid; gap:8px; padding:9px; }
.prototype-stage>div>a { border:1px solid #d8dfda; border-radius:9px; padding:12px; background:#fff; color:inherit; box-shadow:0 4px 10px rgba(20,34,27,.035); }
.prototype-stage a strong,.prototype-stage a small,.prototype-stage a span { display:block; }
.prototype-stage a small { margin:6px 0 13px; color:var(--proto-muted); font-size:11px; }
.prototype-stage a span { border-top:1px solid #edf0ee; padding-top:8px; color:#365746; font-size:11px; font-weight:800; }
.prototype-stage p { padding:12px 4px; color:#909b95; font-size:12px; text-align:center; }
.prototype-b-bottom { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(270px,.6fr); gap:28px; margin-top:32px; }
.prototype-task-stack { display:grid; gap:8px; }
.prototype-task-stack .prototype-task { min-height:80px; }
.prototype-quick-rail { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin-top:13px; }
.prototype-quick-rail>a { border:1px solid var(--proto-line); border-radius:9px; padding:13px; background:#fff; }
.prototype-quick-rail span,.prototype-quick-rail strong,.prototype-quick-rail small { display:block; }
.prototype-quick-rail span { color:#9aa59f; font-size:10px; }
.prototype-quick-rail strong { margin:8px 0 3px; }
.prototype-quick-rail small { color:var(--proto-muted); font-size:11px; }

/* C — persistent navigation and dense business overview */
.prototype-c { margin-top:-36px; }
.prototype-c-shell { display:grid; grid-template-columns:210px minmax(0,1fr); min-height:720px; border:1px solid #d7ddd9; border-radius:18px; overflow:hidden; background:#f7f8f6; box-shadow:0 20px 60px rgba(24,40,31,.11); }
.prototype-c-sidebar { display:flex; flex-direction:column; padding:22px 16px; background:#14251c; color:#fff; }
.prototype-c-brand { display:flex; align-items:center; gap:10px; color:#fff; }
.prototype-c-brand>span { display:grid; place-items:center; width:32px; height:32px; border-radius:9px; background:#d9f16f; color:#16231c; font-weight:900; }
.prototype-c-merchant { margin:28px 0 20px; border:1px solid rgba(255,255,255,.12); border-radius:10px; padding:13px; }
.prototype-c-merchant small,.prototype-c-merchant strong,.prototype-c-merchant span { display:block; }
.prototype-c-merchant small { color:#8ba294; font-size:10px; }
.prototype-c-merchant strong { margin:6px 0; font-size:13px; }
.prototype-c-merchant span { color:#b6c6bd; font-size:10px; }
.prototype-c-sidebar nav { display:grid; gap:4px; }
.prototype-c-sidebar nav>a { display:grid; grid-template-columns:auto 1fr; gap:7px 9px; border-radius:8px; padding:10px; color:#c0cdc6; }
.prototype-c-sidebar nav>a.active { background:#d9f16f; color:#14251c; font-weight:900; }
.prototype-c-sidebar nav>a span { grid-row:span 2; color:#73877b; font-size:9px; }
.prototype-c-sidebar nav>a strong { font-size:12px; }
.prototype-c-sidebar nav>a small { font-size:9px; opacity:.65; }
.prototype-c-switch { margin-top:auto; border-top:1px solid rgba(255,255,255,.12); padding:16px 8px 0; color:#aabdB2; font-size:11px; }
.prototype-c-shell>main { min-width:0; padding:8px 28px 30px; }
.prototype-c-shell .prototype-context { padding:19px 0; }
.prototype-c-shell .prototype-context>div:first-child { display:none; }
.prototype-c-shell .prototype-context { justify-content:flex-end; border-bottom:1px solid var(--proto-line); }
.prototype-c-title { display:grid; grid-template-columns:minmax(220px,.7fr) minmax(480px,1.3fr); align-items:end; gap:22px; padding:26px 0; }
.prototype-c-title h2 { margin:5px 0 0; font-size:30px; }
.prototype-c-grid { display:grid; grid-template-columns:minmax(320px,.8fr) minmax(420px,1.2fr); gap:18px; }
.prototype-c-grid>section { border:1px solid var(--proto-line); border-radius:13px; padding:20px; background:#fff; }
.prototype-c-grid .prototype-task { grid-template-columns:auto 1fr; box-shadow:none; }
.prototype-c-grid .prototype-task>b { grid-column:2; }
.prototype-c-plans .prototype-plan-row { grid-template-columns:minmax(0,1fr) auto; }
.prototype-c-plans .prototype-plan-row .prototype-plan-numbers,.prototype-c-plans .prototype-row-arrow { display:none; }

/* CLIENT PROTOTYPE — three mobile-first directions on the merchant overview route. */
.client-prototype { --client-green:#165c41; --client-mint:#e8f3ed; --client-ink:#17221c; --client-muted:#6d776f; width:min(100%,480px); margin:-12px auto 100px; color:var(--client-ink); }
body:has(.client-prototype)>.site-header,body:has(.client-prototype)>footer { display:none; }
body:has(.client-prototype)>.container { min-height:100vh; margin:0 auto; padding:22px 0; }
.client-home { --client-green:#165c41; --client-mint:#e8f3ed; --client-ink:#17221c; --client-muted:#6d776f; width:min(100%,480px); margin:-12px auto 100px; color:var(--client-ink); }
body:has(.client-home)>.site-header,body:has(.client-home)>footer { display:none; }
body:has(.client-home)>.container { min-height:100vh; margin:0 auto; padding:22px 0; }
.client-app { position:relative; min-height:760px; overflow:hidden; border:1px solid #dce3de; border-radius:24px; background:#f7f9f7; box-shadow:0 24px 70px rgba(22,45,32,.12); }
.client-app main { padding:0 20px 105px; }
.client-top { display:flex; align-items:center; justify-content:space-between; padding:18px 20px; background:#fff; }
.client-top small,.client-top strong { display:block; }
.client-top small { margin-bottom:3px; color:var(--client-muted); font-size:10px; }
.client-top strong { font-size:14px; }
.client-top>a { border:1px solid #dce3de; border-radius:999px; padding:7px 11px; color:#455148; font-size:11px; font-weight:800; }
.client-bottom-nav { position:fixed; z-index:30; bottom:0; left:50%; display:grid; grid-template-columns:repeat(4,1fr); gap:0; width:min(100%,480px); margin:0; border:1px solid #e0e6e2; border-bottom:0; border-radius:18px 18px 0 0; padding:9px 8px calc(10px + env(safe-area-inset-bottom)); background:rgba(255,255,255,.96); box-shadow:0 -10px 30px rgba(23,62,45,.1); backdrop-filter:blur(14px); transform:translateX(-50%); }
.client-bottom-nav>a { display:grid; justify-items:center; gap:4px; padding:4px; color:#879088; font-size:10px; font-weight:800; }
.client-bottom-nav>a span { font-size:18px; line-height:1; }
.client-bottom-nav>a.active { color:var(--client-green); }
.client-welcome { margin:14px 0 12px; border-radius:22px; padding:25px; background:linear-gradient(145deg,#174a36,#0e3426); color:#fff; }
.client-welcome>span,.client-b-heading>span,.client-c-heading span { color:#b8cfc2; font-size:11px; font-weight:800; }
.client-welcome h1 { margin:7px 0; font-size:29px; letter-spacing:-.04em; }
.client-welcome p { margin:0; color:#c5d6cd; font-size:13px; line-height:1.6; }
.client-primary-action { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; margin-top:21px; border-radius:15px; padding:14px; background:#dff178; color:#173020; }
.client-primary-action>span { display:grid; place-items:center; width:35px; height:35px; border-radius:10px; background:#c8dd60; font-size:23px; }
.client-primary-action strong,.client-primary-action small { display:block; }
.client-primary-action small { margin-top:3px; color:#536126; font-size:10px; }
.client-primary-action>b { font-size:18px; }
.client-primary-action.is-disabled { display:block; background:#dce3de; }
.client-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:12px 0 24px; }
.client-summary>div { border:1px solid #e0e6e2; border-radius:14px; padding:14px 8px; background:#fff; text-align:center; }
.client-summary strong,.client-summary span { display:block; }
.client-summary strong { font-size:21px; }
.client-summary span { margin-top:4px; color:var(--client-muted); font-size:10px; }
.client-section { margin-top:25px; }
.client-section-title { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:11px; }
.client-section-title small,.client-section-title h2 { display:block; margin:0; }
.client-section-title small { color:#89928c; font-size:9px; font-weight:800; letter-spacing:.1em; }
.client-section-title h2 { margin-top:3px; font-size:19px; }
.client-section-title>a { color:var(--client-green); font-size:11px; font-weight:800; }
.client-closed-reports .client-section-title { margin-bottom:8px; }
.client-closed-reports .client-section-title h2 { font-size:17px; }
.client-closed-reports .client-section-title>span { font-size:9px; }
.client-recent { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; border:1px solid #dfe5e1; border-radius:15px; padding:15px; background:#fff; color:inherit; }
.client-recent-icon { display:grid; place-items:center; width:39px; height:39px; border-radius:12px; background:var(--client-mint); color:var(--client-green); font-weight:900; }
.client-recent small,.client-recent strong,.client-recent em { display:block; font-style:normal; }
.client-recent small { color:#8b948e; font-size:9px; }
.client-recent strong { margin:3px 0; font-size:13px; }
.client-recent em { color:var(--client-muted); font-size:10px; }
.client-recent>b { color:#8a958e; font-size:22px; }
.client-plan-strip { display:flex; gap:10px; overflow-x:auto; padding-bottom:5px; scroll-snap-type:x mandatory; }
.client-plan-card { flex:0 0 76%; scroll-snap-align:start; border:1px solid #dce3de; border-radius:17px; padding:17px; background:#fff; color:inherit; }
.client-plan-card.is-featured { border-color:#9bc4ae; background:#f1f8f4; }
.client-plan-card>span,.client-plan-card>strong,.client-plan-card>small,.client-plan-card>em { display:block; }
.client-plan-status { color:var(--client-green); font-size:9px; font-weight:900; }
.client-plan-card>strong { margin:9px 0 3px; font-size:16px; }
.client-plan-card>small { color:var(--client-muted); font-size:10px; }
.client-plan-home-fixed { display:grid; gap:3px; margin:0 0 11px; border-radius:10px; padding:9px 11px; background:#e7f2eb; color:var(--client-ink); font-size:12px; font-weight:800; line-height:1.45; }
.client-plan-card>.client-plan-home-price { margin:20px 0 10px; }
.client-plan-card>.client-plan-home-price b { font-size:23px; }
.client-plan-card>.client-plan-home-price span { color:var(--client-muted); font-size:10px; }
.client-plan-card>em { color:var(--client-green); font-size:11px; font-style:normal; font-weight:900; }
.client-empty { width:100%; border:1px dashed #cbd5ce; border-radius:16px; padding:25px; text-align:center; }
.client-empty strong,.client-empty span { display:block; }
.client-empty span { margin-top:5px; color:var(--client-muted); font-size:11px; }

/* Client inner pages — the production companion to the selected A home. */
.client-page { --client-green:#165c41; --client-mint:#e8f3ed; --client-ink:#17221c; --client-muted:#6d776f; width:min(100%,560px); margin:-12px auto 90px; color:var(--client-ink); }
body:has(.client-page)>.site-header,body:has(.client-page)>footer { display:none; }
body:has(.client-page)>.container { min-height:100vh; margin:0 auto; padding:22px 0; }
.client-page .client-app { min-height:800px; }
.client-page .client-bottom-nav { width:min(100%,560px); }
.client-page .client-app>main { padding:0 20px 105px; }
.client-page-top { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; border-bottom:1px solid #e4e9e6; padding:15px 18px; background:#fff; }
.client-page-top small,.client-page-top strong { display:block; }
.client-page-top small { color:#869088; font-size:9px; }
.client-page-top strong { margin-top:2px; font-size:12px; }
.client-page-mark,.client-back { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:var(--client-green); color:#fff; font-weight:900; text-decoration:none; }
.client-page-switch { border:1px solid #dce3de; border-radius:999px; padding:7px 10px; color:#59655d; font-size:10px; font-weight:800; }
.client-page-heading { padding:24px 1px 17px; }
.client-page-heading h1 { margin:0; font-size:27px; letter-spacing:-.04em; }
.client-page-heading p { margin:6px 0 0; color:var(--client-muted); font-size:12px; }
.client-form-card { margin-bottom:12px; border:1px solid #dee5e0; border-radius:18px; padding:18px; background:#fff; }
.client-form-card label { font-size:12px; }
.client-submit-button { display:flex; align-items:center; justify-content:center; width:100%; min-height:50px; border:0; border-radius:13px; padding:0 18px; background:var(--client-green); color:#fff; font:inherit; font-weight:900; cursor:pointer; }
.client-submit-note { margin:10px 5px 0; color:var(--client-muted); font-size:10px; line-height:1.55; text-align:center; }
.client-profile-status { display:flex; align-items:center; gap:12px; margin:-2px 0 18px; border-radius:13px; padding:13px; background:#fff2df; }
.client-profile-status>span { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:#f3d29d; color:#77511b; font-weight:900; }
.client-profile-status strong,.client-profile-status small { display:block; }
.client-profile-status small { margin-top:3px; color:#7d7467; font-size:10px; }
.client-profile-status.is-complete { background:var(--client-mint); }
.client-profile-status.is-complete>span { background:#cee6d8; color:var(--client-green); }
.client-consent { border-radius:12px; padding:12px; background:#f5f7f5; font-size:11px !important; }
.client-snapshot-note { margin-top:18px; border-top:1px solid #e4e9e6; padding-top:15px; }
.client-snapshot-note strong { font-size:11px; }
.client-snapshot-note p { margin:5px 0 0; color:var(--client-muted); font-size:10px; line-height:1.55; }
.client-logout-form { margin:24px 0 8px; }
.client-logout-button { width:100%; min-height:46px; border:1px solid #d8b4ad; border-radius:13px; background:#fff; color:#943c2f; font:inherit; font-size:12px; font-weight:900; cursor:pointer; }
.client-record-summary { display:flex; align-items:center; gap:18px; margin-bottom:12px; border-radius:16px; padding:18px; background:#173e2d; color:#fff; }
.client-record-summary>div { display:flex; align-items:baseline; gap:5px; }
.client-record-summary>div+div { border-left:1px solid rgba(255,255,255,.18); padding-left:18px; }
.client-record-summary strong { font-size:29px; }
.client-record-summary span { color:#c2d4ca; font-size:11px; }
.client-record-summary a { margin-left:auto; border-radius:9px; padding:9px 11px; background:#dff178; color:#1c3424; font-size:11px; font-weight:900; }
.client-filter { margin-bottom:12px; border:1px solid #dfe5e1; border-radius:14px; background:#fff; }
.client-filter summary { padding:14px 16px; color:#4f5c54; font-size:11px; font-weight:900; cursor:pointer; }
.client-filter-heading { padding:14px 16px; color:#4f5c54; font-size:11px; font-weight:900; }
.client-filter form { display:grid; gap:12px; border-top:1px solid #edf0ee; padding:15px; }
.client-filter label { font-size:11px; }
.client-report-list { display:grid; gap:7px; }
.client-report-card { border:1px solid #dfe5e1; border-radius:12px; padding:11px 12px; background:#fff; color:inherit; text-decoration:none; }
.client-report-card-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.client-report-card-head>span { max-width:70%; overflow:hidden; font-size:11px; font-weight:900; text-overflow:ellipsis; white-space:nowrap; }
.client-state { border-radius:999px; padding:4px 7px; font-size:8px; }
.client-state.is-action { background:#ffe5dd; color:#9b3324; }
.client-state.is-pending,.client-state.is-warning { background:#fff1cc; color:#765600; }
.client-state.is-paid,.client-state.is-approved { background:#dff2e8; color:#12613f; }
.client-state.is-closed { background:#ecefed; color:#667069; }
.client-report-amount { display:flex; align-items:baseline; gap:7px; margin:10px 0 6px; }
.client-report-amount strong { font-size:20px; }
.client-report-amount span { color:var(--client-muted); font-size:10px; }
.client-report-card>code { display:block; overflow-wrap:anywhere; color:#566159; font-size:10px; }
.client-report-card-data { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 6px; margin:6px 0 0; border-top:1px solid #edf0ee; padding-top:6px; }
.client-report-card-data>div { min-width:0; border-radius:6px; padding:5px 6px; background:#f6f8f6; }
.client-report-card-data dt { overflow:hidden; color:#8a938d; font-size:8px; line-height:1.25; text-overflow:ellipsis; white-space:nowrap; }
.client-report-card-data dd { overflow:hidden; margin:2px 0 0; color:var(--client-ink); font-size:9px; font-weight:800; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.client-report-card footer { display:flex; justify-content:space-between; gap:10px; margin-top:9px; border-top:1px solid #edf0ee; padding-top:8px; color:#8a938d; font-size:8px; }
.client-report-card-actions { display:flex; align-items:center; gap:5px; }
.client-report-card-actions a { border-radius:6px; padding:4px 7px; color:var(--client-green); font-size:8px; font-weight:900; text-decoration:none; }
.client-report-card-actions .client-report-edit { background:var(--client-green); color:#fff; }
.client-list-empty { border:1px dashed #cbd5ce; border-radius:18px; padding:38px 24px; color:var(--client-muted); text-align:center; }
.client-list-empty>span,.client-list-empty>strong { display:block; }
.client-list-empty>span { margin-bottom:10px; font-size:25px; }
.client-list-empty>strong { color:var(--client-ink); }
.client-list-empty p { font-size:11px; line-height:1.6; }
.client-list-empty a { display:inline-block; border-radius:10px; padding:10px 14px; background:var(--client-green); color:#fff; font-size:11px; font-weight:900; }
.client-stepper { display:grid; grid-template-columns:auto 1fr auto 1fr auto 1fr auto; align-items:center; margin:0 5px 18px; }
.client-stepper span { color:#9aa39d; font-size:9px; font-weight:800; }
.client-stepper span.active { color:var(--client-green); }
.client-stepper i { height:1px; margin:0 7px; background:#d9e0db; }
.client-plan-picker { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:9px; margin-bottom:12px; border:1px solid #dfe5e1; border-radius:16px; padding:16px; background:#fff; }
.client-plan-picker label { font-size:11px; }
.client-plan-requirements { overflow:hidden; border-radius:18px; background:#253c31; box-shadow:0 12px 28px rgba(37,60,49,.16); }
.client-plan-requirements.has-fields { border:1px solid #dce5df; background:#fff; }
.client-selected-plan { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:18px 20px; background:#253c31; color:#fff; }
.client-selected-plan div { display:grid; gap:3px; }
.client-selected-plan small { color:rgba(255,255,255,.65); font-size:10px; }
.client-selected-plan strong { font-size:18px; }
.client-selected-plan span { color:#dfee9a; font-size:12px; font-weight:800; }
.client-selected-plan a { border:1px solid rgba(255,255,255,.3); border-radius:999px; padding:7px 11px; color:#fff; font-size:10px; font-weight:800; text-decoration:none; white-space:nowrap; }
.client-plan-fixed-display { display:grid; grid-template-columns:auto minmax(0,1fr); gap:16px; padding:15px 18px; background:#eef4f0; }
.client-plan-fixed-display>small { color:#607067; font-size:9px; font-weight:900; white-space:nowrap; }
.client-plan-fixed-display>div { display:grid; gap:5px; }
.client-plan-fixed-display span { color:var(--client-ink); font-size:11px; font-weight:750; line-height:1.55; }
.client-plan-fields { padding:17px 18px 18px; background:#fff; }
.client-plan-fields-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:14px; }
.client-plan-fields-heading small { color:#87918a; font-size:9px; font-weight:800; }
.client-plan-fields-heading strong { color:var(--client-ink); font-size:12px; }
.client-plan-fields .help { margin:12px 0 0; font-size:10px; }
.client-plan-fields .form-grid>label,.client-plan-fields .choice-field { margin:0; border:1px solid #dce5df; border-radius:13px; padding:13px 14px; background:#f8faf9; }
.client-plan-fields .choice-field { display:grid; gap:8px; }
.client-plan-fields .choice-field legend { padding:0 5px; font-weight:800; }
.client-report-form { display:grid; gap:12px; }
.client-form-step { border:1px solid #dfe5e1; border-radius:17px; padding:17px; background:#fff; }
.client-form-step>header { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; margin-bottom:15px; }
.client-form-step>header>span { display:grid; place-items:center; width:30px; height:30px; border-radius:9px; background:var(--client-mint); color:var(--client-green); font-size:11px; font-weight:900; }
.client-form-step>header small,.client-form-step>header strong { display:block; }
.client-form-step>header small { color:#8a948d; font-size:9px; }
.client-form-step>header strong { margin-top:2px; font-size:12px; }
.client-form-step>header>b { color:var(--client-green); font-size:11px; }
.client-form-step>header>a { color:var(--client-green); font-size:10px; font-weight:900; }
.client-tracking-input textarea { min-height:150px; border:1px solid #bdcac2; border-radius:13px; background:#fbfcfb; font-family:"SFMono-Regular",Consolas,monospace; font-size:13px; line-height:1.65; }
.client-parse-summary { display:grid; grid-template-columns:auto auto minmax(0,1fr); align-items:center; gap:8px; margin-top:10px; border-radius:12px; padding:12px; background:#edf5f0; }
.client-parse-summary>div { min-width:58px; border-right:1px solid #d5e3da; }
.client-parse-summary strong,.client-parse-summary span { display:block; }
.client-parse-summary strong { font-size:18px; }
.client-parse-summary span,.client-parse-summary p { margin:0; color:#64726a; font-size:9px; }
.client-format-help { margin-top:10px; }
.client-format-help summary { color:var(--client-green); font-size:10px; font-weight:900; cursor:pointer; }
.client-format-help p { margin-bottom:0; color:var(--client-muted); font-size:10px; line-height:1.6; }
.client-payment-summary { display:grid; grid-template-columns:1fr 1fr; margin:0; }
.client-payment-summary>div { border-left:1px solid #e1e7e3; padding:3px 12px; }
.client-payment-summary>div:first-child { border-left:0; padding-left:0; }
.client-payment-summary dt { color:#87918a; font-size:9px; }
.client-payment-summary dd { margin:5px 0 0; overflow-wrap:anywhere; font-size:12px; font-weight:900; }
.client-private-cost { display:grid; gap:7px; margin-top:14px; border-top:1px solid #e1e7e3; padding-top:14px; font-size:11px; font-weight:800; }
.client-private-cost small { color:var(--client-muted); font-size:9px; font-weight:500; line-height:1.5; }
.client-profit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.client-profit-card { border:1px solid #dfe6e1; border-radius:16px; padding:17px; background:#fff; }
.client-profit-card.is-profit { grid-column:1 / -1; background:#173e2d; color:#fff; }
.client-profit-card span,.client-profit-card strong,.client-profit-card small { display:block; }
.client-profit-card span { color:#7a867e; font-size:9px; font-weight:800; }
.client-profit-card strong { margin:7px 0 3px; font-size:23px; }
.client-profit-card small { color:#8c968f; font-size:9px; }
.client-profit-card.is-profit span,.client-profit-card.is-profit small { color:#c5d6cd; }
.client-detail-status { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; border-radius:18px; padding:20px; background:#173e2d; color:#fff; }
.client-detail-status small,.client-detail-status strong,.client-detail-status span { display:block; }
.client-detail-status small { color:#9db7a8; font-size:9px; }
.client-detail-status strong { margin:6px 0; font-size:19px; }
.client-detail-status span { color:#c5d5cc; font-size:9px; }
.client-detail-status>b { font-size:22px; }
.client-admin-message { margin-top:10px; border:1px solid #efd6a2; border-radius:14px; padding:14px; background:#fff6e2; }
.client-admin-message strong { color:#795819; font-size:10px; }
.client-admin-message p { margin:6px 0 0; font-size:11px; }
.client-detail-form { display:grid; gap:12px; margin-top:12px; }
.client-add-shipment { width:100%; min-height:42px; margin-top:10px; border:1px dashed #96b5a3; border-radius:11px; background:#f2f8f4; color:var(--client-green); font-weight:900; }
.client-detail-meta { margin-top:12px; border:1px solid #dfe5e1; border-radius:14px; background:#fff; }
.client-detail-meta summary { padding:14px 16px; color:#536158; font-size:10px; font-weight:900; cursor:pointer; }
.client-detail-meta .details { border-top:1px solid #edf0ee; padding:0 16px 14px; }
.client-shipment-list { display:grid; gap:8px; }
.client-shipment-list>div { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:10px; border-radius:10px; padding:11px; background:#f5f7f5; }
.client-shipment-list span { display:grid; place-items:center; width:24px; height:24px; border-radius:7px; background:#e2eee7; color:var(--client-green); font-size:9px; font-weight:900; }
.client-shipment-list code { overflow-wrap:anywhere; }
.client-readonly-report .client-section-title>a { color:var(--client-green); font-size:10px; font-weight:900; }

/* Client B — scheme-first storefront. */
.client-b .client-app { background:#f4efe6; }
.client-b-heading { padding:28px 3px 20px; }
.client-b-heading>span { color:#866d4c; }
.client-b-heading h1 { margin:6px 0; font-family:Georgia,"Songti SC",serif; font-size:31px; letter-spacing:-.04em; }
.client-b-heading p { margin:0; color:#776f63; font-size:12px; }
.client-plan-stack { display:grid; gap:10px; }
.client-plan-stack .client-plan-card { position:relative; display:grid; grid-template-columns:1fr; width:100%; overflow:hidden; border:0; border-radius:16px; padding:16px 18px; background:#253c31; color:#fff; text-decoration:none; box-shadow:0 9px 22px rgba(54,47,36,.1); }
.client-plan-stack .client-plan-card.has-fields { grid-template-columns:minmax(0,.8fr) minmax(230px,1.2fr); gap:20px; align-items:center; }
.client-plan-stack .client-plan-card:nth-child(even) { background:#c96b43; }
.client-plan-stack .client-plan-home-fixed { background:rgba(255,255,255,.08); color:#fff; }
.client-plan-stack .client-plan-card>.client-plan-card-main,.client-plan-stack .client-plan-card>.client-plan-card-fields { margin:0; }
.client-plan-card-main>span,.client-plan-card-main>strong,.client-plan-card-main>small,.client-plan-card-main>em { display:block; }
.client-plan-card-main>strong { margin:6px 0 2px; color:#fff; font-size:14px; }
.client-plan-card-main>small,.client-plan-card-main .client-plan-card-price span { color:#fff; font-size:9px; }
.client-plan-card-main .client-plan-status,.client-plan-card-main>em { color:#fff; }
.client-plan-card-main .client-plan-status { font-size:9px; }
.client-plan-card-main>em { font-size:10px; font-style:normal; font-weight:900; }
.client-plan-card-price { margin:17px 0 10px; color:#fff; }
.client-plan-card-price b { color:#fff; font-size:19px; }
.client-plan-card-fields { display:grid; gap:12px; border-left:1px solid rgba(255,255,255,.18); padding-left:24px; }
.client-plan-card-fields>small { color:#fff; font-size:9px; font-weight:900; letter-spacing:.08em; }
.client-plan-card-fields>div { display:grid; gap:5px; }
.client-plan-card-fields strong { color:#fff; font-size:11px; }
.client-plan-stack .client-plan-card>.client-plan-card-fields span { color:#fff; font-size:15px; line-height:1.6; }
.client-plan-fixed-content span { display:block; }
.client-plan-option-group { border:1px solid rgba(255,255,255,.2); border-radius:12px; padding:11px 13px; background:rgba(255,255,255,.06); }
.plan-fixed-field { grid-column:1 / -1; display:grid; gap:12px; margin:0; border:1px solid var(--line); border-radius:12px; padding:14px; }
.plan-fixed-field legend { padding:0 8px; font-weight:700; }
.plan-fixed-field legend span { margin-left:6px; color:var(--muted); font-size:12px; font-weight:500; }
.plan-fixed-field>small { color:var(--muted); line-height:1.6; }
.plan-fixed-field textarea { min-height:96px; resize:vertical; }
.client-plan-home-fixed strong,.client-plan-fixed-content strong,.merchant-plan-fixed-content strong { display:block; margin-bottom:4px; font-size:11px; }
.merchant-plan-fixed-content { display:grid; gap:2px; margin-bottom:8px; color:var(--accent); font-size:13px; font-weight:800; }
.client-help-card { margin-top:16px; border:1px solid #ddd2c1; border-radius:17px; padding:17px; background:#fffaf1; }
.client-help-card span { font-size:12px; font-weight:900; }
.client-help-card p { margin:7px 0 12px; color:#756d61; font-size:11px; line-height:1.55; }
.client-help-card a { color:#775332; font-size:11px; font-weight:900; }

/* Client C — progress-first service tracker. */
.client-c .client-app { background:#f5f7fa; }
.client-c-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; padding:28px 2px 19px; }
.client-c-heading span { color:#5e7792; }
.client-c-heading h1 { margin:5px 0 0; font-size:27px; letter-spacing:-.04em; }
.client-c-heading>a { border-radius:11px; padding:10px 12px; background:#1e4c72; color:#fff; font-size:11px; font-weight:900; }
.client-journey { position:relative; display:grid; gap:0; border:1px solid #dbe3eb; border-radius:19px; padding:10px 17px; background:#fff; }
.client-journey:before { position:absolute; top:34px; bottom:34px; left:34px; width:2px; background:#dce4eb; content:""; }
.client-journey>div { position:relative; z-index:1; display:grid; grid-template-columns:auto 1fr; align-items:center; gap:13px; padding:14px 0; }
.client-journey i { display:grid; place-items:center; width:34px; height:34px; border:4px solid #fff; border-radius:999px; background:#e9edf1; color:#73808b; font-size:11px; font-style:normal; font-weight:900; box-shadow:0 0 0 1px #dbe3eb; }
.client-journey .is-done i { background:#dff0e7; color:#1d6b48; }
.client-journey .is-current i { background:#1e4c72; color:#fff; }
.client-journey strong,.client-journey small { display:block; }
.client-journey strong { font-size:12px; }
.client-journey small { margin-top:4px; color:#7b8791; font-size:10px; }
.client-current-card { display:flex; align-items:flex-end; justify-content:space-between; gap:10px; margin-top:12px; border-radius:16px; padding:17px; background:#1e4c72; color:#fff; }
.client-current-card small,.client-current-card strong,.client-current-card span { display:block; }
.client-current-card small { color:#a9c3d8; font-size:9px; }
.client-current-card strong { margin:5px 0; font-size:14px; }
.client-current-card span { color:#c6d7e4; font-size:10px; }
.client-current-card>a { color:#dcebf6; font-size:10px; font-weight:900; white-space:nowrap; }
@media (max-width: 850px) {
  .site-header { position: static; align-items: flex-start; padding: 16px 20px; }
  nav { justify-content: flex-end; gap: 12px 16px; flex-wrap: wrap; font-size: 14px; }
  .hero,.split { grid-template-columns: 1fr; }
  .filter-panel { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-actions { grid-column: 1 / -1; }
  .batch-toolbar { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .plan-card { grid-template-columns: 1fr; }
  .plan-card-footer { grid-column: 1; }
  .export-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero { padding: 32px 24px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .merchant-action-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .merchant-workspace-grid { grid-template-columns: 1fr; }
  .merchant-plan-row { grid-template-columns: minmax(0,1fr) auto; }
  .merchant-plan-row .button-row { grid-column: 1 / -1; }
  .prototype-task-grid,.prototype-a-grid,.prototype-b-bottom,.prototype-c-grid { grid-template-columns:1fr; }
  .prototype-c-shell { grid-template-columns:1fr; }
  .prototype-c-sidebar { display:none; }
  .prototype-c-title { grid-template-columns:1fr; }
  .prototype-c-title .prototype-metrics { overflow-x:auto; }
  .client-prototype { width:min(100%,480px); }
  .client-home { width:min(100%,480px); }
  .client-page { width:min(100%,560px); }
}
@media (max-width: 560px) {
  .site-header { display: block; }
  nav { justify-content: flex-start; margin-top: 12px; }
  .container { width: min(100% - 22px,1180px); margin: 22px auto; }
  .card { padding: 20px; }
  .form-grid,.details,.plan-time-range { grid-template-columns: 1fr; }
  .filter-panel { grid-template-columns: 1fr; }
  .refund-filter-panel { grid-template-columns: 1fr; }
  .filter-actions { grid-column: 1; }
  .plan-filter { grid-column: 1; }
  .admin-filter-panel .filter-keyword,.admin-filter-panel .plan-filter,.admin-filter-panel .bulk-filter,.admin-filter-panel .filter-actions { grid-column:1; }
  .filter-actions .button,.filter-actions .button-secondary { flex: 1; }
  .export-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .report-item { grid-template-columns: 1fr; }
  .report-item-number { grid-column: 1; }
  .remove-report { width: 100%; }
  .page-head { display: block; }
  .page-head .button { margin-top: 15px; }
  .stats { gap: 10px; }
  .stat { padding: 15px; }
  .merchant-heading { display: block; }
  .merchant-heading .button-secondary { margin-top: 15px; }
  .merchant-heading h1 { font-size: 30px; }
  .merchant-action-grid { grid-template-columns: 1fr; }
  .merchant-plan-row { grid-template-columns: 1fr; }
  .plan-metrics { text-align: left; }
  .frontend-prototype { margin-top:0; }
  .prototype-context,.prototype-a-lead,.prototype-b-toolbar { display:block; }
  .prototype-header-actions,.prototype-a-lead time,.prototype-b-toolbar>div:last-child { margin-top:16px; }
  .prototype-task-grid { grid-template-columns:1fr; }
  .prototype-task { grid-template-columns:auto minmax(0,1fr); }
  .prototype-task>b { grid-column:2; }
  .prototype-metrics { grid-template-columns:repeat(2,minmax(115px,1fr)); gap:14px 0; }
  .prototype-metrics>div:nth-child(3) { border-left:0; }
  .prototype-plan-row { grid-template-columns:minmax(0,1fr) auto; }
  .prototype-plan-numbers,.prototype-row-arrow { display:none; }
  .prototype-c-shell>main { padding:7px 16px 25px; }
  .prototype-switcher { bottom:12px; width:max-content; max-width:calc(100vw - 24px); }
  .prototype-switcher .prototype-exit { display:none; }
  .client-prototype { width:100%; margin-top:-8px; }
  .client-home { width:100%; margin-top:-8px; }
  .client-page { width:100%; margin-top:-8px; }
  .client-page .client-app { min-height:100vh; border-right:0; border-left:0; border-radius:0; box-shadow:none; }
  .client-plan-picker { grid-template-columns:1fr; }
  .client-parse-summary { grid-template-columns:auto auto 1fr; }
  .client-app { min-height:calc(100vh - 105px); border-right:0; border-left:0; border-radius:0; box-shadow:none; }
}

/* Unified application system — applies to platform and admin surfaces while
   the mobile client shells above keep their own focused navigation. */
:root {
  --ink:#19241f;
  --muted:#6b776f;
  --line:#dfe7e1;
  --surface:#fff;
  --soft:#f2f6f3;
  --brand:#173e2d;
  --accent:#176044;
  --danger:#a33a2a;
  --warning:#8a671b;
  --shadow:0 14px 38px rgba(22,56,38,.07);
}
html,body { max-width:100%; overflow-x:hidden; }
body { background:#f5f8f5; color:var(--ink); }
body.app-shell:not(:has(.client-home)):not(:has(.client-page)):not(:has(.client-prototype)) { background:linear-gradient(145deg,#f6f9f7 0%,#eef4f0 100%); }
.site-header { position:sticky; top:0; min-height:68px; padding:0; background:rgba(23,62,45,.97); box-shadow:0 4px 18px rgba(12,42,28,.16); }
.site-header-inner { display:flex; align-items:center; justify-content:space-between; gap:22px; width:min(1240px,calc(100% - 36px)); min-height:68px; margin:auto; }
.brand { display:flex; align-items:center; gap:10px; letter-spacing:.02em; font-size:17px; }
.brand-mark { display:grid; place-items:center; width:30px; height:30px; border-radius:9px; background:#dff178; color:#173e2d; font-size:15px; font-weight:900; }
.site-nav { display:flex; align-items:center; justify-content:flex-end; gap:5px; min-width:0; max-width:100%; }
.site-nav a,.site-nav .link-button { border-radius:8px; padding:9px 10px; color:#d9e7de; font-size:12px; white-space:nowrap; }
.site-nav a { display:inline-flex; align-items:center; gap:5px; }
.nav-badge { display:inline-grid; place-items:center; min-width:19px; height:19px; border-radius:999px; padding:0 5px; background:#dff178; color:#173e2d; font-size:10px; font-weight:900; line-height:1; }
.site-nav a.active .nav-badge { background:#fff; }
.site-nav a:hover,.site-nav .link-button:hover { background:rgba(255,255,255,.1); color:#fff; text-decoration:none; }
.site-account { display:flex; align-items:center; margin-left:auto; }
.site-account .nav-form { margin:0; }
.site-account .link-button { border-left:1px solid rgba(255,255,255,.18); border-radius:0; padding:9px 0 9px 15px; color:#b9cbbf; font-size:11px; }
.container { width:min(1240px,calc(100% - 36px)); min-height:calc(100vh - 140px); margin:32px auto 54px; }
footer { border-top:1px solid #e1e8e3; padding:20px; background:#f5f8f5; color:#88938c; font-size:11px; }
.page-head { align-items:flex-start; margin-bottom:22px; }
.page-head h1 { margin:0 0 7px; color:#17251d; font-size:32px; letter-spacing:-.035em; }
.page-head h2 { letter-spacing:-.025em; }
.page-head p { color:#758079; font-size:13px; }
.card { border-color:var(--line); border-radius:14px; padding:24px; box-shadow:0 8px 25px rgba(22,56,38,.045); }
.card h1,.card h2 { letter-spacing:-.025em; }
input,select,textarea { border-color:#c7d3ca; border-radius:9px; padding:11px 12px; }
input:focus,select:focus,textarea:focus { border-color:#398260; box-shadow:0 0 0 3px rgba(57,130,96,.13); }
.field-error { display:block; margin-top:5px; color:#a33a2a; font-size:11px; font-weight:700; }
label:has(.field-error) input,label:has(.field-error) textarea,label:has(.field-error) select { border-color:#b45243; }
.button,.button-secondary,.button-danger { min-height:42px; border-radius:9px; padding:0 16px; font-size:13px; }
.button { background:#176044; }
.button:hover { background:#104b35; }
.button-secondary { border:1px solid #d3ded6; background:#eef3ef; color:#26382c; }
.button-danger { background:#a33a2a; }
.alert { border-radius:11px; padding:12px 14px; font-size:13px; }
.stats { gap:12px; }
.stat { border-color:var(--line); border-radius:13px; padding:18px; box-shadow:0 7px 22px rgba(22,56,38,.045); }
.stat span { color:#76837a; font-size:12px; }
.stat strong { color:#173e2d; }
.dashboard-section { margin-top:28px; }
.todo-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.todo-card { display:grid; gap:6px; border:1px solid #d8e4db; border-radius:12px; padding:18px; background:#fff; color:var(--ink); text-decoration:none; box-shadow:0 7px 22px rgba(22,56,38,.045); }
.todo-card:hover { border-color:#8fbea0; text-decoration:none; transform:translateY(-1px); }
.todo-card span { color:#6c796f; font-size:12px; font-weight:800; }
.todo-card strong { color:#173e2d; font-size:30px; line-height:1; }
.todo-card small { color:#7a877e; font-size:11px; line-height:1.5; }
.todo-card b { color:#176044; font-size:11px; }
.operational-stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
.operational-stats .stat small { display:block; margin-top:8px; color:#7a877e; font-size:11px; line-height:1.45; }
.workflow-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0 0 20px; }
.workflow-step { display:grid; grid-template-columns:auto 1fr; column-gap:9px; align-items:center; border:1px solid #dce5de; border-radius:10px; padding:12px; background:#fff; }
.workflow-step b { grid-row:span 2; display:grid; place-items:center; width:27px; height:27px; border-radius:50%; background:#e7efe9; color:#627267; font-size:12px; }
.workflow-step strong { font-size:12px; }
.workflow-step small { color:#7a877e; font-size:10px; line-height:1.35; }
.workflow-step.is-current { border-color:#7fb196; background:#eff8f1; }
.workflow-step.is-current b,.workflow-step.is-done b { background:#176044; color:#fff; }
.table-wrap { max-width:100%; overflow-x:auto; border-color:var(--line); border-radius:12px; box-shadow:0 7px 22px rgba(22,56,38,.035); }
table { min-width:720px; }
th,td { padding:13px 14px; border-bottom-color:#e7ede8; }
th { background:#eff4f0; color:#59675e; font-size:11px; letter-spacing:.04em; }
.filter-panel { border-color:var(--line); border-radius:12px; padding:15px; box-shadow:0 7px 22px rgba(22,56,38,.04); }
.filters a { border-color:#d4dfd7; border-radius:8px; background:#fff; font-size:12px; }
.filters a.active { background:#173e2d; }
.empty { border-color:#cbd8ce; border-radius:12px; padding:42px; background:rgba(255,255,255,.6); }
.details div { border-bottom-color:#e6ece7; }
.details dt { color:#7c8980; font-size:11px; }
.details dd { font-size:13px; }
.plan-card,.report-item { border-color:#dce5de; border-radius:12px; background:#f4f7f4; }
.export-card { border-color:var(--line); border-radius:14px; box-shadow:0 7px 22px rgba(22,56,38,.045); }
.export-card.featured { border-color:#a6ccb3; background:#edf7f0; }
.merchant-heading h1 { color:#173e2d; letter-spacing:-.04em; }
.merchant-kicker,.text-link { color:#176044; }
.merchant-action-grid > a,.merchant-action-grid > div { border-color:#dce5de; border-radius:11px; box-shadow:0 5px 17px rgba(22,56,38,.035); }
.merchant-action-grid a { border-color:#a7cbb2; background:#edf7f0; }
.merchant-plan-row { border-color:#dce5de; border-radius:10px; }
.badge { padding:4px 8px; font-size:10px; }
.pagination a { border:1px solid #dbe4dd; color:#526057; }
.pagination a.current { border-color:#173e2d; background:#173e2d; }

@media (max-width:850px) {
  .site-header { position:static; }
  .site-header-inner { align-items:flex-start; flex-wrap:wrap; gap:8px 14px; padding:12px 0; }
  .site-nav { order:3; width:100%; justify-content:flex-start; overflow-x:auto; padding-bottom:2px; }
  .site-nav a,.site-nav .link-button { padding:7px 8px; font-size:11px; }
  .site-account { margin-left:auto; }
  .site-account .link-button { padding-top:6px; padding-bottom:6px; }
  .container { width:min(100% - 24px,1240px); margin-top:22px; }
  .page-head h1 { font-size:28px; }
  .card { padding:19px; }
  .todo-grid { grid-template-columns:1fr; }
  .operational-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workflow-steps { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:560px) {
  .site-header-inner { width:calc(100% - 22px); }
  .brand { font-size:15px; }
  .site-nav { gap:2px; }
  .site-nav a,.site-nav .link-button { font-size:10px; }
  .container { width:calc(100% - 22px); margin:18px auto 32px; }
  .button-row { flex-wrap:wrap; }
  .button-row > form,.button-row > .button,.button-row > .button-secondary,.button-row > .button-danger { max-width:100%; }
  .page-head { display:block; }
  .page-head h1 { font-size:26px; }
  .stats { gap:8px; }
  .stat { padding:14px; }
  .table-wrap:has(.field-config-table) { overflow:visible; border:0; background:transparent; box-shadow:none; }
  .field-config-table { display:block; min-width:0; }
  .field-config-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .field-config-table tbody { display:grid; gap:12px; }
  .field-config-table tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; border:1px solid var(--line); border-radius:11px; padding:14px; background:#f7faf8; }
  .field-config-table td { display:grid; min-width:0; gap:6px; border:0; padding:0; }
  .field-config-table td::before { color:#6b776f; font-size:11px; font-weight:800; }
  .field-config-table td:nth-child(1),.field-config-table td:nth-child(2),.field-config-table td:nth-child(5) { grid-column:1 / -1; }
  .field-config-table td:nth-child(1)::before { content:"字段标识"; }
  .field-config-table td:nth-child(2)::before { content:"显示名称"; }
  .field-config-table td:nth-child(3)::before { content:"类型"; }
  .field-config-table td:nth-child(4)::before { content:"要求"; }
  .field-config-table td:nth-child(5)::before { content:"选项"; }
  .field-config-table input,.field-config-table select { min-width:0; max-width:100%; }
  .field-config-table .checkbox { align-self:center; min-height:42px; align-items:center; }
  .field-config-table .checkbox input { flex:0 0 18px; }
}

/* Report filter redesign: keyword and plan stay visible; secondary conditions expand on demand. */
.report-filter-v2 { display:block; padding:0; overflow:visible; }
.report-filter-v2 .filter-panel-heading { display:flex; min-height:72px; margin:0; padding:16px 18px; }
.report-filter-v2 .filter-panel-heading h2 { color:#173e2d; font-size:17px; }
.report-filter-v2 .filter-panel-heading p { font-size:11px; }
.active-filter-summary { max-width:38%; overflow:hidden; border-radius:999px; padding:6px 10px; background:#edf7f0; color:#176044; font-size:10px; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
.report-filter-primary { display:grid; grid-template-columns:minmax(220px,300px) minmax(180px,220px) minmax(220px,1fr); width:100%; gap:12px; align-items:end; padding:17px 18px; }
.report-filter-v2 .filter-keyword { grid-column:auto; font-size:12px; }
.report-filter-v2 .filter-actions { display:flex; grid-column:auto; justify-content:flex-end; padding:0; }
.plan-filter-picker { position:relative; }
.plan-filter-picker>summary { display:grid; min-height:44px; align-content:center; gap:2px; border:1px solid #bcc7d4; border-radius:10px; padding:6px 38px 6px 13px; background:#fff; cursor:pointer; list-style:none; }
.plan-filter-picker>summary::-webkit-details-marker,.advanced-filter>summary::-webkit-details-marker { display:none; }
.plan-filter-picker>summary::after { position:absolute; top:50%; right:14px; content:"⌄"; color:#66736c; font-size:17px; transform:translateY(-55%); }
.plan-filter-picker[open]>summary { border-color:#77a989; box-shadow:0 0 0 3px rgba(23,96,68,.1); }
.plan-filter-picker>summary span { color:#748078; font-size:9px; font-weight:800; }
.plan-filter-picker>summary strong { overflow:hidden; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.plan-option-list { display:grid; gap:4px; max-height:min(420px,60vh); overflow-y:auto; }
.plan-filter-picker>.plan-option-list { position:absolute; z-index:8; top:calc(100% + 7px); right:0; left:0; min-width:280px; border:1px solid #ccd8cf; border-radius:11px; padding:8px; background:#fff; box-shadow:0 16px 36px rgba(22,56,38,.16); }
.plan-option-list label { display:flex; align-items:center; gap:9px; border-radius:7px; padding:9px 10px; font-size:12px; font-weight:650; cursor:pointer; }
.plan-option-list label:hover { background:#f0f6f2; }
.plan-option-list input { flex:0 0 17px; width:17px; height:17px; margin:0; accent-color:#176044; }
.advanced-filter { border-top:1px solid #e4ebe6; background:#f8faf8; }
.advanced-filter>summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 18px; cursor:pointer; list-style:none; }
.advanced-filter>summary span,.advanced-filter>summary strong,.advanced-filter>summary small { display:block; }
.advanced-filter>summary strong { color:#405048; font-size:12px; }
.advanced-filter>summary small { margin-top:2px; color:#849087; font-size:9px; }
.advanced-filter>summary em { border-radius:999px; padding:5px 9px; background:#e8eee9; color:#59675e; font-size:9px; font-style:normal; font-weight:800; }
.advanced-filter[open]>summary em { background:#dceee2; color:#176044; }
.advanced-filter-body { border-top:1px solid #e4ebe6; padding:16px 18px 18px; }
.advanced-filter-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; align-items:start; }
.advanced-filter-grid>label { font-size:11px; }
.advanced-filter-grid .bulk-filter { grid-column:1 / -1; }
.advanced-filter-grid .bulk-filter textarea { min-height:82px; }

.archived-plan-list { margin-top:16px; border:1px solid #dce5de; border-radius:11px; background:#f6f8f6; }
.archived-plan-list>summary { padding:14px 16px; color:#5d6b62; font-size:12px; font-weight:850; cursor:pointer; }
.archived-plan-list>summary span { margin-left:5px; border-radius:999px; padding:3px 7px; background:#e4e9e5; font-size:9px; }
.archived-plan-list>.plan-list { margin:0; border-top:1px solid #dce5de; padding:12px; }
.merchant-plan-row.is-archived { opacity:.78; background:#f5f6f5; }
.plan-archive-badge { background:#e4e9e5; color:#5d6b62; }

@media (max-width:850px) {
  .report-filter-primary { grid-template-columns:minmax(220px,300px) minmax(180px,220px); }
  .report-filter-v2 .filter-actions { grid-column:1 / -1; justify-content:flex-end; }
  .report-export-actions { grid-template-columns:minmax(220px,300px) minmax(180px,220px); }
  .report-export-actions .button-row { grid-column:1 / -1; }
  .advanced-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:560px) {
  .report-page-head { margin-bottom:12px; }
  .report-title-line h1 { font-size:25px; }
  .report-page-head p { margin-top:4px; line-height:1.5; }
  .admin-reports-page .filter-panel-heading,.admin-reports-page .report-filter-primary,.admin-reports-page .report-export-actions { padding-right:13px; padding-left:13px; }
  .admin-reports-page .report-filter-v2 .filter-actions { width:100%; }
  .report-export-actions { grid-template-columns:1fr; align-items:stretch; gap:10px; }
  .report-export-actions > div:first-child,.report-export-actions .button-row { grid-column:1; }
  .report-export-actions .button-row { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); width:100%; }
  .report-export-actions .button-row > * { min-width:0; padding:0 8px; font-size:10px; text-align:center; }
  .report-filter-v2 .filter-panel-heading { align-items:flex-start; min-height:0; padding:14px; }
  .report-filter-v2 .filter-panel-heading p { line-height:1.5; }
  .active-filter-summary { display:none; }
  .report-filter-primary { grid-template-columns:1fr; padding:14px; }
  .report-filter-v2 .filter-actions { grid-column:1; }
  .report-filter-v2 .filter-actions .button,.report-filter-v2 .filter-actions .button-secondary { flex:1; }
  .plan-filter-picker>.plan-option-list { right:auto; width:min(100%,330px); min-width:0; }
  .advanced-filter>summary { padding:12px 14px; }
  .advanced-filter-body { padding:14px; }
  .advanced-filter-grid { grid-template-columns:1fr; }
  .advanced-filter-grid .bulk-filter { grid-column:1; }
  .client-plan-stack .client-plan-card.has-fields { grid-template-columns:1fr; gap:18px; }
  .client-plan-card-fields { border-top:1px solid rgba(255,255,255,.18); border-left:0; padding-top:18px; padding-left:0; }
}

/* Modern SaaS polish: shared tokens, accessible states, and restrained motion. */
:root {
  --page-bg: #f4f7f5;
  --page-bg-strong: #edf3ef;
  --surface-raised: #ffffff;
  --surface-subtle: #f7faf8;
  --line-strong: #cbd8cf;
  --brand-strong: #123c2a;
  --brand-soft: #e7f3eb;
  --accent-strong: #0f6a49;
  --focus-ring: rgba(31, 126, 87, .22);
  --shadow-sm: 0 5px 18px rgba(22, 56, 38, .045);
  --shadow-md: 0 14px 32px rgba(22, 56, 38, .075);
  --radius-control: 10px;
  --radius-card: 16px;
  --transition-fast: 160ms ease;
}

body { background: var(--page-bg); }
body.app-shell:not(:has(.client-home)):not(:has(.client-page)):not(:has(.client-prototype)) {
  background: radial-gradient(circle at 12% -8%, rgba(201, 232, 214, .48), transparent 32%),
    linear-gradient(145deg, var(--page-bg) 0%, var(--page-bg-strong) 100%);
}

.site-header {
  background: rgba(18, 60, 42, .94);
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 8px 24px rgba(12, 42, 28, .12);
  backdrop-filter: blur(14px);
}
.site-header-inner { gap: 26px; }
.brand { transition: opacity var(--transition-fast), transform var(--transition-fast); }
.brand:hover { opacity: .9; transform: translateY(-1px); }
.brand-mark { background: #dff178; box-shadow: 0 0 0 4px rgba(223, 241, 120, .12); }
.site-nav a, .site-nav .link-button {
  position: relative;
  border: 1px solid transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.site-nav a.active {
  border-color: rgba(223, 241, 120, .2);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-weight: 800;
}
.site-nav a.active::after {
  position: absolute;
  right: 10px;
  bottom: -9px;
  left: 10px;
  height: 2px;
  border-radius: 999px;
  background: #dff178;
  content: "";
}
.site-account .link-button { transition: color var(--transition-fast), background var(--transition-fast); }
.site-account .link-button:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.container { margin-top: 36px; }
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: clamp(28px, 3.5vw, 38px); }
.card, .stat, .export-card, .todo-card, .table-wrap, .filter-panel {
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.card:hover, .stat:hover, .export-card:hover { border-color: #c2d4c7; box-shadow: var(--shadow-md); }
.card { border-radius: var(--radius-card); background: var(--surface-raised); }
.stat { min-height: 112px; background: var(--surface-raised); }
.stat strong { letter-spacing: -.04em; }

input, select, textarea {
  border-color: var(--line-strong);
  border-radius: var(--radius-control);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
input:hover, select:hover, textarea:hover { border-color: #9fbaa8; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 4px var(--focus-ring); }
button, a, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.button, .button-secondary, .button-danger {
  min-height: 44px;
  border-radius: var(--radius-control);
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), opacity var(--transition-fast);
}
.button:hover, .button-secondary:hover, .button-danger:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(22, 56, 38, .12); }
.button:active, .button-secondary:active, .button-danger:active { transform: translateY(0); }
.button:disabled, .button-secondary:disabled, .button-danger:disabled, .button.is-loading { cursor: wait; opacity: .62; transform: none; box-shadow: none; }
.button.is-loading::after { display: inline-block; width: 14px; height: 14px; margin-left: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ""; animation: saas-spin .7s linear infinite; }

.filter-panel, .table-wrap { border-radius: var(--radius-card); background: var(--surface-raised); }
.filter-panel-heading { border-bottom-color: #e5ede7; }
tbody tr { transition: background var(--transition-fast); }
tbody tr:hover { background: #f5faf6; }
tbody tr.duplicate-row:hover, tbody tr.refund-issue:hover { background: #fff4f1; }
th { position: sticky; top: 0; z-index: 1; }
.badge { letter-spacing: .01em; }
.alert { box-shadow: var(--shadow-sm); }
.alert.error, .refund-issue { border-left: 4px solid var(--danger); }
.alert.success { border-left: 4px solid var(--accent-strong); }
.empty { background: rgba(255, 255, 255, .72); }
.pagination a { transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast); }
.pagination a:hover { border-color: #9fbaa8; background: var(--brand-soft); color: var(--brand-strong); }

.client-bottom-nav a { min-height: 52px; transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast); }
.client-bottom-nav a:active { transform: scale(.96); }
.client-report-card, .client-plan-card, .client-current-card { transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast); }
.client-report-card:hover, .client-plan-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.form-grid > *, .filter-panel > *, .advanced-filter-grid > * { min-width: 0; }
.button-row { align-items: center; }

@keyframes saas-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (max-width: 850px) {
  .site-nav a.active::after { bottom: -5px; }
  .container { margin-top: 26px; }
  .card:hover, .stat:hover, .export-card:hover { transform: none; }
}
@media (max-width: 560px) {
  .site-header { box-shadow: 0 5px 16px rgba(12, 42, 28, .1); }
  .site-nav a.active::after { display: none; }
  .container { margin-top: 20px; }
  .card { padding: 18px; border-radius: 14px; }
  .page-head h1 { font-size: 26px; }
  .button, .button-secondary, .button-danger { min-height: 46px; }
  th, td { padding: 12px; }
}
