:root {
--navy: #14284b;
--navy-2: #1e3a69;
--red: #b22234;
--red-soft: #fbe9ea;
--bg: #f2eee6;
--panel: #ffffff;
--ink: #1a1d24;
--muted: #646b78;
--line: #ded8cc;
--bubble-in: #e6e0d4;
--bubble-out: #1e3a69;
--ok: #1f7a4d;
--ok-soft: #e4f3ea;
--warn: #9a6200;
--radius: 12px;
--font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
--display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
color-scheme: light;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #0f141d; --panel: #171e2b; --ink: #e9ebef; --muted: #9aa3b2; --line: #2a3446;
--bubble-in: #232c3d; --bubble-out: #2f4d85; --red-soft: #3a1b1f; --ok-soft: #173326;
color-scheme: dark;
}
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line);
background: var(--panel); border-radius: 9px; padding: 9px 14px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.navy { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
label.field { display: grid; gap: 6px; font-weight: 600; font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=datetime-local], textarea, select {
width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 10px 12px; font-size: 15px; }
textarea { resize: vertical; min-height: 44px; }
input:focus, textarea:focus, select:focus, .btn:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.error { color: var(--red); font-size: 14px; min-height: 1em; }
.login-wrap { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; background: #14284b; }
.hero-badge { width: min(220px, 56vw); height: auto; }
.login-foot { margin: 0; color: #c9d2e3; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border-radius: 18px; padding: 28px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: grid; gap: 16px; }
.login-card .brand { display: flex; align-items: center; gap: 12px; }
.login-card h1 { margin: 0; font-family: var(--display); font-size: 34px; letter-spacing: .5px; line-height: 1; }
.login-card .tag { margin: 2px 0 0; color: var(--muted); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.badge-logo { width: 52px; height: 52px; flex: none; }
.app { height: 100%; display: grid; grid-template-rows: auto auto 1fr; }
.topbar { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 14px; padding: 10px 16px; }
.topbar .wordmark { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: .5px; }
.topbar .wordmark img { width: 36px; height: auto; }
.topbar .wordmark span { display: grid; line-height: 1; }
.topbar .wordmark small { font-family: var(--font); font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; color: #c9d2e3; font-weight: 700; margin-top: 2px; }
.topbar .shop { color: #c9d2e3; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.topbar .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
.tabs { display: flex; gap: 4px; background: var(--navy); padding: 0 12px; border-bottom: 3px solid var(--red); overflow-x: auto; }
.tabs button { background: none; border: 0; color: #c9d2e3; padding: 10px 14px; font-weight: 700; cursor: pointer; border-radius: 8px 8px 0 0; display: flex; gap: 6px; align-items: center; }
.tabs button[aria-selected=true] { background: var(--red); color: #fff; }
.count { background: var(--red); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 7px; font-weight: 700; }
.tabs button[aria-selected=true] .count { background: #fff; color: var(--red); }
.banner { background: #fff4d6; color: #5d4300; padding: 8px 16px; font-size: 13px; border-bottom: 1px solid #ecd9a0; }
.view { min-height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.inbox { height: 100%; display: grid; grid-template-columns: 360px 1fr; }
.list-pane { border-right: 1px solid var(--line); background: var(--panel); display: grid; grid-template-rows: auto auto 1fr; min-height: 0; }
.list-tools { padding: 12px; display: flex; gap: 8px; }
.filters { display: flex; gap: 6px; padding: 0 12px 10px; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed=true] { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }
.conv-list { overflow-y: auto; border-top: 1px solid var(--line); }
.conv { display: grid; grid-template-columns: 10px 1fr auto; gap: 4px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; }
.conv:hover { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.conv[aria-current=true] { background: color-mix(in srgb, var(--navy-2) 10%, var(--panel)); }
.conv .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; }
.conv.unread .dot { background: var(--red); }
.conv .who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .who { color: var(--red); }
.conv .when { font-size: 12px; color: var(--muted); }
.conv .preview { grid-column: 2 / 4; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .tags { grid-column: 2 / 4; display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.tag-pill { white-space: nowrap; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bubble-in); color: var(--muted); }
.tag-pill.missed { background: var(--red-soft); color: var(--red); }
.tag-pill.booked { background: var(--ok-soft); color: var(--ok); }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.thread-pane { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; }
.thread-head { background: var(--panel); border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.thread-head .title { flex: 1; min-width: 160px; }
.thread-head .name { font-weight: 800; font-size: 17px; }
.thread-head .sub { color: var(--muted); font-size: 13px; }
.back { display: none; }
.messages { overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: min(78%, 560px); padding: 9px 13px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.38; }
.msg.in { align-self: flex-start; background: var(--bubble-in); border-bottom-left-radius: 5px; }
.msg.out { align-self: flex-end; background: var(--bubble-out); color: #fff; border-bottom-right-radius: 5px; }
.msg.out.failed { background: var(--red-soft); color: var(--red); border: 1px solid var(--red); }
.meta { font-size: 11.5px; color: var(--muted); margin-top: -4px; }
.meta.out { align-self: flex-end; }
.event { align-self: center; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--bubble-in); color: var(--muted); text-align: center; }
.event.missed_call { background: var(--red-soft); color: var(--red); }
.event.appointment { background: var(--ok-soft); color: var(--ok); }
.msg img { display: block; max-width: 220px; border-radius: 10px; margin-top: 6px; }
.composer { background: var(--panel); border-top: 1px solid var(--line); padding: 10px 12px; display: grid; gap: 8px; }
.composer .row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 160px; }
.quick { display: flex; gap: 6px; overflow-x: auto; }
.quick .chip { white-space: nowrap; }
.optout { padding: 12px 16px; background: var(--red-soft); color: var(--red); font-weight: 600; }
.no-thread { display: grid; place-items: center; color: var(--muted); text-align: center; padding: 24px; }
.page { height: 100%; overflow-y: auto; padding: 20px 16px 40px; }
.page-inner { max-width: 760px; margin: 0 auto; display: grid; gap: 18px; }
.page h2 { font-family: var(--display); font-size: 26px; margin: 0; letter-spacing: .3px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 14px; }
.card h3 { margin: 0; font-size: 16px; }
.day-head { font-weight: 800; color: var(--navy-2); margin: 6px 0 -6px; }
@media (prefers-color-scheme: dark) { .day-head { color: #9fb6e0; } }
.appt { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.appt .time { font-weight: 800; font-size: 17px; }
.appt .who { font-weight: 700; }
.appt .sub { color: var(--muted); font-size: 13px; }
.appt .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.user-row:last-child { border-bottom: 0; }
.user-row .grow { flex: 1; }
.readonly-note { color: var(--muted); font-size: 13px; }
dialog { border: 0; border-radius: 16px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(10, 16, 28, .55); }
dialog form { padding: 20px; display: grid; gap: 14px; }
dialog h3 { margin: 0; font-size: 18px; }
dialog .actions { display: flex; justify-content: flex-end; gap: 8px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; }
.preview-text { background: var(--bubble-in); border-radius: 12px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 50; max-width: calc(100vw - 32px); box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.toast.bad { background: var(--red); }
@media (max-width: 760px) {
.topbar .shop { display: none; }
.inbox { grid-template-columns: 1fr; }
.inbox.show-thread .list-pane { display: none; }
.inbox:not(.show-thread) .thread-pane { display: none; }
.back { display: inline-flex; }
.msg { max-width: 86%; }
.grid-2 { grid-template-columns: 1fr; }
.appt { grid-template-columns: 70px 1fr; }
.appt .actions { grid-column: 1 / 3; justify-content: flex-start; }
}
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; }
.hint.tight { margin: -8px 0 0; }
.hint.center { margin: 0; text-align: center; }
.stack { display: grid; gap: 10px; }
.row-actions { display: flex; gap: 10px; align-items: center; }
.end { display: flex; align-items: flex-end; }
.empty-tag { width: min(280px, 72%); height: auto; border-radius: 16px; }
.about { grid-template-columns: 88px 1fr; align-items: center; }
.about img { width: 88px; height: 88px; border-radius: 50%; }
.about .hint { margin: 4px 0 0; }
.text-red { color: var(--red); }
a.btn { text-decoration: none; }