/* AI Finder design tokens v2 — shared by customer, host and admin apps.
   Idea: Silk Road tilework. Lapis ground, majolica turquoise for actions, saffron for the one thing
   that needs attention. The eight-point star tile is the single decorative motif (hero + sign-in). */
:root {
  --lapis-900: #101a45; --lapis-800: #17245c; --lapis-700: #22347e; --lapis-100: #dfe5f7; --lapis-50: #eef1fb;
  --ink-900: #0d1330; --ink-700: #2a3256; --ink-500: #5b6485; --ink-300: #a3abc6; --ink-100: #e4e8f2; --ink-50: #f1f3f9;
  --teal-700: #0a6b70; --teal-600: #0c8f95; --teal-500: #19aab0; --teal-100: #cfeff0; --teal-50: #e9f8f8;
  --sand-500: #f0a02b; --sand-100: #fdf0d9;
  --ok-600: #1a7a4c; --ok-100: #d9f2e4; --warn-600: #9a5b00; --warn-100: #fdebc8; --err-600: #b42a2a; --err-100: #fbe0e0;
  --info-600: #22347e; --info-100: #dfe5f7;
  --surface: #ffffff; --bg: #f5f7fb; --border: #dfe4f0;
  --radius-sm: 12px; --radius: 20px; --radius-lg: 28px;
  --shadow-1: 0 1px 0 rgba(23,36,92,.04), 0 2px 8px rgba(23,36,92,.05);
  --shadow-2: 0 18px 40px -12px rgba(23,36,92,.28);
  --font: "Onest", ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --font-display: "Unbounded", "Onest", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --tabbar-h: 72px;
  --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.13' stroke-width='1.2'%3E%3Cpath d='M36 6 44.8 27.2 66 36 44.8 44.8 36 66 27.2 44.8 6 36 27.2 27.2z'/%3E%3Cpath d='M14.8 14.8 36 23.6 57.2 14.8 48.4 36 57.2 57.2 36 48.4 14.8 57.2 23.6 36z'/%3E%3Ccircle cx='36' cy='36' r='5'/%3E%3Cpath d='M0 0h6M66 0h6M0 72h6M66 72h6M0 0v6M72 0v6M0 66v6M72 66v6'/%3E%3C/g%3E%3C/svg%3E");
}
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; background: var(--bg); color: var(--ink-900); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--teal-700); }
h1, h2, h3 { margin: 0 0 var(--s3); line-height: 1.12; text-wrap: balance; }
h1 { font-family: var(--font-display); font-size: clamp(24px, 4.2vw, 34px); font-weight: 600; letter-spacing: -.02em; }
h2 { font-family: var(--font-display); font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
h3 { font-size: 16px; font-weight: 650; }
.muted { color: var(--ink-500); } .small { font-size: 14px; } .tiny { font-size: 13px; }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: var(--s4); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 138px), 1fr)); gap: var(--s3); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); gap: var(--s5); }
.grow { flex: 1; min-width: 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 18px; }
.card.flat { box-shadow: none; background: var(--ink-50); border-color: transparent; border-radius: var(--radius-sm); }
.card.pad0 { padding: 0; overflow: hidden; }
article.card.pad0 { transition: box-shadow .18s, transform .18s; } article.card.pad0:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { article.card.pad0 { transition: none; } article.card.pad0:hover { transform: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid transparent; border-radius: 999px; padding: 10px 20px;
  font-weight: 650; cursor: pointer; background: var(--teal-600); color: #fff; white-space: nowrap; min-height: 46px; transition: background .15s; }
.btn:hover { background: var(--teal-700); } .btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .chip:focus-visible, .input:focus-visible, .item:focus-visible, .tabbar button:focus-visible, .seg button:focus-visible { outline: 3px solid var(--sand-500); outline-offset: 2px; }
.btn.secondary { background: var(--surface); color: var(--ink-900); border-color: var(--border); } .btn.secondary:hover { background: var(--ink-50); border-color: var(--ink-300); }
.btn.ghost { background: transparent; color: var(--teal-700); } .btn.ghost:hover { background: var(--teal-50); }
.btn.danger { background: var(--err-600); } .btn.danger:hover { background: #8f1f1f; }
.btn.sm { padding: 6px 14px; min-height: 36px; font-size: 14px; }
.btn.accent { background: var(--sand-500); color: var(--lapis-900); } .btn.accent:hover { background: #e08f17; }
.btn svg { width: 18px; height: 18px; flex: none; }

.field { display: flex; flex-direction: column; gap: 6px; } .field > span { font-size: 14px; font-weight: 600; color: var(--ink-700); }
.input, select.input, textarea.input { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 11px 14px; background: #fff; width: 100%; min-height: 46px; font-size: 16px; }
.input:hover { border-color: var(--ink-300); } .input:focus { outline: none; border-color: var(--teal-600); box-shadow: 0 0 0 4px var(--teal-100); }
textarea.input { resize: vertical; min-height: 104px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--teal-600); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--ink-100); color: var(--ink-700); white-space: nowrap; }
.badge.ok { background: var(--ok-100); color: var(--ok-600); } .badge.warn { background: var(--warn-100); color: var(--warn-600); }
.badge.err { background: var(--err-100); color: var(--err-600); } .badge.info { background: var(--info-100); color: var(--info-600); }
.badge.teal { background: var(--teal-100); color: var(--teal-700); } .badge.mock { background: var(--lapis-800); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--border); background: #fff; cursor: pointer; font-size: 14px; font-weight: 500; min-height: 40px; }
.chip:hover { border-color: var(--ink-300); } .chip.on { background: var(--lapis-800); color: #fff; border-color: var(--lapis-800); }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--info-100); color: var(--info-600); font-size: 15px; }
.alert.err { background: var(--err-100); color: var(--err-600); } .alert.ok { background: var(--ok-100); color: var(--ok-600); } .alert.warn { background: var(--warn-100); color: var(--warn-600); }
.price { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; }
.price small { font-family: var(--font); font-weight: 500; color: var(--ink-500); font-size: 13px; letter-spacing: 0; }

.photo { aspect-ratio: 16/10; background: var(--lapis-800) var(--tile); background-size: 72px; position: relative; }
.photo[style*="url"] { background-size: cover; background-position: center; }
.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,26,69,.28), transparent 38%); pointer-events: none; }
.photo .over { position: absolute; left: 12px; top: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 1; }
.match { position: absolute; right: 12px; bottom: -22px; z-index: 2; width: 58px; height: 58px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-2);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--lapis-800); }
.match::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: conic-gradient(var(--teal-600) calc(var(--v) * 1%), var(--ink-100) 0);
  mask: radial-gradient(circle, transparent 60%, #000 62%); -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%); }

.list { display: flex; flex-direction: column; } .list > * + * { border-top: 1px solid var(--border); }
.item { padding: 14px 18px; display: flex; gap: var(--s3); align-items: center; cursor: pointer; } .item:hover { background: var(--ink-50); } .item.on { background: var(--teal-50); box-shadow: inset 3px 0 0 var(--teal-600); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 13px; color: var(--ink-500); font-weight: 600; background: var(--ink-50); }
table.t th, table.t td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; } table.t tr:last-child td { border-bottom: 0; } .tablewrap { overflow-x: auto; }
.stat { display: flex; flex-direction: column; gap: 2px; } .stat b { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -.02em; } .stat span { font-size: 13px; color: var(--ink-500); font-weight: 500; }
.score { height: 8px; background: var(--ink-100); border-radius: 99px; overflow: hidden; } .score > i { display: block; height: 100%; border-radius: 99px; background: var(--teal-600); }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; background: var(--ink-50); white-space: pre-wrap; overflow-wrap: anywhere; align-self: flex-start; }
.bubble.me { align-self: flex-end; background: var(--lapis-800); color: #fff; border-bottom-right-radius: 6px; } .bubble.them { border-bottom-left-radius: 6px; }
.bubble.ai { background: var(--sand-100); border-bottom-left-radius: 6px; } .bubble.system { align-self: center; background: transparent; color: var(--ink-500); font-size: 14px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal button { border: 1.5px solid var(--border); border-radius: 12px; padding: 6px 2px; background: #fff; cursor: pointer; font-size: 13px; min-height: 58px; }
.cal .available { background: var(--ok-100); border-color: transparent; } .cal .booked { background: var(--lapis-800); color: #fff; border-color: transparent; } .cal .held { background: var(--sand-100); border-color: var(--sand-500); }
.cal .blocked { background: var(--ink-100); color: var(--ink-500); border-color: transparent; } .cal .maintenance { background: var(--err-100); border-color: transparent; }
.modal-bg { position: fixed; inset: 0; background: rgba(16,26,69,.55); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.modal { background: #fff; width: 100%; max-width: 580px; max-height: 92vh; overflow: auto; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: var(--s5); box-shadow: var(--shadow-2); }
@media (min-width: 720px) { .modal-bg { align-items: center; padding: 24px; } .modal { border-radius: var(--radius-lg); } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 28px); background: var(--lapis-900); color: #fff; padding: 12px 20px; border-radius: 999px; z-index: 60; font-size: 15px; font-weight: 500; box-shadow: var(--shadow-2); max-width: calc(100vw - 32px); }
.spin { width: 20px; height: 20px; border: 2.5px solid var(--teal-100); border-top-color: var(--teal-600); border-radius: 50%; animation: s .8s linear infinite; flex: none; } @keyframes s { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: var(--s7) var(--s4); color: var(--ink-500); background: var(--surface); border: 1.5px dashed var(--border); border-radius: var(--radius); }
.card > .empty, .card.pad0 .empty { border: 0; background: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

.shell { min-height: 100vh; padding-bottom: calc(var(--tabbar-h) + 40px); }
.top { position: sticky; top: 0; z-index: 20; background: rgba(245,247,251,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.top .inner { max-width: 1120px; margin: 0 auto; padding: 10px 18px; display: flex; align-items: center; gap: 12px; }
.brand { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; color: var(--lapis-800); }
.brand svg { width: 30px; height: 30px; flex: none; }
.main { max-width: 1120px; margin: 0 auto; padding: 20px 18px; }

/* Navigation: floating pill on phones, lapis rail on desktop */
.tabbar { position: fixed; bottom: 12px; left: 12px; right: 12px; height: var(--tabbar-h); background: var(--lapis-800); border-radius: 26px; box-shadow: var(--shadow-2);
  display: grid; grid-template-columns: repeat(5, 1fr); z-index: 30; padding: 8px; margin-bottom: env(safe-area-inset-bottom); }
.tabbar button { border: 0; background: none; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 600; color: #aab3d6; cursor: pointer; position: relative; }
.tabbar button svg { width: 22px; height: 22px; } .tabbar button.on { color: #fff; background: rgba(255,255,255,.12); }
.tabbar button.on svg { color: var(--sand-500); }
.tabbar button .dot { position: absolute; top: 4px; right: calc(50% - 22px); background: var(--sand-500); color: var(--lapis-900); border-radius: 99px; font-size: 11px; padding: 0 6px; min-width: 18px; font-weight: 700; }
@media (min-width: 900px) {
  .tabbar { top: 0; bottom: 0; left: 0; right: auto; width: 104px; height: auto; border-radius: 0; grid-template-columns: 1fr; grid-auto-rows: 78px; align-content: start; padding: 84px 10px 10px; background: var(--lapis-800) var(--tile); background-size: 72px; }
  .shell { padding-left: 104px; padding-bottom: 32px; } .toast { bottom: 28px; }
  .top .inner, .main { padding-left: 32px; padding-right: 32px; }
}

/* Hero: the one loud moment — lapis tilework with the request composer set into it */
.hero { background: var(--lapis-800) var(--tile); background-size: 72px; border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 40px); color: #fff; display: flex; flex-direction: column; gap: 14px; }
.hero h1 { color: #fff; font-size: clamp(28px, 5.4vw, 46px); margin: 0; max-width: 16ch; }
.hero p { margin: 0; color: #c9d1ee; max-width: 52ch; }
.composer { position: relative; background: #fff; border-radius: 22px; padding: 6px; box-shadow: var(--shadow-2); }
.composer textarea { border: 0; min-height: 104px; padding: 14px 16px; display: block; font-size: 17px; background: transparent; color: var(--ink-900); border-radius: 18px; }
.composer textarea:focus { box-shadow: none; outline: 3px solid var(--sand-500); }
.composer .bar { padding: 6px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.mic.rec { background: var(--err-600) !important; color: #fff !important; border-color: transparent !important; animation: pulse 1.2s infinite; } @keyframes pulse { 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .mic.rec { animation: none; } }
.examples { display: flex; gap: 8px; flex-wrap: wrap; }
.examples button { border: 1.5px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: #fff; border-radius: 999px; padding: 8px 14px; font-size: 14px; cursor: pointer; min-height: 40px; }
.examples button:hover { background: rgba(255,255,255,.18); }
.hero .btn.ghost { color: #fff; } .hero .btn.ghost:hover { background: rgba(255,255,255,.12); }

.split { display: grid; gap: 18px; } @media (min-width: 900px) { .split { grid-template-columns: 340px minmax(0, 1fr); } }
.thread { display: flex; flex-direction: column; gap: 8px; height: 54vh; overflow-y: auto; padding: 16px; }
.reasons { margin: 4px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-700); display: grid; gap: 4px; }
.reasons li { padding-left: 24px; position: relative; }
.reasons li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 7px; border-left: 2.5px solid var(--teal-600); border-bottom: 2.5px solid var(--teal-600); transform: rotate(-45deg); }
.reasons li.muted::before { border: 0; width: 10px; height: 2.5px; top: 10px; background: var(--ink-300); transform: none; }
.compare th { position: sticky; left: 0; }
.seg { display: inline-flex; background: var(--ink-100); border-radius: 999px; padding: 4px; }
.seg button { border: 0; background: none; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-500); min-height: 38px; }
.seg button.on { background: #fff; color: var(--lapis-800); box-shadow: var(--shadow-1); }
.timeline { list-style: none; padding: 0; margin: 0 0 0 6px; border-left: 2px solid var(--lapis-100); } .timeline li { padding: 6px 0 6px 18px; position: relative; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--teal-600); }
.timeline li:last-child::before { background: var(--sand-500); border-color: var(--sand-500); }

/* Sign-in: tile panel beside the form */
.auth { min-height: 100vh; display: grid; }
.auth .panel { background: var(--lapis-800) var(--tile); background-size: 72px; color: #fff; padding: clamp(24px, 5vw, 56px); display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.auth .panel h1 { color: #fff; font-size: clamp(28px, 4.6vw, 48px); max-width: 14ch; margin: 0; }
.auth .panel p { color: #c9d1ee; max-width: 44ch; margin: 12px 0 0; }
.auth .panel .brand { color: #fff; }
.auth .steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: st; }
.auth .steps li { counter-increment: st; display: flex; gap: 12px; align-items: center; color: #e6eaf8; }
.auth .steps li::before { content: counter(st); width: 30px; height: 30px; border-radius: 50%; background: var(--sand-500); color: var(--lapis-900); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.auth .formside { padding: clamp(20px, 5vw, 56px); display: flex; flex-direction: column; justify-content: center; gap: 18px; max-width: 520px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) { .auth { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
@media (max-width: 899px) { .auth .steps { display: none; } }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 8px; }
.section-title h2 { margin: 0; }
.cardbody { display: flex; flex-direction: column; gap: 10px; padding: 30px 16px 16px; }
.cardbody.plain { padding-top: 16px; }
.meta { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 14px; color: var(--ink-500); }
