/* QRNotice design system */
:root {
  --brand: #1d4ed8;
  --brand-600: #2563eb;
  --brand-50: #eff6ff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --bg: #f8fafc;
  --accent: #f59e0b;
  --danger: #b91c1c;
  --success: #15803d;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; }
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1;
  padding: .75em 1.2em; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #1e40af; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-accent { background: var(--accent); color: #1f1300; }
.btn-accent:hover { background: #d97706; }
.btn-sm { font-size: .82rem; padding: .55em .9em; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.logo img { width: 30px; height: 30px; }
.logo span b { color: var(--brand); font-weight: 800; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--brand); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; }
@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .site-nav, .header-actions { display: none; }
  .site-header.open .container { flex-wrap: wrap; padding-bottom: 12px; }
  .site-header.open .site-nav { display: flex; flex-direction: column; width: 100%; gap: 12px; margin: 0; }
  .site-header.open .header-actions { display: flex; width: 100%; }
}

/* Hero */
.hero { padding: 72px 0 56px; background: radial-gradient(1200px 400px at 80% -10%, #dbeafe 0, transparent 60%), var(--bg); }
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); background: var(--brand-50); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; margin: 18px 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust { margin-top: 22px; color: var(--muted); font-size: .9rem; display: flex; gap: 18px; flex-wrap: wrap; }
.hero-trust span::before { content: "✓ "; color: var(--success); font-weight: 700; }
.hero-visual { display: flex; justify-content: center; gap: 18px; align-items: flex-end; }
.mock-sign { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 22px; width: 200px; text-align: center; border: 1px solid var(--line); transform: rotate(-3deg); }
.mock-sign strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.mock-sign small { color: var(--muted); }
.mock-sign img { margin: 12px auto; width: 130px; }
.mock-phone { width: 230px; border-radius: 30px; background: var(--ink); padding: 10px; box-shadow: 0 30px 60px rgba(15, 23, 42, .25); }
.mock-phone .screen { background: var(--bg); border-radius: 22px; padding: 26px 16px; min-height: 340px; }
@media (max-width: 860px) {
  .hero { padding: 48px 0 32px; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.section-alt .feature { background: var(--bg); }
.feature .icon { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 14px; }
.feature h3 { font-size: 1.05rem; }
.feature p { color: var(--ink-2); margin: 0; font-size: .95rem; }
.steps { counter-reset: step; }
.step { position: relative; padding-top: 56px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 24px; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; margin-top: 24px; }
.step { padding: 80px 24px 24px; }

/* Cards & forms */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.card h2, .card h3 { margin-top: 0; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.field .hint { font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.field .hint .over { color: var(--danger); font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], textarea, select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1px solid #cbd5e1; border-radius: var(--radius-sm); padding: .7em .8em;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
input[type=color] { width: 56px; height: 40px; border: 1px solid #cbd5e1; border-radius: var(--radius-sm); padding: 2px; background: #fff; }
.code-input { font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.status-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.status-picker input { position: absolute; opacity: 0; pointer-events: none; }
.status-picker label { border: 1px solid var(--line); border-radius: 999px; padding: .45em .9em; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--ink-2); background: #fff; display: inline-flex; gap: 6px; align-items: center; }
.status-picker label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--muted)); }
.status-picker input:checked + label { border-color: var(--dot); color: var(--ink); box-shadow: inset 0 0 0 1px var(--dot); }
.status-picker input:focus-visible + label { outline: 3px solid rgba(37, 99, 235, .45); }
.alert { border-radius: var(--radius-sm); padding: 12px 14px; font-size: .92rem; margin: 12px 0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-ok { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-info { background: var(--brand-50); color: #1e3a8a; border: 1px solid #bfdbfe; }

/* Tabs (landing tool) */
.tool { max-width: 720px; margin: 0 auto; }
.tabs { display: flex; gap: 4px; background: #eef2f7; padding: 4px; border-radius: 999px; margin-bottom: 20px; }
.tabs button { flex: 1; font: inherit; font-weight: 600; font-size: .92rem; border: 0; background: transparent; padding: .65em 1em; border-radius: 999px; cursor: pointer; color: var(--ink-2); }
.tabs button[aria-selected=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

/* Result / share block */
.share { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.share .qr { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kv { display: grid; gap: 4px; margin-bottom: 14px; }
.kv .k { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: var(--mono); font-size: .9rem; }
.code-big { font-family: var(--mono); font-size: 1.35rem; font-weight: 700; letter-spacing: .1em; }
@media (max-width: 600px) { .share { grid-template-columns: 1fr; } .share .qr { max-width: 220px; } }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 860px; margin: 0 auto; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--brand); box-shadow: var(--shadow); position: relative; }
.plan.featured::before { content: "Most popular"; position: absolute; top: -13px; left: 32px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.plan h3 { font-size: 1.2rem; }
.price { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 4px; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 10px; flex: 1; }
.plan li { padding-left: 26px; position: relative; color: var(--ink-2); }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 12px 0 0; color: var(--ink-2); }

/* Footer */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 48px 0 28px; font-size: .92rem; }
.site-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer a { color: #e2e8f0; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .logo { color: #fff; }
.footer-bottom { grid-column: 1 / -1; border-top: 1px solid #1e293b; padding-top: 20px; margin-top: 12px; color: #94a3b8; }
@media (max-width: 700px) { .site-footer .container { grid-template-columns: 1fr; } }

/* Legal / content pages */
.prose { max-width: 760px; margin: 0 auto; padding: 48px 20px 72px; }
.prose h1 { font-size: 2.2rem; font-weight: 800; }
.prose h2 { font-size: 1.3rem; margin-top: 2em; }
.prose p, .prose li { color: var(--ink-2); }
.prose .updated { color: var(--muted); font-size: .9rem; }

/* Public notice page */
.page-notice { background: linear-gradient(180deg, #eef2ff 0, var(--bg) 320px); min-height: 100vh; }
.notice-page { max-width: 520px; margin: 0 auto; padding: 48px 18px 32px; }
.notice-card { position: relative; overflow: hidden; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 36px 28px 30px; text-align: center; }
.notice-accent { position: absolute; inset: 0 0 auto; height: 6px; background: var(--accent, var(--brand)); }
.notice-page { --accent: var(--brand); }
.notice-page .notice-accent { background: var(--accent); }
.notice-business { font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 800; margin-bottom: 14px; overflow-wrap: anywhere; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; padding: .4em 1em; border-radius: 999px; color: var(--status); background: color-mix(in srgb, var(--status) 10%, #fff); border: 1px solid color-mix(in srgb, var(--status) 30%, #fff); }
.status-pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--status); }
.notice-message { font-size: 1.2rem; color: var(--ink); margin: 22px 0; overflow-wrap: anywhere; }
.notice-meta { color: var(--muted); font-size: .88rem; margin: 4px 0; }
.notice-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.notice-actions .btn-primary { background: var(--accent); }
.powered { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 22px; }
.powered a { font-weight: 700; text-decoration: none; }

/* Print sign */
.page-print { background: #e2e8f0; }
.print-toolbar { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--muted); flex-wrap: wrap; }
.print-sign { background: #fff; width: min(210mm, 100%); min-height: 270mm; margin: 24px auto; padding: 22mm 18mm; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.print-sign h1 { font-size: 44pt; font-weight: 800; margin-bottom: 6mm; overflow-wrap: anywhere; }
.print-lead { font-size: 22pt; font-weight: 600; color: var(--ink-2); margin-bottom: 10mm; }
.print-qr { width: 120mm; height: 120mm; }
.print-url { font-family: var(--mono); font-size: 15pt; margin-top: 8mm; color: var(--ink); }
.print-foot { color: var(--muted); font-size: 12pt; margin-top: 4mm; }
@media print {
  @page { size: auto; margin: 0; }
  .no-print { display: none !important; }
  .page-print { background: #fff; }
  .print-sign { box-shadow: none; margin: 0 auto; min-height: 100vh; }
}

/* Dashboard */
.page-app { min-height: 100vh; display: flex; flex-direction: column; }
.app-main { flex: 1; padding: 32px 0 64px; }
.auth-wrap { max-width: 420px; margin: 32px auto; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-btn img { width: 18px; height: 18px; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h1 { font-size: 1.7rem; margin: 0; }
.plan-badge { display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: #e2e8f0; color: var(--ink-2); vertical-align: middle; margin-left: 8px; }
.plan-badge.pro { background: #fef3c7; color: #92400e; }
.usage { color: var(--muted); font-size: .9rem; }
.notice-list { display: grid; gap: 16px; }
.notice-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: start; }
.notice-item .thumb { border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; }
.notice-item h3 { font-size: 1.1rem; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notice-item .msg { color: var(--ink-2); margin: 8px 0; white-space: pre-line; overflow-wrap: anywhere; }
.notice-item .meta { color: var(--muted); font-size: .85rem; display: flex; gap: 14px; flex-wrap: wrap; }
.notice-item .actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.quick-status { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.quick-status button { font: inherit; font-size: .78rem; font-weight: 600; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .35em .8em; cursor: pointer; color: var(--ink-2); }
.quick-status button[aria-pressed=true] { border-color: var(--dot); color: var(--ink); box-shadow: inset 0 0 0 1px var(--dot); }
.status-pill.sm { font-size: .75rem; padding: .25em .7em; }
@media (max-width: 720px) {
  .notice-item { grid-template-columns: 72px 1fr; }
  .notice-item .actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}
.empty { text-align: center; padding: 48px 20px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.side-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .side-grid { grid-template-columns: 1fr; } }
.side-card h3 { font-size: 1rem; }
.side-card + .side-card { margin-top: 16px; }

/* Modal */
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(560px, calc(100vw - 24px)); box-shadow: 0 30px 80px rgba(15, 23, 42, .3); color: var(--ink); }
dialog::backdrop { background: rgba(15, 23, 42, .5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.15rem; margin: 0; }
.modal-close { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-body { padding: 22px; max-height: 75vh; overflow: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line); }
.pro-fields { border: 1px dashed #fcd34d; border-radius: var(--radius-sm); padding: 14px; margin-bottom: 16px; }
.pro-fields legend { font-weight: 700; font-size: .85rem; padding: 0 6px; color: #92400e; }
.pro-fields[disabled] { opacity: .6; }

/* Analytics */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.kpi .v { font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.kpi .l { font-size: .78rem; color: var(--muted); font-weight: 600; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .bar { fill: var(--brand); }
.chart .bar.zero { fill: #e2e8f0; }
.chart .hit:hover + .bar, .chart .bar.active { fill: #1e40af; }
.chart .grid-line { stroke: #eef2f7; stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: .8rem; padding: 6px 9px; border-radius: 6px; transform: translate(-50%, -100%); white-space: nowrap; }
.chart-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: 8px; }
.chart-table th, .chart-table td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.chart-table td:last-child, .chart-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* Toast */
.toast-host { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; display: grid; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: .92rem; animation: toast-in .2s ease-out; }
.toast.error { background: #991b1b; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 404 */
.page-404 .notice-page { padding-top: 96px; }
