@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Young+Serif&display=swap");
:root {
  --bg: #f5efe4; --card: #fffaf2; --ink: #1d2a24; --muted: #6b6f66; --line: #e6dccb;
  --brand: #1f4d3a; --ok: #2e7d4f; --warn: #b4532a; --radius: 16px;
  --serif: "Young Serif", Georgia, serif;
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: var(--brand); }
h1, h2, h3 { margin: 0 0 .4em; letter-spacing: -.01em; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
p { margin: 0 0 1em; line-height: 1.5; }
.muted { color: var(--muted); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 16px 60px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.logo { font-weight: 800; font-size: 20px; }
.logo span { color: var(--brand); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 6px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
button { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 11px 18px; cursor: pointer; background: var(--brand); color: #fff; transition: filter .15s, transform .05s; }
button:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button:disabled { opacity: .55; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.chip { background: #eef1f5; color: var(--ink); padding: 7px 12px; font-size: 13px; font-weight: 500; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: #eef1f5; color: var(--muted); }
.pill.ai { background: #e8f0fe; color: #1a56db; }
.pill.sens { background: #fdf2e9; color: var(--warn); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.field-row input, .field-row select { padding: 7px 9px; }
.field-row .x { background: transparent; color: var(--muted); padding: 6px 8px; }
.step-title { font-weight: 700; margin-top: 16px; }
.small { font-size: 13px; }

/* Kiosk */
.kiosk { --brand: #1f6feb; min-height: 560px; height: 100%; display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.kiosk .k-head { background: var(--brand); color: #fff; padding: 18px 26px; font-weight: 700; font-size: 18px; display: flex; justify-content: space-between; }
.kiosk .k-body { flex: 1; padding: 32px max(30px, calc(50% - 340px)); display: flex; flex-direction: column; justify-content: center; }
.kiosk h2 { font-size: 30px; }
.kiosk .k-sub { font-size: 18px; color: var(--muted); }
.kiosk label { font-size: 17px; }
.kiosk input, .kiosk select, .kiosk textarea { font-size: 18px; padding: 14px; }
.kiosk .check { display: flex; gap: 12px; align-items: center; font-size: 17px; font-weight: 500; margin: 14px 0; }
.kiosk .check input { width: 26px; height: 26px; }
.kiosk .k-btn { background: var(--brand); font-size: 20px; padding: 16px 28px; margin-top: 24px; }
.kiosk .k-btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.kiosk .k-nav { display: flex; justify-content: space-between; gap: 12px; }
.kiosk .k-err { color: #b91c1c; margin-top: 12px; min-height: 1.4em; }
.kiosk .ticket { font-size: 88px; font-weight: 800; color: var(--brand); line-height: 1; margin: 10px 0 14px; }
.kiosk .dots { display: flex; gap: 6px; margin-bottom: 18px; }
.kiosk .dots i { height: 6px; flex: 1; border-radius: 3px; background: var(--line); }
.kiosk .dots i.on { background: var(--brand); }
body.fullkiosk { background: #fff; }
body.fullkiosk .kiosk { border: 0; border-radius: 0; min-height: 100vh; }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat .n { font-size: 32px; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-top: 0; }
tbody tr:hover { background: #fafbfc; }
td button { padding: 6px 10px; font-size: 13px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin-top: 8px; }
.bars div { flex: 1; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; opacity: .85; }
.audit li { padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; list-style: none; }
.audit { padding: 0; margin: 0; }

/* AI input, phone mode, busy overlay */
.kiosk { position: relative; }
.ai-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.ai-btn { background: #eef1f5; color: var(--ink); font-size: 16px; padding: 12px 18px; border: 1px solid var(--line); }
.ai-btn::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-right: 8px; vertical-align: 1px; }
.ai-btn.rec { background: #fee2e2; border-color: #fca5a5; }
.ai-btn.rec::before { background: #dc2626; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .2; } }
.ai-note { background: #eef4ff; border-left: 3px solid var(--brand); padding: 10px 14px; border-radius: 8px; font-size: 15px; margin-bottom: 12px; color: #1e3a8a; }
.ai-reply { font-size: 19px; font-weight: 600; margin-bottom: 14px; }
.k-busy { position: absolute; inset: 0; background: rgba(255,255,255,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; font-size: 18px; font-weight: 600; }
.spin { width: 38px; height: 38px; border: 4px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.qr-box { display: flex; gap: 16px; align-items: center; margin-top: 34px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; max-width: 440px; }
.qr-box #qr { flex: none; width: 120px; height: 120px; }
.kiosk.phone .k-body { padding: 22px 18px; justify-content: flex-start; }
.kiosk.phone h2 { font-size: 24px; }
.kiosk.phone .k-btn { width: 100%; }
.kiosk.phone .k-nav { flex-direction: column-reverse; }
.kiosk.phone .k-nav .k-btn { margin-top: 10px; }
.kiosk.phone .row .k-btn { width: 100%; }
.flag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #fef3c7; color: #92400e; margin: 4px 4px 0 0; }
.flag.urgent { background: #fee2e2; color: #991b1b; }
.summary { font-weight: 600; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 6px; }
.kiosk.phone .k-head { padding: 16px 18px; font-size: 17px; }
.kiosk.phone .k-head .small { display: none; }

/* Platform: nav, finder, business page, wallet, ratings */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; max-width: 1180px; margin: 0 auto; }
.nav nav { display: flex; gap: 18px; font-size: 14px; font-weight: 600; }
.nav nav a { color: var(--ink); text-decoration: none; }
.nav nav a:hover, .nav nav a.on { color: var(--brand); }
.biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.biz { display: block; text-decoration: none; color: var(--ink); border-top: 4px solid var(--b, var(--brand)); transition: transform .12s, box-shadow .12s; }
.biz:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(20,23,28,.08); }
.biz h3 { font-size: 18px; margin-bottom: 4px; }
.ease { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 800; }
.ease .n { font-size: 22px; color: var(--b, var(--brand)); }
.ease .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.search { display: flex; gap: 10px; margin: 16px 0 10px; }
.search input { font-size: 17px; padding: 13px 14px; }
.linkbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.linkbtns a { display: inline-block; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; background: #fff; transition: border-color .12s; }
.linkbtns a:hover { border-color: var(--b, var(--brand)); color: var(--b, var(--brand)); }
.rate { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0; }
.rate button { background: #eef1f5; color: var(--ink); padding: 14px 0; font-size: 20px; font-weight: 800; }
.rate button.on { background: var(--brand); color: #fff; }
.rate-l { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.stars { color: var(--brand); font-weight: 800; }

/* Assistant chat */
.chat-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat { flex: 1; min-height: 220px; max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 12px; }
.bubble { max-width: 82%; padding: 12px 15px; border-radius: 16px; font-size: 17px; line-height: 1.4; white-space: pre-wrap; }
.bubble.assistant { background: #eef1f5; align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.user { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble.typing { display: flex; gap: 5px; padding: 15px; }
.bubble.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: pulse 1s infinite; }
.bubble.typing i:nth-child(2) { animation-delay: .2s; } .bubble.typing i:nth-child(3) { animation-delay: .4s; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.slot { font-size: 13px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.slot.need { border-style: dashed; }
.slot.ok { background: #dcfce7; border-color: #86efac; color: #166534; font-weight: 600; }
.slot.ok::before { content: "\2713  "; }
.chat-in { display: flex; gap: 8px; }
.chat-in input { flex: 1; font-size: 17px; padding: 13px; }
.chat-in button { padding: 0 18px; }
.chat-in .mic { background: #eef1f5; color: var(--ink); border: 1px solid var(--line); }
.chat-in .mic.rec { background: #fee2e2; border-color: #fca5a5; color: #991b1b; animation: pulse 1s infinite; }
.kiosk .k-btn:disabled { opacity: .45; }
.kiosk.phone .chat { max-height: 52vh; }
.kiosk.phone .chat-wrap .row .k-btn { width: auto; flex: 1; }
.urgent-banner { background: #dc2626; color: #fff; font-weight: 700; font-size: 18px; padding: 14px 16px; border-radius: 10px; margin-bottom: 10px; }
.help-btn { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.5); padding: 7px 14px; font-size: 14px; }
.alert-bar { display: flex; align-items: center; gap: 14px; background: #dc2626; color: #fff; padding: 14px 18px; border-radius: 12px; margin-bottom: 12px; font-weight: 600; animation: flash 1.2s ease-in-out 3; }
.alert-bar.help { background: #d97706; }
.alert-bar button { background: #fff; color: #111; margin-left: auto; }
@keyframes flash { 50% { filter: brightness(1.25); } }
.pay-box { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.pay-box input { width: 90px; padding: 6px 8px; }
.pill.payment { background: #ede9fe; color: #5b21b6; }
.pill.ok { background: #dcfce7; color: #166534; }
