:root {
  --bg: #f6f7f5; --card: #fff; --ink: #17201e; --muted: #5d6b67; --line: #e2e6e3;
  --brand: #0f766e; --brand-ink: #fff; --accent: #f59e0b; --bad: #b42318; --ok: #067647;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1413; --card: #182120; --ink: #e8eeec; --muted: #9aa8a4; --line: #2a3533; --brand: #2dd4bf; --brand-ink: #062a26; --shadow: none; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
.top { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px 0; padding-top: max(10px, env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.brand small { font-weight: 500; color: var(--muted); font-size: .8rem; }
.logo { width: 24px; height: 24px; border-radius: 7px; background: var(--brand); display: inline-block; position: relative; }
.logo::after { content: ""; position: absolute; inset: 6px 5px 6px 7px; background: var(--brand-ink); clip-path: polygon(0 100%, 100% 50%, 0 0, 25% 50%); }
.tabs { display: flex; gap: 2px; overflow-x: auto; margin-top: 8px; scrollbar-width: none; }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; font-size: .95rem; }
.tabs a.on { color: var(--brand); border-color: var(--brand); }
.banner { background: color-mix(in srgb, var(--accent) 18%, var(--bg)); color: var(--ink); font-size: .85rem; padding: 6px 16px; border-bottom: 1px solid var(--line); }
main { max-width: 860px; margin: 0 auto; padding: 16px; outline: none; }
.foot { max-width: 860px; margin: 24px auto 40px; padding: 0 16px; color: var(--muted); font-size: .82rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.lede { color: var(--muted); margin: 0 0 14px; }
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 640px) { form .row.r3 { grid-template-columns: 1fr 1fr 1fr; } form .row.r4 { grid-template-columns: repeat(4, 1fr); } }
label { display: block; font-size: .82rem; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; min-height: 42px; }
textarea { min-height: 70px; resize: vertical; }
button { font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 11px 16px; min-height: 44px; background: var(--brand); color: var(--brand-ink); cursor: pointer; }
button.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
button:disabled { opacity: .55; cursor: wait; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.chip { font-size: .8rem; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; font-weight: 600; min-height: 0; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.tag { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); font-weight: 700; margin: 0 4px 4px 0; }
.tag.warn { background: color-mix(in srgb, var(--accent) 22%, transparent); color: #92400e; }
.tag.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
@media (prefers-color-scheme: dark) { .tag.warn { color: var(--accent); } }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.err { color: var(--bad); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.kpi b { display: block; font-size: 1.35rem; } .kpi span { color: var(--muted); font-size: .8rem; }
.leg { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.leg:first-of-type { border-top: 0; }
.mode { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: .7rem; font-weight: 800; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); text-transform: uppercase; }
.price { font-weight: 800; white-space: nowrap; }
details { margin-top: 6px; } summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .88rem; }
.opt { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; padding: 6px 0; border-top: 1px dashed var(--line); }
.hotels { display: grid; gap: 12px; }
@media (min-width: 640px) { .hotels { grid-template-columns: 1fr 1fr; } }
.hotel { display: grid; grid-template-columns: 86px 1fr; gap: 12px; }
.ph { width: 86px; height: 86px; border-radius: 12px; display: grid; place-items: end start; padding: 6px; color: #fff; font-weight: 800; font-size: .7rem; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.hotel h3 { margin-bottom: 2px; }
.stars { color: var(--accent); letter-spacing: 1px; font-size: .8rem; }
.day { border-left: 3px solid var(--brand); padding: 2px 0 2px 12px; margin: 12px 0; }
.act { display: grid; grid-template-columns: 84px 1fr; gap: 8px; font-size: .92rem; padding: 3px 0; }
.act b { color: var(--muted); font-weight: 600; }
.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); transition: width .4s; }
.stages { display: grid; gap: 6px; margin-top: 12px; }
.stage { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.dot.done { background: var(--ok); } .dot.processing { background: var(--accent); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .35; } }
.seg { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ts { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); font-size: .9rem; }
.occ { display: flex; align-items: end; gap: 4px; height: 110px; margin-top: 8px; }
.occ div { flex: 1; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.occ-l { display: flex; gap: 4px; font-size: .62rem; color: var(--muted); } .occ-l span { flex: 1; text-align: center; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { text-align: left; padding: 7px 6px; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; border-top: 0; }
.scroll { overflow-x: auto; }
.threads { display: grid; gap: 8px; }
.thread { text-align: left; background: var(--card); color: var(--ink); border: 1px solid var(--line); font-weight: 400; display: grid; gap: 2px; }
.thread.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.chat { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: .93rem; }
.msg.guest { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.agent { align-self: flex-end; background: color-mix(in srgb, var(--brand) 16%, var(--card)); border-bottom-right-radius: 4px; }
.acts { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; color: var(--muted); margin-top: 4px; }
.send { display: flex; gap: 8px; } .send input { margin: 0; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; overflow: auto; font-size: .76rem; max-height: 360px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.ep { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.verb { font-weight: 800; font-size: .74rem; } .verb.POST { color: var(--accent); } .verb.GET { color: var(--ok); }
.hero { border: 2px solid var(--brand); }
.split { display: grid; gap: 14px; } @media (min-width: 720px) { .split { grid-template-columns: 260px 1fr; } }
.stoprow { display: flex; gap: 8px; align-items: end; } .stoprow label { flex: 1; margin-bottom: 8px; } .stoprow button { margin-bottom: 8px; }
