/* Chatilo design system
   Petrol ink, jade and papaya on a cool mist. The one recurring shape is the
   chat bubble: three round corners and one tight "tail" corner. */

:root {
  --ink: #0F2E33;
  --ink-2: #1A4047;
  --ink-3: #2A565E;
  --jade: #0B7D5E;
  --jade-dark: #086349;
  --jade-bright: #1FCF9A;
  --jade-tint: #DFF5EC;
  --papaya: #FF6B3D;
  --papaya-dark: #C8431A;
  --papaya-tint: #FFE8DF;
  --butter: #FFF1C2;
  --blue: #2F7FF0;
  --blue-tint: #E3EEFF;
  --red: #C9364A;
  --red-tint: #FCE4E7;
  --amber: #96650F;
  --amber-tint: #FCF0D2;
  --mist: #F1F5F4;
  --surface: #FFFFFF;
  --line: #DCE5E3;
  --line-soft: #E9EFEE;
  --text: #132A2E;
  --heading: #0F2E33;
  --muted: #55696D;
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --bubble: 18px 18px 18px 5px;
  --bubble-out: 18px 18px 5px 18px;
  --shadow-1: 0 1px 2px rgba(15, 46, 51, .06), 0 1px 1px rgba(15, 46, 51, .04);
  --shadow-2: 0 10px 30px -12px rgba(15, 46, 51, .25), 0 2px 6px rgba(15, 46, 51, .06);
  --shadow-3: 0 30px 70px -20px rgba(15, 46, 51, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sidebar-w: 232px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 15px/1.55 var(--font-body);
  color: var(--text);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--heading); margin: 0; line-height: 1.15; letter-spacing: -.015em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--jade); text-decoration: none; }
a:hover { color: var(--jade-dark); }
img, svg { max-width: 100%; vertical-align: middle; }
code, .mono { font-family: var(--font-mono); font-size: .86em; }
code { background: var(--mist); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(31, 207, 154, .55); outline-offset: 2px; border-radius: 6px; }
.icon { flex: none; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); z-index: 1000; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.3rem/1 var(--font-display); color: var(--heading); letter-spacing: -.03em; }
.brand:hover { color: var(--heading); }
.brand-light, .brand-light:hover { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px;
  font: 600 .93rem/1 var(--font-body); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .12s var(--ease), box-shadow .18s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.is-loading { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--jade); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 14px -8px rgba(11,125,94,.8); }
.btn-primary:hover { background: var(--jade-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); color: #fff; }
.btn-accent { background: var(--papaya); color: #3A1206; }
.btn-accent:hover { background: #FF7F57; color: #3A1206; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--heading); }
.btn-ghost:hover { border-color: #B9C8C5; background: #FAFCFB; color: var(--heading); }
.btn-soft { background: var(--jade-tint); color: var(--jade-dark); }
.btn-soft:hover { background: #CDEFE1; color: var(--jade-dark); }
.btn-danger { background: var(--surface); border-color: #EBC2C8; color: var(--red); }
.btn-danger:hover { background: var(--red-tint); color: var(--red); }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: .84rem; border-radius: 8px; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; min-height: 38px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--jade); font: inherit; font-weight: 600; cursor: pointer; }
.link-btn:hover { color: var(--jade-dark); text-decoration: underline; }
.link-danger { color: var(--red); }

/* ---------- Forms ---------- */
.form-stack { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field-narrow { max-width: 140px; }
label, .label { font-weight: 600; font-size: .88rem; color: var(--heading); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number],
input[type=search], input[type=datetime-local], input[type=color], input:not([type]), select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #C9D6D3; border-radius: 10px;
  background: var(--surface); color: var(--text); font: 400 .95rem/1.4 var(--font-body);
  transition: border-color .15s, box-shadow .15s;
}
input[type=color] { padding: 4px; width: 56px; cursor: pointer; }
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2355696D' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input:hover, select:hover, textarea:hover { border-color: #A9BCB8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(31, 207, 154, .28); }
input::placeholder, textarea::placeholder { color: #8A9B9E; }
.hint { font-size: .83rem; color: var(--muted); }
.field-error { font-size: .83rem; color: var(--red); font-weight: 500; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.check { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--jade); }
.segmented { display: inline-flex; padding: 4px; margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--mist); gap: 4px; flex-wrap: wrap; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: .88rem; color: var(--muted); transition: background .15s, color .15s; }
.segmented input:checked + span { background: var(--surface); color: var(--heading); box-shadow: var(--shadow-1); }
.segmented input:focus-visible + span { outline: 3px solid rgba(31,207,154,.55); }
.input-group { display: flex; gap: 8px; }
.input-group > input { flex: 1; }
.search-input { position: relative; }
.search-input .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input input { padding-left: 38px; }

/* ---------- Feedback ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); border: 1px solid; font-size: .93rem; margin-bottom: 16px; }
.alert .icon { margin-top: 2px; }
.alert-success { background: var(--jade-tint); border-color: #B7E6D3; color: #064C39; }
.alert-danger { background: var(--red-tint); border-color: #F3C2C9; color: #7E1D2B; }
.alert-info { background: var(--blue-tint); border-color: #C4DAFB; color: #17437F; }
.alert-warn { background: var(--amber-tint); border-color: #F0DCA4; color: #6B470A; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 1000; max-width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--bubble-out); box-shadow: var(--shadow-2); animation: toast-in .28s var(--ease); font-size: .92rem; }
.toast.is-error { background: #7E1D2B; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--mist); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge-green { background: var(--jade-tint); color: #075F47; border-color: #BFE8D7; }
.badge-amber { background: var(--amber-tint); color: #6B470A; border-color: #EFDCA6; }
.badge-red { background: var(--red-tint); color: #8C2030; border-color: #F3C6CC; }
.badge-blue { background: var(--blue-tint); color: #1B4C91; border-color: #C8DCFA; }
.badge-papaya { background: var(--papaya-tint); color: #8F2F10; border-color: #FBCDBC; }
.badge-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 7px; font-size: .78rem; font-weight: 600; }
.tag-0 { background: #DFF5EC; color: #075F47; } .tag-1 { background: #FFE8DF; color: #8F2F10; }
.tag-2 { background: #E3EEFF; color: #1B4C91; } .tag-3 { background: #FCF0D2; color: #6B470A; }
.tag-4 { background: #EFE6FB; color: #54298F; } .tag-5 { background: #FCE4EE; color: #8E1F52; }
.tag button { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; display: inline-flex; opacity: .7; }
.tag button:hover { opacity: 1; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.card-head p { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.card + .card { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.grid .card + .card { margin-top: 0; }
.stack { display: grid; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.codeblock { background: var(--ink); color: #D6F5EA; border-radius: var(--r); padding: 14px 16px; font-family: var(--font-mono); font-size: .84rem; overflow-x: auto; position: relative; }
.codeblock code { background: none; border: 0; padding: 0; color: inherit; white-space: pre-wrap; word-break: break-all; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row input { font-family: var(--font-mono); font-size: .84rem; background: var(--mist); }
.plain-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.plain-list li { display: flex; gap: 10px; align-items: flex-start; }
.plain-list .icon { color: var(--jade); margin-top: 3px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Avatars ---------- */
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px 12px 12px 4px; font: 700 .82rem/1 var(--font-display); flex: none; }
.avatar-sm { width: 28px; height: 28px; font-size: .68rem; border-radius: 9px 9px 9px 3px; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; border-radius: 18px 18px 18px 5px; }
.avatar-0 { background: #CDEFE1; color: #075F47; } .avatar-1 { background: #FFD9CB; color: #8F2F10; }
.avatar-2 { background: #D3E4FF; color: #1B4C91; } .avatar-3 { background: #FBE7B3; color: #6B470A; }
.avatar-4 { background: #E4D6FA; color: #54298F; } .avatar-5 { background: #FAD3E3; color: #8E1F52; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font: 600 .76rem/1 var(--font-body); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FAFCFB; }
.table th:first-child { border-top-left-radius: var(--r-lg); } .table th:last-child { border-top-right-radius: var(--r-lg); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #F8FBFA; }
.table .cell-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table .cell-main strong { display: block; color: var(--heading); font-weight: 600; }
.table .cell-actions { text-align: right; white-space: nowrap; }
.table .cell-actions form { display: inline; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.pagination-info { color: var(--muted); font-size: .86rem; margin-right: auto; }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 56px 24px; display: grid; justify-items: center; gap: 10px; }
.empty-art { width: 64px; height: 64px; display: grid; place-items: center; background: var(--jade-tint); color: var(--jade); border-radius: 22px 22px 22px 6px; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 44ch; }
.empty .btn { margin-top: 8px; }

/* ---------- Dialogs & menus ---------- */
dialog.modal { border: 0; padding: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-3); width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); color: var(--text); }
dialog.modal.modal-wide { width: min(820px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(15, 46, 51, .55); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: modal-in .24s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line-soft); position: sticky; bottom: 0; background: var(--surface); }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-2); padding: 6px; z-index: 40; display: none; }
.dropdown.is-open .dropdown-menu { display: block; animation: modal-in .16s var(--ease); }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; color: var(--text); font: 500 .92rem var(--font-body); cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--mist); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--heading); }
.tabs a.is-active { color: var(--heading); border-color: var(--jade); }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { background: var(--ink); color: #C5D8D5; display: flex; flex-direction: column; padding: 18px 12px 14px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; z-index: 50; }
.sidebar .brand { padding: 4px 10px 18px; }
.nav-label { font: 600 .68rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: #6F8F8C; padding: 16px 12px 8px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px 11px 11px 4px; color: #C5D8D5; font-weight: 500; font-size: .93rem; transition: background .15s, color .15s; position: relative; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.is-active { background: var(--jade-bright); color: var(--heading); font-weight: 600; }
.nav-link .nav-count { margin-left: auto; background: var(--papaya); color: #3A1206; font: 700 .7rem/1 var(--font-mono); padding: 4px 7px; border-radius: 999px; }
.nav-link.is-active .nav-count { background: var(--ink); color: #fff; }
.sidebar-foot { margin-top: auto; padding-top: 14px; }
.usage { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 14px 14px 14px 5px; padding: 12px; margin-bottom: 10px; font-size: .8rem; }
.usage strong { color: #fff; display: block; margin-bottom: 8px; font-size: .85rem; }
.usage-row { display: flex; justify-content: space-between; margin-top: 8px; }
.meter { height: 5px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; margin-top: 5px; }
.meter i { display: block; height: 100%; background: var(--jade-bright); border-radius: 99px; }
.meter.is-high i { background: var(--papaya); }
.meter-light { background: var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: #fff; width: 100%; background: none; border: 0; cursor: pointer; text-align: left; font: inherit; }
.user-chip:hover { background: rgba(255,255,255,.06); }
.user-chip small { display: block; color: #8FB0AC; font-size: .76rem; }
.user-chip .grow strong { display: block; font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .dropdown-menu { top: auto; bottom: calc(100% + 6px); left: 0; right: 0; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.page { padding: 28px 32px 48px; max-width: 1280px; width: 100%; margin: 0 auto; }
.page-narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 62ch; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--muted); font-weight: 500; } .breadcrumb a:hover { color: var(--heading); }
.banner { display: flex; align-items: center; gap: 12px; padding: 10px 32px; background: var(--butter); color: #5C4300; font-size: .9rem; font-weight: 500; flex-wrap: wrap; }
.banner a { color: #5C4300; text-decoration: underline; font-weight: 700; }
.banner-danger { background: var(--red-tint); color: #7E1D2B; } .banner-danger a { color: #7E1D2B; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.toolbar .search-input { flex: 1; min-width: 200px; max-width: 360px; }
.toolbar select { width: auto; min-width: 150px; }

/* ---------- Dashboard ---------- */
.stat { padding: 18px 20px; border-radius: var(--bubble); position: relative; overflow: hidden; }
.stat-label { font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.stat-value { font: 800 2.1rem/1.1 var(--font-display); color: var(--heading); margin-top: 10px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.stat-dark { background: var(--ink); border-color: var(--ink); }
.stat-dark .stat-label { color: #9DBDB8; } .stat-dark .stat-value { color: #fff; } .stat-dark .stat-sub { color: #9DBDB8; }
.hello { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; background: var(--ink); color: #D5E6E3; border-radius: 26px 26px 26px 8px; padding: 26px 30px; margin-bottom: 20px; position: relative; overflow: hidden; }
.hello h1 { color: #fff; font-size: 1.9rem; }
.hello p { margin-top: 8px; max-width: 54ch; }
.hello::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(31,207,154,.28), transparent 68%); pointer-events: none; }
.hello .btn { position: relative; z-index: 1; }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-list li { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
.setup-list li:last-child { border-bottom: 0; }
.setup-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #C2D2CF; display: grid; place-items: center; color: transparent; flex: none; }
.is-done .setup-check { background: var(--jade); border-color: var(--jade); color: #fff; }
.is-done .setup-title { color: var(--muted); text-decoration: line-through; }
.setup-title { font-weight: 600; color: var(--heading); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.bars-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars-pair { display: flex; align-items: flex-end; gap: 3px; height: 100%; width: 100%; justify-content: center; }
.bars-pair i { display: block; width: 42%; max-width: 16px; border-radius: 5px 5px 2px 2px; min-height: 3px; transition: height .5s var(--ease); }
.bars-pair .bar-in { background: var(--ink-3); } .bars-pair .bar-out { background: var(--jade-bright); }
.bars-col small { font-size: .7rem; color: var(--muted); font-family: var(--font-mono); }
.legend { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* Tick funnel: sent -> delivered -> read, drawn with WhatsApp's own ticks. */
.ticks { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.ticks-step { padding: 16px 18px; border-right: 1px solid var(--line-soft); position: relative; }
.ticks-step:last-child { border-right: 0; }
.ticks-step .tick-mark { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.ticks-step strong { display: block; font: 800 1.7rem/1.1 var(--font-display); color: var(--heading); margin-top: 8px; font-variant-numeric: tabular-nums; }
.ticks-step small { color: var(--muted); font-family: var(--font-mono); font-size: .76rem; }
.tick-sent .tick-mark .icon { color: #8A9B9E; } .tick-delivered .tick-mark .icon { color: var(--ink-3); }
.tick-read .tick-mark .icon { color: var(--blue); } .tick-failed .tick-mark .icon { color: var(--red); }
.tick-replied .tick-mark .icon { color: var(--papaya-dark); }
.progress { height: 8px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--jade); border-radius: 99px; transition: width .6s var(--ease); }

/* ---------- Inbox ---------- */
.inbox { display: grid; grid-template-columns: 330px minmax(0, 1fr) 300px; height: 100dvh; background: var(--surface); }
.inbox.no-panel { grid-template-columns: 330px minmax(0, 1fr); }
.conv-pane { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #FAFCFB; }
.conv-head { padding: 18px 16px 12px; display: grid; gap: 12px; }
.conv-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 600 .8rem var(--font-body); cursor: pointer; }
.chip:hover { color: var(--heading); border-color: #B9C8C5; }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.conv-list { overflow-y: auto; flex: 1; padding: 0 8px 12px; }
.conv-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; padding: 11px 10px; border-radius: 14px 14px 14px 5px; cursor: pointer; color: var(--text); align-items: center; width: 100%; border: 0; background: none; text-align: left; font: inherit; }
.conv-item:hover { background: #EEF4F2; color: var(--text); }
.conv-item.is-active { background: var(--jade-tint); }
.conv-item strong { display: block; font-weight: 600; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .93rem; }
.conv-item .conv-preview { display: block; color: var(--muted); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item.is-unread .conv-preview { color: var(--heading); font-weight: 600; }
.conv-meta { display: grid; justify-items: end; gap: 5px; font-size: .74rem; color: var(--muted); font-family: var(--font-mono); }
.unread-dot { background: var(--papaya); color: #3A1206; font: 700 .68rem/1 var(--font-mono); min-width: 19px; height: 19px; display: grid; place-items: center; border-radius: 99px; padding: 0 5px; }
.channel-dot { position: absolute; right: -4px; bottom: -4px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #FAFCFB; color: #fff; }
.channel-dot svg { width: 9px; height: 9px; stroke-width: 2.600; }
.channel-whatsapp { background: #1FAF70; } .channel-widget { background: var(--blue); } .channel-instagram { background: #D6338A; } .channel-messenger { background: #7B4DFF; }
.avatar-wrap { position: relative; display: inline-flex; }
.thread-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background:
  radial-gradient(circle at 20% 10%, rgba(31,207,154,.07), transparent 40%),
  radial-gradient(circle at 90% 90%, rgba(255,107,61,.05), transparent 40%), #F4F8F7; }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line); min-height: 64px; }
.thread-head h2 { font-size: 1.02rem; }
.thread-head small { color: var(--muted); font-family: var(--font-mono); font-size: .78rem; }
.thread-body { flex: 1; overflow-y: auto; padding: 22px 22px 10px; display: flex; flex-direction: column; gap: 6px; }
.day-sep { align-self: center; font: 600 .72rem var(--font-mono); color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 3px 10px; border-radius: 99px; margin: 10px 0; }
.msg { max-width: min(560px, 78%); padding: 9px 13px 7px; border-radius: var(--bubble); background: var(--surface); border: 1px solid var(--line); align-self: flex-start; box-shadow: var(--shadow-1); animation: msg-in .22s var(--ease); overflow-wrap: anywhere; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }
.msg-out { align-self: flex-end; background: var(--ink); border-color: var(--ink); color: #F1F8F6; border-radius: var(--bubble-out); }
.msg-out a { color: var(--jade-bright); }
.msg-note { align-self: flex-end; background: var(--butter); border-color: #EDD98F; color: #4A3800; border-radius: var(--bubble-out); }
.msg-system { align-self: center; background: none; border: 0; box-shadow: none; color: var(--muted); font-size: .8rem; text-align: center; }
.msg-body { white-space: pre-wrap; font-size: .95rem; line-height: 1.45; }
.msg-foot { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font: 500 .68rem var(--font-mono); opacity: .7; margin-top: 3px; }
.msg-foot .icon { width: 15px; height: 15px; }
.msg-foot .is-read { color: #6FB4FF; opacity: 1; }
.msg-failed { border-color: var(--red); }
.msg-error { color: #FFB3BD; font-size: .78rem; margin-top: 4px; }
.msg-label { font: 600 .68rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; opacity: .7; margin-bottom: 3px; display: flex; gap: 6px; align-items: center; }
.msg-media img { border-radius: 10px; max-height: 280px; display: block; margin-bottom: 6px; }
.msg-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(127,150,147,.16); color: inherit; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.msg-file:hover { color: inherit; background: rgba(127,150,147,.26); }
.composer { background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px 14px; }
.composer-modes { display: flex; gap: 4px; margin-bottom: 8px; }
.composer-modes button { background: none; border: 0; padding: 5px 10px; border-radius: 8px; font: 600 .8rem var(--font-body); color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.composer-modes button.is-active { background: var(--mist); color: var(--heading); }
.composer.is-note .composer-box { background: #FFF9E3; border-color: #EDD98F; }
.composer-box { display: flex; align-items: flex-end; gap: 8px; border: 1px solid #C9D6D3; border-radius: 16px 16px 5px 16px; padding: 6px 6px 6px 12px; transition: border-color .15s, box-shadow .15s; position: relative; }
.composer-box:focus-within { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(31,207,154,.25); }
.composer-box textarea { border: 0; box-shadow: none !important; min-height: 38px; max-height: 160px; padding: 8px 0; resize: none; background: transparent; }
.composer-attach { display: flex; align-items: center; gap: 8px; font-size: .84rem; margin-bottom: 8px; padding: 6px 10px; background: var(--mist); border-radius: 8px; }
.window-closed { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--amber-tint); border: 1px solid #EFDCA6; border-radius: var(--r); padding: 12px 14px; color: #6B470A; font-size: .9rem; }
.qr-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-2); max-height: 220px; overflow-y: auto; padding: 6px; z-index: 5; }
.qr-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; }
.qr-menu button:hover, .qr-menu button.is-active { background: var(--jade-tint); }
.qr-menu b { font-family: var(--font-mono); font-size: .8rem; color: var(--jade-dark); }
.qr-menu span { display: block; color: var(--muted); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-pane { border-left: 1px solid var(--line); overflow-y: auto; padding: 20px 18px; display: grid; gap: 20px; align-content: start; background: var(--surface); }
.side-pane h4 { font: 600 .72rem var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.side-profile { text-align: center; display: grid; justify-items: center; gap: 6px; }
.side-profile h3 { margin-top: 6px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.thread-empty { flex: 1; display: grid; place-items: center; }
.back-btn { display: none; }

.emoji-menu { position: absolute; left: 0; bottom: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-2); padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; z-index: 6; width: min(320px, 100%); }
.emoji-menu button { border: 0; background: none; font-size: 1.25rem; line-height: 1; padding: 6px; border-radius: 8px; cursor: pointer; }
.emoji-menu button:hover, .emoji-menu button:focus-visible { background: var(--mist); }
[data-emoji-toggle] { font-size: 1.2rem; }
.thread-find { display: flex; align-items: center; gap: 10px; padding: 8px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.thread-find input { max-width: 320px; min-height: 36px; }
.bulk-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; background: var(--jade-tint); border-radius: 12px; }
.conv-item.is-picked { background: var(--jade-tint); box-shadow: inset 3px 0 0 var(--jade); }

/* ---------- Phone preview (templates) ---------- */
.phone { background: #E6DFD3; background-image: radial-gradient(rgba(15,46,51,.05) 1px, transparent 1px); background-size: 14px 14px; border-radius: 28px; padding: 22px 16px; border: 8px solid var(--ink); min-height: 320px; position: sticky; top: 20px; }
.phone-bubble { background: #fff; border-radius: 4px 14px 14px 14px; padding: 8px 10px 6px; box-shadow: 0 1px 1px rgba(0,0,0,.12); max-width: 92%; font-size: .9rem; overflow-wrap: anywhere; }
.phone-header { font-weight: 700; margin-bottom: 4px; }
.phone-media { background: #D7DEDC; color: var(--muted); border-radius: 8px; height: 110px; display: grid; place-items: center; margin-bottom: 6px; }
.phone-body { white-space: pre-wrap; }
.phone-footer { color: #7A8A8D; font-size: .78rem; margin-top: 4px; }
.phone-time { text-align: right; font-size: .66rem; color: #8A9B9E; font-family: var(--font-mono); }
.phone-buttons { display: grid; gap: 4px; margin-top: 4px; max-width: 92%; }
.phone-buttons span { background: #fff; border-radius: 10px; text-align: center; padding: 8px; color: #1B74E4; font-weight: 600; font-size: .86rem; box-shadow: 0 1px 1px rgba(0,0,0,.1); }
.var-pill { background: var(--jade-tint); color: var(--jade-dark); border-radius: 5px; padding: 0 4px; font-family: var(--font-mono); font-size: .82em; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 22px 22px 22px 7px; padding: 24px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.plan.is-featured { background: var(--ink); border-color: var(--ink); color: #CFE2DF; box-shadow: var(--shadow-2); }
.plan.is-featured h3, .plan.is-featured .plan-price { color: #fff; }
.plan.is-featured .plan-list .icon { color: var(--jade-bright); }
.plan.is-current { outline: 3px solid var(--jade-bright); outline-offset: 2px; }
.plan-price { font: 800 2.3rem/1 var(--font-display); color: var(--heading); letter-spacing: -.03em; }
.plan-price small { font: 500 .9rem var(--font-body); color: inherit; opacity: .7; letter-spacing: 0; }
.plan-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; flex: 1; align-content: start; }
.plan-list li { display: flex; gap: 9px; align-items: flex-start; }
.plan-list .icon { color: var(--jade); margin-top: 3px; }
.plan-flag { position: absolute; top: -11px; right: 18px; background: var(--papaya); color: #3A1206; font: 700 .72rem var(--font-body); padding: 4px 10px; border-radius: 99px; }

/* ---------- Auth & installer ---------- */
.auth-body { background: var(--ink); min-height: 100dvh; }
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100dvh; }
.auth-art { padding: 44px 52px; display: flex; flex-direction: column; color: #C5D8D5; position: relative; overflow: hidden; }
.auth-art::before { content: ""; position: absolute; left: -120px; bottom: -160px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(31,207,154,.22), transparent 65%); }
.auth-art h1 { color: #fff; font-size: clamp(2rem, 3.6vw, 3.1rem); font-weight: 800; letter-spacing: -.035em; max-width: 14ch; margin-top: clamp(28px, 5vh, 56px); position: relative; }
.auth-art h1 em { font-style: normal; color: var(--jade-bright); }
.auth-art > p { margin-top: 16px; max-width: 44ch; position: relative; }
.auth-chat { display: grid; gap: 10px; margin: auto 0 0; position: relative; max-width: 380px; min-height: 250px; align-content: end; transition: opacity .45s ease; }
.auth-chat.is-fading { opacity: 0; }
.auth-chat.is-live .msg { animation-delay: 0s; }
.auth-chat.is-live .auth-typing { animation: auth-msg .3s var(--ease) backwards; }
.auth-chat .auth-typing.is-me { justify-self: end; background: rgba(31, 207, 154, .28); border-radius: var(--bubble-out); }
.auth-chat .msg-note { background: var(--butter); color: #4A3800; }
.auth-chat .msg-label { color: inherit; }
.auth-tag { justify-self: center; font: 600 .72rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: #9DBDB8; border: 1px solid rgba(255,255,255,.14); padding: 4px 10px; border-radius: 99px; animation: auth-msg .4s var(--ease) backwards; }
.auth-chat .msg { max-width: 86%; border: 0; animation: auth-msg .55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * .9s + .35s); }
.auth-chat .lp-typing, .auth-typing { display: inline-flex; gap: 4px; align-items: center; padding: 11px 14px; background: rgba(255,255,255,.1); border-radius: var(--bubble); justify-self: start; animation: auth-msg .4s var(--ease) backwards, auth-typing-out .3s ease forwards; animation-delay: 1.5s, 2.9s; }
.auth-typing i { width: 6px; height: 6px; border-radius: 50%; background: #C5D8D5; animation: auth-dot 1.1s infinite ease-in-out; }
.auth-typing i:nth-child(2) { animation-delay: .15s; } .auth-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes auth-msg { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes auth-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes auth-typing-out { to { opacity: 0; height: 0; padding-block: 0; margin-top: -10px; } }
.auth-chat .msg-in { background: rgba(255,255,255,.1); color: #fff; }
.auth-chat .msg-out { background: var(--jade-bright); color: var(--heading); }
.auth-panel { background: var(--mist); display: grid; place-items: center; padding: 40px 24px; border-radius: 34px 0 0 34px; }
.auth-card { width: min(420px, 100%); }
.auth-card h2 { font-size: 1.7rem; }
.auth-card .lead { color: var(--muted); margin: 8px 0 24px; }
.auth-alt { margin-top: 20px; color: var(--muted); font-size: .92rem; }
.auth-mobile-brand { display: none; margin-bottom: 28px; }
.installer { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: 100dvh; }
.installer-rail { padding: 40px 34px; color: #C5D8D5; display: flex; flex-direction: column; }
.installer-rail h1 { color: #fff; font-size: 1.7rem; margin: 44px 0 30px; }
.installer-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.installer-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px 12px 12px 4px; color: #86A6A2; font-weight: 500; }
.installer-steps li.is-current { background: rgba(255,255,255,.08); color: #fff; }
.installer-steps li.is-done { color: #C5D8D5; }
.installer-dot { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font: 600 .78rem var(--font-mono); flex: none; }
.is-done .installer-dot { background: var(--jade-bright); border-color: var(--jade-bright); color: var(--heading); }
.is-current .installer-dot { background: #fff; border-color: #fff; color: var(--heading); }
.installer-foot { margin-top: auto; font: 400 .78rem var(--font-mono); color: #6F8F8C; }
.installer-main { background: var(--mist); padding: 56px clamp(24px, 6vw, 80px); border-radius: 34px 0 0 34px; }
.installer-main > * { max-width: 640px; }
.installer-main h2 { font-size: 1.8rem; }
.lead { color: var(--muted); margin: 8px 0 24px; font-size: 1.02rem; }
.checklist { list-style: none; padding: 0; margin: 0 0 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.checklist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.checklist li:last-child { border-bottom: 0; }
.checklist-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--jade); }
.is-bad .checklist-mark { background: var(--red); }
.checklist-label { font-weight: 600; color: var(--heading); }
.checklist-hint { color: var(--muted); font-size: .82rem; font-family: var(--font-mono); text-align: right; }
.is-bad .checklist-hint { color: var(--red); }

/* ---------- Error page ---------- */
.error-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; text-align: center; }
.error-page .code { font: 800 clamp(5rem, 18vw, 9rem)/1 var(--font-display); color: var(--heading); letter-spacing: -.05em; }
.error-page .code span { color: var(--jade); }

/* ---------- Marketing site ---------- */
.site { background: var(--mist); }
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(20px, 5vw, 64px); position: sticky; top: 0; z-index: 30; background: rgba(241,245,244,.86); backdrop-filter: blur(10px); }
.site-nav nav { display: flex; align-items: center; gap: 22px; }
.site-nav nav a:not(.btn) { color: var(--heading); font-weight: 500; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(36px, 7vw, 90px) clamp(20px, 5vw, 64px); max-width: 1320px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; }
.hero h1 em { font-style: normal; background: var(--jade-bright); padding: 0 .18em; border-radius: .3em .3em .3em .08em; display: inline-block; transform: rotate(-1.500deg); }
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 50ch; margin: 22px 0 28px; }
.hero-note { font-size: .86rem; color: var(--muted); margin-top: 14px; }
.hero-stage { background: var(--ink); border-radius: 36px 36px 36px 10px; padding: 26px; display: grid; gap: 10px; position: relative; box-shadow: var(--shadow-3); min-height: 420px; align-content: end; }
.hero-stage .msg { animation: none; border: 0; opacity: 0; animation: hero-msg .5s var(--ease) forwards; }
.hero-stage .msg:nth-child(1) { animation-delay: .25s; } .hero-stage .msg:nth-child(2) { animation-delay: 1.1s; }
.hero-stage .msg:nth-child(3) { animation-delay: 2s; } .hero-stage .msg:nth-child(4) { animation-delay: 2.900s; } .hero-stage .msg:nth-child(5) { animation-delay: 3.700s; }
@keyframes hero-msg { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.hero-stage .msg-in { background: rgba(255,255,255,.1); color: #fff; }
.hero-stage .msg-out { background: var(--jade-bright); color: var(--heading); }
.hero-stage .msg-out .msg-foot .is-read { color: #0B5FD6; }
.hero-stage .msg-note { background: var(--butter); }
.section { padding: clamp(40px, 7vw, 88px) clamp(20px, 5vw, 64px); max-width: 1320px; margin: 0 auto; }
.section-head { max-width: 640px; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 800; letter-spacing: -.035em; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin-top: 12px; }
.features { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 22px 22px 22px 7px; padding: 24px; grid-column: span 2; display: grid; gap: 10px; align-content: start; }
.feature.is-wide { grid-column: span 3; } .feature.is-dark { background: var(--ink); border-color: var(--ink); color: #C5D8D5; } .feature.is-dark h3 { color: #fff; }
.feature.is-jade { background: var(--jade-bright); border-color: var(--jade-bright); color: var(--heading); }
.feature-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px 13px 13px 4px; background: var(--jade-tint); color: var(--jade-dark); }
.is-dark .feature-icon { background: rgba(255,255,255,.1); color: var(--jade-bright); } .is-jade .feature-icon { background: var(--ink); color: var(--jade-bright); }
.feature p { font-size: .95rem; }
.feature:not(.is-dark):not(.is-jade) p { color: var(--muted); }
.cta-band { background: var(--ink); color: #C5D8D5; border-radius: 36px 36px 36px 10px; padding: clamp(32px, 6vw, 64px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; max-width: 18ch; }
.site-foot { padding: 28px clamp(20px, 5vw, 64px) 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }

/* ---------- Charts ---------- */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart-tick { font: 400 11px var(--font-mono); fill: var(--muted); }
.chart-label { font: 600 12px var(--font-body); fill: var(--text); }
.chart-tip { position: absolute; top: 6px; background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 12px; font-size: .82rem; display: grid; gap: 3px; pointer-events: none; min-width: 140px; box-shadow: var(--shadow-2); }
.chart-tip span { display: flex; align-items: center; gap: 6px; } .chart-tip b { margin-left: auto; font-family: var(--font-mono); }
.chart-tip i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.chart-table { margin-top: 12px; } .chart-table summary { cursor: pointer; color: var(--jade); font-weight: 600; font-size: .88rem; }
.hbar { height: 10px; background: var(--line-soft); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.hbar i { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 4px; }
.segmented a { color: inherit; } .segmented a span.is-on { background: var(--surface); color: var(--heading); box-shadow: var(--shadow-1); }

/* ---------- Flow builder ---------- */
.flow { display: flex; flex-direction: column; height: 100dvh; background: var(--surface); }
.flow-bar { display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.flow-name { border: 1px solid transparent !important; font: 700 1.1rem var(--font-display) !important; color: var(--heading); max-width: 340px; min-height: 38px !important; padding: 4px 8px !important; background: transparent !important; }
.flow-name:hover { border-color: var(--line) !important; }
.flow-body { flex: 1; display: grid; grid-template-columns: 220px minmax(0, 1fr) 320px; min-height: 0; }
.flow-palette { border-right: 1px solid var(--line); padding: 16px 12px; overflow-y: auto; background: #FAFCFB; }
.flow-palette h4, .flow-panel h4 { font: 600 .72rem var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 4px 10px; }
.flow-palette button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px 12px 12px 4px; cursor: pointer; text-align: left; font: inherit; margin-bottom: 8px; color: var(--heading); transition: border-color .15s, transform .12s; }
.flow-palette button:hover { border-color: var(--jade); transform: translateX(2px); }
.flow-palette b { display: block; font-size: .88rem; } .flow-palette small { color: var(--muted); font-size: .76rem; }
.flow-canvas { overflow: auto; background-color: var(--mist); background-image: radial-gradient(rgba(15,46,51,.13) 1px, transparent 1px); background-size: 22px 22px; position: relative; }
.flow-stage { position: relative; min-width: 100%; min-height: 100%; }
.flow-edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.flow-edges path { fill: none; stroke: var(--ink-3); stroke-width: 2.2; pointer-events: stroke; cursor: pointer; }
.flow-edges path:hover { stroke: var(--red); stroke-width: 3; }
.flow-edges path.is-temp { stroke: var(--jade); stroke-dasharray: 6 5; pointer-events: none; }
.flow-node { position: absolute; width: 250px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px 16px 16px 5px; box-shadow: var(--shadow-1); cursor: grab; user-select: none; touch-action: none; }
.flow-node:active { cursor: grabbing; }
.flow-node.is-selected { border-color: var(--jade); box-shadow: 0 0 0 4px rgba(31,207,154,.25), var(--shadow-2); }
.flow-node-head { font: 600 .72rem var(--font-body); letter-spacing: .06em; text-transform: uppercase; padding: 8px 12px; border-radius: 14px 14px 0 0; background: var(--mist); color: var(--muted); }
.flow-start .flow-node-head { background: var(--ink); color: #fff; } .flow-buttons .flow-node-head { background: var(--blue-tint); color: #1B4C91; }
.flow-question .flow-node-head { background: var(--amber-tint); color: #6B470A; } .flow-tag .flow-node-head { background: #EFE6FB; color: #54298F; }
.flow-handoff .flow-node-head { background: var(--papaya-tint); color: #8F2F10; } .flow-message .flow-node-head { background: var(--jade-tint); color: #075F47; }
.flow-node-body { padding: 10px 12px; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 120px; overflow: hidden; }
.flow-port-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0 6px 12px; border-top: 1px solid var(--line-soft); font-size: .8rem; font-weight: 600; }
.flow-port { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--ink-3); margin-right: -9px; cursor: crosshair; flex: none; transition: transform .12s, background .12s; }
.flow-port:hover { transform: scale(1.35); background: var(--jade-bright); }
.flow-port.is-linked { background: var(--ink-3); }
.flow-panel { border-left: 1px solid var(--line); padding: 18px 16px; overflow-y: auto; }
.flow-panel label { display: grid; gap: 6px; }

/* ---------- Dark theme (app and admin only; chosen from the user menu) ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --heading: #EAF3F1; --text: #D3E2DF; --muted: #93A9A6;
  --mist: #0A2024; --surface: #11292E; --line: #254A50; --line-soft: #1B3A40;
  --jade: #2BB98D; --jade-dark: #5FD6AF; --jade-tint: #133F37; --papaya-tint: #4A2416; --blue-tint: #172F57; --red-tint: #4A1C24; --amber-tint: #40320F; --butter: #453B12;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 12px 30px -12px rgba(0,0,0,.7); --shadow-3: 0 30px 70px -20px rgba(0,0,0,.8);
}
html[data-theme="dark"] .sidebar { border-right: 1px solid var(--line-soft); }
html[data-theme="dark"] .btn-primary { background: #0E8C6A; color: #fff; }
html[data-theme="dark"] .btn-primary:hover { background: #10A07A; color: #fff; }
html[data-theme="dark"] .btn-dark, html[data-theme="dark"] .toast, html[data-theme="dark"] .chip.is-active, html[data-theme="dark"] .badge-dark { background: var(--ink-3); border-color: var(--ink-3); color: #fff; }
html[data-theme="dark"] .btn-ghost:hover { background: #17363C; border-color: #3A666D; }
html[data-theme="dark"] .btn-soft { color: #9BE5C8; } html[data-theme="dark"] .btn-soft:hover { background: #18503F; color: #C3F2DE; }
html[data-theme="dark"] .btn-danger { color: #FF9AA8; border-color: #6B2A35; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea, html[data-theme="dark"] .composer-box { border-color: #2F555C; }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #6F8A87; }
html[data-theme="dark"] code { background: #0A2024; }
html[data-theme="dark"] .table th, html[data-theme="dark"] .conv-pane, html[data-theme="dark"] .flow-palette { background: #0E252A; }
html[data-theme="dark"] .table tbody tr:hover, html[data-theme="dark"] .conv-item:hover, html[data-theme="dark"] .dropdown-menu a:hover, html[data-theme="dark"] .dropdown-menu button:hover { background: #17363C; }
html[data-theme="dark"] .thread-pane, html[data-theme="dark"] [data-try-log] { background: #0C2327 !important; }
html[data-theme="dark"] .msg-out { background: #1B5A50; border-color: #1B5A50; }
html[data-theme="dark"] .msg-note { color: #F1E3A6; border-color: #6A5A1C; } html[data-theme="dark"] .composer.is-note .composer-box { background: #2E2A12; }
html[data-theme="dark"] .alert-success { color: #B5EBD6; border-color: #1F5A4B; } html[data-theme="dark"] .alert-danger, html[data-theme="dark"] .banner-danger { color: #FFC2CA; border-color: #6B2A35; }
html[data-theme="dark"] .alert-info { color: #BBD5FF; border-color: #26467C; } html[data-theme="dark"] .alert-warn, html[data-theme="dark"] .window-closed { color: #F2DC9A; border-color: #6A5416; }
html[data-theme="dark"] .banner { color: #F2DC9A; } html[data-theme="dark"] .banner a, html[data-theme="dark"] .banner-danger a { color: inherit; }
html[data-theme="dark"] .badge { background: #17363C; }
html[data-theme="dark"] .badge-green { background: var(--jade-tint); color: #9BE5C8; border-color: #1F5A4B; } html[data-theme="dark"] .badge-amber { background: var(--amber-tint); color: #F2DC9A; border-color: #6A5416; }
html[data-theme="dark"] .badge-red { background: var(--red-tint); color: #FFB3BD; border-color: #6B2A35; } html[data-theme="dark"] .badge-blue { background: var(--blue-tint); color: #A9CBFF; border-color: #26467C; }
html[data-theme="dark"] .badge-papaya { background: var(--papaya-tint); color: #FFC0A8; border-color: #7A3A22; }
html[data-theme="dark"] .var-pill, html[data-theme="dark"] .empty-art, html[data-theme="dark"] .feature-icon, html[data-theme="dark"] .qr-menu b { color: #9BE5C8; }
html[data-theme="dark"] .nav-link.is-active, html[data-theme="dark"] .installer-dot { color: var(--ink); }
html[data-theme="dark"] .stat-dark, html[data-theme="dark"] .hello, html[data-theme="dark"] .plan.is-featured { border: 1px solid var(--line); }
html[data-theme="dark"] .phone-bubble, html[data-theme="dark"] .phone-buttons span { color: #132A2E; } html[data-theme="dark"] .phone .var-pill { color: #086349; background: #DFF5EC; }
html[data-theme="dark"] .flow-node-head { color: #D3E2DF; } html[data-theme="dark"] .flow-edges path { stroke: #6F9A96; }
html[data-theme="dark"] .chart svg line:not([data-cross]) { stroke: #254A50; } html[data-theme="dark"] .chart svg [data-cross] { stroke: #EAF3F1; }
html[data-theme="dark"] .channel-dot { border-color: #0E252A; }
html[data-theme="dark"] .error-page .code { color: var(--heading); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .inbox { grid-template-columns: 300px minmax(0, 1fr); }
  .inbox .side-pane { display: none; }
  .inbox.show-panel .side-pane { display: grid; position: fixed; right: 0; top: 0; bottom: 0; width: min(320px, 100vw); z-index: 60; box-shadow: var(--shadow-3); }
  .grid-side { grid-template-columns: minmax(0, 1fr); }
  .phone { position: static; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: 264px; transform: translateX(-102%); transition: transform .26s var(--ease); }
  .shell.nav-open .sidebar { transform: none; box-shadow: var(--shadow-3); }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(15,46,51,.5); z-index: 45; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 40; }
  .topbar .btn-icon { background: rgba(255,255,255,.08); color: #fff; border: 0; }
  .page { padding: 20px 16px 40px; }
  .banner { padding: 10px 16px; }
  .inbox { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 58px); }
  .flow { height: auto; min-height: calc(100dvh - 58px); }
  .flow-body { grid-template-columns: minmax(0, 1fr); }
  .flow-canvas { height: 60dvh; }
  .flow-palette { display: flex; gap: 8px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .flow-palette h4, .flow-palette .hint { display: none; }
  .flow-palette button { min-width: 170px; margin: 0; }
  .flow-panel { border-left: 0; border-top: 1px solid var(--line); }
  .inbox .thread-pane { display: none; }
  .inbox.has-thread .conv-pane { display: none; }
  .inbox.has-thread .thread-pane { display: flex; }
  .back-btn { display: inline-flex; }
  .auth, .installer { grid-template-columns: minmax(0, 1fr); }
  .auth-art, .installer-rail h1, .installer-foot { display: none; }
  .installer-rail { padding: 20px; }
  .installer-steps { grid-auto-flow: column; overflow-x: auto; margin-top: 16px; }
  .installer-steps li { white-space: nowrap; padding: 6px 10px; }
  .auth-panel, .installer-main { border-radius: 26px 26px 0 0; }
  .installer-main { padding: 32px 20px; }
  .auth-mobile-brand { display: inline-flex; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: minmax(0, 1fr); }
  .feature, .feature.is-wide { grid-column: auto; }
  .site-nav nav a:not(.btn) { display: none; }
  .hello { grid-template-columns: minmax(0, 1fr); }
  input, select, textarea { font-size: 16px !important; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 10px; }
  .checklist li { grid-template-columns: auto minmax(0, 1fr); } .checklist-hint { grid-column: 2; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero-stage .msg { opacity: 1; }
}

/* ---------- Sign-in and register: redesigned ---------- */
@property --auth-spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.auth-art { padding: 36px clamp(28px, 4vw, 56px) 44px; gap: clamp(16px, 3vh, 32px); isolation: isolate; }
.auth-art::before { display: none; }
.auth-aura { position: absolute; inset: 0; z-index: -1; overflow: hidden; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 26px 26px; }
.auth-aura i { position: absolute; border-radius: 50%; filter: blur(70px); }
.auth-aura i:nth-child(1) { width: 460px; height: 460px; left: -140px; bottom: -160px; background: rgba(31, 207, 154, .34); }
.auth-aura i:nth-child(2) { width: 380px; height: 380px; right: -120px; top: -100px; background: rgba(255, 107, 61, .2); }
.auth-aura i:nth-child(3) { width: 300px; height: 300px; left: 38%; top: 34%; background: rgba(47, 127, 240, .16); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .16); color: #C5D8D5; font-weight: 600; font-size: .86rem; transition: background .2s, color .2s, border-color .2s; }
.auth-back .icon { transform: rotate(180deg); transition: transform .2s var(--ease); }
.auth-back:hover { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .3); } .auth-back:hover .icon { transform: rotate(180deg) translateX(3px); }
.auth-stage { position: relative; margin: auto 0; width: min(440px, 100%); align-self: center; }
.auth-device { padding: 2px; border-radius: 30px 30px 30px 10px; background: conic-gradient(from var(--auth-spin), rgba(31, 207, 154, .95), rgba(255, 255, 255, .06) 26%, rgba(255, 107, 61, .75) 52%, rgba(255, 255, 255, .06) 78%, rgba(31, 207, 154, .95)); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); }
.auth-device-in { background: #0B2327; border-radius: 28px 28px 28px 8px; padding: 14px 18px 20px; }
.auth-device-bar { display: flex; align-items: center; gap: 6px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .09); font-size: .8rem; color: #9DBDB8; }
.auth-device-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.auth-device-bar span { margin-left: 8px; font-weight: 600; color: #fff; }
.auth-device-bar em { margin-left: auto; font-style: normal; font-weight: 700; font-size: .72rem; color: var(--jade-bright); display: inline-flex; align-items: center; gap: 6px; }
.auth-device-bar em::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--jade-bright); }
.auth-stage .auth-chat { margin: 0; max-width: none; height: clamp(170px, 25vh, 270px); min-height: 0; overflow: hidden; }
.auth-chip { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 16px 16px 16px 5px; background: #fff; color: #55696D; font-size: .8rem; line-height: 1.3; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); }
.auth-chip b { display: block; color: var(--ink); font-size: .9rem; }
.auth-chip span { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px 10px 10px 3px; background: var(--jade-tint); color: var(--jade-dark); }
.auth-chip-a { right: -44px; top: 64px; } .auth-chip-b { left: -26px; bottom: -22px; } .auth-chip-b span { background: #FFE6DC; color: #B8401A; }
.auth-copy { position: relative; }
.auth-art .auth-copy h1 { margin-top: 0; max-width: 16ch; font-size: clamp(1.9rem, 3.2vw, 2.8rem); }
.auth-art h1 em { background: linear-gradient(100deg, var(--jade-bright), #9BF0D2 60%, var(--jade-bright)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-copy > p { margin-top: 14px; max-width: 44ch; }
.auth-channels, .auth-points, .auth-trust { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.auth-channels li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 99px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); color: #E3EEEC; font-size: .84rem; font-weight: 600; }
.auth-points { flex-direction: column; gap: 10px; } .auth-points li { display: flex; align-items: center; gap: 10px; color: #E3EEEC; }
.auth-points .icon { flex: none; width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: rgba(31, 207, 154, .2); color: var(--jade-bright); }
.auth-panel { position: relative; overflow: hidden; background: radial-gradient(700px 420px at 100% 0%, rgba(31, 207, 154, .16), transparent 60%), radial-gradient(520px 380px at 0% 100%, rgba(255, 107, 61, .08), transparent 60%), var(--mist); padding: 84px 24px 40px; }
.auth-corner { position: absolute; top: 24px; right: 28px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; }
.auth-corner .btn { min-height: 40px; padding: 0 14px; background: var(--surface); }
.auth-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 28px 28px 28px 9px; padding: clamp(24px, 3.4vw, 38px); box-shadow: 0 30px 70px -40px rgba(15, 46, 51, .45), var(--shadow-1); }
.auth-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; margin-bottom: 14px; border-radius: 9px 9px 9px 3px; background: var(--jade-tint); color: var(--jade-dark); font: 700 .72rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.auth-card h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); letter-spacing: -.03em; }
.auth-input { position: relative; }
.auth-input > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8A9B9E; pointer-events: none; transition: color .2s, transform .2s var(--ease); }
.auth-input input { padding-left: 44px; min-height: 50px; border-radius: 14px; }
.auth-input:focus-within > .icon { color: var(--jade); transform: translateY(-50%) scale(1.1); }
.auth-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; border-radius: 12px; color: #6B7F83; cursor: pointer; }
.auth-eye:hover { color: var(--ink); background: var(--mist); } .auth-eye:focus-visible { outline: 3px solid rgba(31, 207, 154, .5); }
.auth-eye::after { content: ""; position: absolute; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(-45deg) scaleX(0); transition: transform .2s var(--ease); }
.auth-eye[aria-pressed="true"]::after { transform: rotate(-45deg) scaleX(1); }
.auth-input:has(.auth-eye) input { padding-right: 52px; }
.auth-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; align-items: center; }
.auth-meter i { height: 4px; border-radius: 4px; background: var(--line); transition: background .25s; }
.auth-meter span { grid-column: 1 / -1; font-size: .82rem; color: var(--muted); }
.auth-meter[data-score="1"] i:nth-child(-n+1) { background: #E0703A; } .auth-meter[data-score="2"] i:nth-child(-n+2) { background: #D9A514; }
.auth-meter[data-score="3"] i:nth-child(-n+3) { background: #3FB58E; } .auth-meter[data-score="4"] i:nth-child(-n+4) { background: var(--jade); }
.auth-plans { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.auth-plans label { cursor: pointer; }
.auth-plans input { position: absolute; opacity: 0; pointer-events: none; }
.auth-plans span { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: center; height: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 16px 16px 16px 5px; background: var(--surface); transition: border-color .2s, background .2s, transform .2s var(--ease), box-shadow .2s; }
.auth-plans .icon { grid-row: span 2; width: 34px; height: 34px; padding: 8px; border-radius: 11px 11px 11px 4px; background: var(--mist); color: var(--muted); transition: background .2s, color .2s; }
.auth-plans b { color: var(--ink); font-size: .92rem; } .auth-plans small { color: var(--muted); font-size: .78rem; line-height: 1.3; }
.auth-plans label:hover span { border-color: #A9BCB8; transform: translateY(-1px); }
.auth-plans input:checked + span { border-color: var(--jade); background: var(--jade-tint); box-shadow: 0 0 0 3px rgba(31, 207, 154, .18); }
.auth-plans input:checked + span .icon { background: var(--jade); color: #fff; }
.auth-plans input:focus-visible + span { outline: 3px solid rgba(31, 207, 154, .5); outline-offset: 2px; }
.auth-submit { min-height: 52px; border-radius: 14px; position: relative; overflow: hidden; }
.auth-submit .icon { transition: transform .2s var(--ease); } .auth-submit:hover .icon { transform: translateX(4px); }
.auth-submit::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); }
.auth-submit.is-busy { pointer-events: none; opacity: .85; } .auth-submit.is-busy .icon { display: none; }
.auth-trust { margin-top: 2px; justify-content: center; gap: 6px 16px; } .auth-trust li { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .82rem; } .auth-trust .icon { color: var(--jade); }
.auth-alt { text-align: center; }
@keyframes auth-spin { to { --auth-spin: 360deg; } }
@keyframes auth-drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, -30px) scale(1.12); } }
@keyframes auth-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes auth-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes auth-shine { to { background-position: -200% 0; } }
@keyframes auth-sweep { to { transform: translateX(120%); } }
@keyframes auth-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 207, 154, .6); } 60% { box-shadow: 0 0 0 6px rgba(31, 207, 154, 0); } }
@media (prefers-reduced-motion: no-preference) {
  .auth-device { animation: auth-spin 9s linear infinite; }
  .auth-aura i { animation: auth-drift 13s ease-in-out infinite; } .auth-aura i:nth-child(2) { animation-duration: 17s; animation-direction: reverse; } .auth-aura i:nth-child(3) { animation-duration: 21s; }
  .auth-chip { animation: auth-rise .6s var(--ease) .9s backwards, auth-bob 6s ease-in-out 1.5s infinite; } .auth-chip-b { animation-delay: 1.3s, 3.5s; }
  .auth-stage { animation: auth-rise .7s var(--ease) .1s backwards; }
  .auth-copy > * { animation: auth-rise .6s var(--ease) backwards; } .auth-copy > :nth-child(1) { animation-delay: .25s; } .auth-copy > :nth-child(2) { animation-delay: .35s; } .auth-copy > :nth-child(3) { animation-delay: .45s; }
  .auth-points li, .auth-channels li { animation: auth-rise .5s var(--ease) backwards; animation-delay: calc(.5s + var(--n, 0) * 90ms); }
  .auth-points li:nth-child(2), .auth-channels li:nth-child(2) { --n: 1; } .auth-points li:nth-child(3), .auth-channels li:nth-child(3) { --n: 2; } .auth-channels li:nth-child(4) { --n: 3; }
  .auth-art h1 em { animation: auth-shine 5s linear infinite; }
  .auth-device-bar em::before { animation: auth-pulse 1.8s infinite; }
  .auth-card { animation: auth-rise .6s var(--ease) backwards; }
  .auth-card > *, .auth-card form > * { animation: auth-rise .5s var(--ease) backwards; animation-delay: calc(.12s + var(--k, 0) * 60ms); }
  .auth-card > :nth-child(2), .auth-card form > :nth-child(4) { --k: 1; } .auth-card > :nth-child(3), .auth-card form > :nth-child(5) { --k: 2; } .auth-card > :nth-child(4), .auth-card form > :nth-child(6) { --k: 3; }
  .auth-card > :nth-child(5), .auth-card form > :nth-child(7) { --k: 4; } .auth-card > :nth-child(6), .auth-card form > :nth-child(8) { --k: 5; } .auth-card > :nth-child(n+7), .auth-card form > :nth-child(n+9) { --k: 6; }
  .auth-submit:hover::before { animation: auth-sweep .8s ease-out; }
}
@media (max-height: 780px) { .auth-chip { display: none; } .auth-copy > p { display: none; } }
@media (max-width: 1240px) { .auth-chip-a { right: -10px; top: -24px; } .auth-chip-b { left: -8px; } .auth-device-bar em { margin-left: 10px; } }
@media (max-width: 860px) {
  .auth-panel { padding: 76px 16px 32px; border-radius: 0; min-height: 100dvh; align-content: start; }
  .auth-corner { right: 16px; top: 18px; } .auth-corner span { display: none; }
  .auth-mobile-brand { position: absolute; top: 22px; left: 18px; margin: 0; }
  .auth-plans { grid-template-columns: minmax(0, 1fr); }
}
html[data-theme="dark"] .auth-chip { background: #fff; }

/* ---------- Sign-in and register forms, second pass: floating labels, two-step register ---------- */
.auth-card { width: min(480px, 100%); border: 0; border-radius: 34px 34px 34px 10px; padding: clamp(26px, 3.6vw, 42px); position: relative; box-shadow: 0 40px 90px -46px rgba(15, 46, 51, .55), 0 2px 6px rgba(15, 46, 51, .05); }
.auth-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--auth-spin), rgba(31, 207, 154, .9), rgba(220, 229, 227, .7) 22%, rgba(255, 107, 61, .55) 50%, rgba(220, 229, 227, .7) 78%, rgba(31, 207, 154, .9)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.auth-hello { display: flex; align-items: center; gap: 16px; }
.auth-mark { flex: none; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 20px 20px 20px 7px; background: linear-gradient(140deg, #0F2E33, #17494F); box-shadow: 0 14px 28px -14px rgba(15, 46, 51, .7); }
.auth-mark .logo-mark { width: 34px; height: 34px; }
.auth-greet { display: block; font: 700 .76rem var(--font-body); letter-spacing: .09em; text-transform: uppercase; color: var(--jade-dark); margin-bottom: 4px; }
.auth-card .auth-hello h2 { font-size: clamp(1.5rem, 2.4vw, 1.85rem); line-height: 1.12; }
.auth-card .lead { margin: 16px 0 22px; }
.fl { position: relative; }
.fl > .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #7A8D90; pointer-events: none; transition: color .2s, transform .25s var(--ease); z-index: 1; }
.fl input { width: 100%; height: 62px; padding: 24px 18px 8px 52px; border: 1.5px solid transparent; border-radius: 18px 18px 18px 6px; background: var(--mist); font-size: 1rem; color: var(--ink); transition: background .2s, border-color .2s, box-shadow .2s; }
.fl input:hover { border-color: #C9D6D3; }
.fl input:focus { background: var(--surface); border-color: var(--jade); box-shadow: 0 0 0 4px rgba(31, 207, 154, .2); outline: none; }
.fl label { position: absolute; left: 52px; top: 50%; transform: translateY(-50%); transform-origin: left center; color: #55696D; font-size: 1rem; font-weight: 500; pointer-events: none; transition: transform .2s var(--ease), color .2s; margin: 0; }
.fl input:focus ~ label, .fl input:not(:placeholder-shown) ~ label, .fl input:-webkit-autofill ~ label { transform: translateY(-21px) scale(.76); color: var(--jade-dark); font-weight: 700; }
.fl:focus-within > .icon { color: var(--jade); transform: translateY(-50%) scale(1.12) rotate(-6deg); }
.fl:has(.auth-eye) input { padding-right: 58px; }
.fl .auth-eye { right: 8px; }
.field:has(.field-error) .fl input { border-color: var(--red, #C9364A); background: #FFF6F7; }
.auth-forgot { display: block; text-align: right; margin-top: 10px; font-size: .88rem; font-weight: 600; }
.auth-go { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 62px; padding: 7px 7px 7px 24px; border: 0; border-radius: 20px 20px 20px 7px; background: var(--ink); color: #fff; font: 700 1.05rem var(--font-body); cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; box-shadow: 0 18px 34px -18px rgba(15, 46, 51, .8); isolation: isolate; }
.auth-go::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, var(--jade-dark), var(--jade)); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.auth-go i { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px 15px 15px 5px; background: var(--jade-bright); color: var(--ink); transition: transform .3s var(--ease), background .3s; }
.auth-go:hover { transform: translateY(-2px); } .auth-go:hover::before, .auth-go:focus-visible::before { transform: scaleX(1); }
.auth-go:hover i { transform: translateX(3px); background: #fff; }
.auth-go:active { transform: translateY(0) scale(.99); }
.auth-go:focus-visible { outline: 3px solid rgba(31, 207, 154, .6); outline-offset: 3px; }
.auth-go.is-busy { pointer-events: none; } .auth-go.is-busy::before { transform: scaleX(1); } .auth-go.is-busy i .icon { animation: auth-turn .8s linear infinite; }
.auth-go[hidden], .auth-back-step[hidden], .auth-step[hidden] { display: none; }
.auth-or { display: flex; align-items: center; gap: 14px; margin: 26px 0 14px; color: var(--muted); font-size: .86rem; font-weight: 600; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.auth-tiles a { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border: 1.5px solid var(--line); border-radius: 18px 18px 18px 6px; color: var(--ink); transition: border-color .2s, transform .2s var(--ease), background .2s; }
.auth-tiles a > .icon:first-child { flex: none; width: 38px; height: 38px; padding: 9px; border-radius: 12px 12px 12px 4px; background: var(--jade-tint); color: var(--jade-dark); transition: background .2s, color .2s; }
.auth-tiles a > .icon:last-child { margin-left: auto; color: #8A9B9E; transition: transform .2s var(--ease); }
.auth-tiles b { display: block; font-size: .93rem; } .auth-tiles small { display: block; color: var(--muted); font-size: .8rem; }
.auth-tiles a:hover { border-color: var(--jade); background: #F8FCFA; transform: translateY(-2px); color: var(--ink); }
.auth-tiles a:hover > .icon:first-child { background: var(--jade); color: #fff; } .auth-tiles a:hover > .icon:last-child { transform: translateX(3px); color: var(--jade); }
.auth-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 20px 0 22px; }
.auth-steps i { height: 5px; border-radius: 5px; background: var(--line); position: relative; overflow: hidden; }
.auth-steps i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--jade), var(--jade-bright)); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.auth-steps i.is-on::after { transform: scaleX(1); }
.auth-plans { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.auth-plans legend { padding: 0; margin-bottom: 10px; font-weight: 700; color: var(--ink); font-size: .95rem; }
.auth-plans span { grid-template-columns: auto minmax(0, 1fr) auto; gap: 1px 14px; padding: 13px 14px; border-radius: 18px 18px 18px 6px; }
.auth-plans .icon { width: 42px; height: 42px; padding: 10px; }
.auth-plans b { align-self: end; font-size: .98rem; } .auth-plans small { grid-column: 2; align-self: start; font-size: .82rem; }
.auth-plans em { grid-column: 3; grid-row: 1 / span 2; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid #C9D6D3; color: transparent; transition: background .2s, border-color .2s, color .2s, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.auth-plans em .icon { width: 14px; height: 14px; padding: 0; background: none !important; color: inherit !important; border-radius: 0; }
.auth-plans input:checked + span em { background: var(--jade); border-color: var(--jade); color: #fff; transform: scale(1.12); }
.auth-back-step { display: inline-flex; align-items: center; gap: 6px; justify-self: center; min-height: 44px; padding: 0 14px; border: 0; background: none; color: var(--muted); font: 600 .92rem var(--font-body); cursor: pointer; border-radius: 12px; }
.auth-back-step .icon { transform: rotate(180deg); } .auth-back-step:hover { color: var(--ink); background: var(--mist); }
.auth-card > .auth-trust { margin-top: 20px; }
.auth-trust li { padding: 6px 11px; border-radius: 99px; background: var(--mist); }
@keyframes auth-turn { to { transform: rotate(360deg); } }
@keyframes auth-step-in { from { opacity: 0; transform: translateX(22px); } }
@keyframes auth-mark-pop { from { transform: scale(.6) rotate(-12deg); opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .auth-card::before { animation: auth-spin 8s linear infinite; }
  .auth-mark { animation: auth-mark-pop .6s cubic-bezier(.34, 1.56, .64, 1) .1s backwards; }
  .auth-step:not([hidden]) { animation: auth-step-in .4s var(--ease) backwards; }
  .auth-card form > .auth-step { animation-delay: 0s; }
}
@media (max-width: 860px) { .auth-mark { width: 52px; height: 52px; } .auth-mobile-brand { display: none !important; } .auth-panel { padding-top: 70px; } }

/* ---------- Sign-in and register: plain version, no card around the form ---------- */
.auth-card { width: min(420px, 100%); background: none; box-shadow: none; padding: 0; border-radius: 0; }
.auth-card::before { display: none; }
.auth-panel { background: var(--mist); }
.fl input { background: var(--surface); border-color: var(--line); }
.fl input:hover { border-color: #A9BCB8; }
.auth-plans span { background: var(--surface); }
.auth-trust li { padding: 0; background: none; }
.auth-card .auth-alt { margin-top: 24px; }
@media (max-width: 860px) { .auth-panel { padding-inline: 22px; } }

/* ── Telegram channel and Instagram auto-replies ── */
.channel-telegram { background: #229ED9; }
.steps-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: .92rem; }
.steps-list strong { color: var(--heading); }
.rule-flow { display: grid; gap: 4px; }
.rule-flow .rule-line { display: flex; gap: 8px; align-items: baseline; }
.rule-flow .rule-line > span:first-child { flex: 0 0 74px; color: var(--muted); font-size: .8rem; }
.rule-flow .rule-line > span:last-child { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Flow builder: A/B split, exit counts, template gallery ---------- */
.flow-split .flow-node-head { background: #E3F4F7; color: #0E5563; }
.flow-count { margin-left: auto; font: 600 .72rem var(--font-body); font-style: normal; font-variant-numeric: tabular-nums; color: var(--muted); background: var(--mist); border-radius: 99px; padding: 1px 8px; }
.flow-warn { color: #8C2030; }
.flow-stat { display: flex; align-items: center; gap: 6px; margin: 0; }
.flow-tpl { margin-top: 36px; scroll-margin-top: 20px; }
.flow-tpl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.flow-tpl-head h2 { margin: 0 0 4px; } .flow-tpl-head p { margin: 0; max-width: 60ch; }
.flow-tpl-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.flow-tpl-card { display: flex; flex-direction: column; } .flow-tpl-card[hidden] { display: none; } .flow-tpl-card .card-body { flex: 1; }
.flow-tpl-uses { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
html[data-theme="dark"] .flow-split .flow-node-head { background: #123A42; }
html[data-theme="dark"] .flow-warn { color: #FFB3BD; }

/* ---------- Install app and push notifications (PWA) ---------- */
.app-nudge { background: var(--jade-tint); color: var(--jade-dark); flex-wrap: nowrap; }
.app-nudge[hidden] { display: none; }
.app-nudge > span { flex: 1; min-width: 0; }
.app-nudge .link-btn { color: inherit; text-decoration: underline; font-weight: 700; white-space: nowrap; }
.app-nudge-x { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin: -4px -8px -4px 0; border: 0; border-radius: 8px; background: none; color: inherit; cursor: pointer; }
.app-nudge-x:hover { background: rgba(0, 0, 0, .08); }
html[data-theme="dark"] .app-nudge { color: #9BE5C8; }
.push-devices-title { display: block; font-size: .84rem; margin-bottom: 6px; }
.push-devices { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-soft); border-radius: 12px; }
.push-devices li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.push-devices li + li { border-top: 1px solid var(--line-soft); }
@media (max-width: 560px) { .app-nudge { flex-wrap: wrap; } .app-nudge > span { flex-basis: calc(100% - 70px); } }

/* ---------- Social broadcasts and the accounts overview (Instagram, Messenger, Telegram) ---------- */
.reach-box { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid #BFE8D7; background: var(--jade-tint); border-radius: var(--r-lg, 14px); font-size: .9rem; }
.reach-box strong { font: 800 1.6rem/1 var(--font-display); color: var(--heading); font-variant-numeric: tabular-nums; min-width: 1.4em; text-align: center; }
.reach-box.is-empty { background: var(--amber-tint); border-color: #EFDCA6; }
.run-list { list-style: none; margin: 0; padding: 0; }
.run-list li { display: flex; align-items: center; gap: 14px; padding: 11px 20px; }
.run-list li + li { border-top: 1px solid var(--line-soft); }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 26px; }
.acct { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; }
.acct.is-paused { background: var(--mist); }
.acct-top { display: flex; align-items: center; gap: 12px; }
.acct-top h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; } .acct-top p { margin: 0; color: var(--muted); font-size: .82rem; }
.acct-top .badge { margin-left: auto; flex: none; }
.acct-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acct-nums div { border: 1px solid var(--line-soft); border-radius: 12px; padding: 9px 12px; }
.acct-nums strong { display: block; font: 800 1.35rem/1.1 var(--font-display); color: var(--heading); font-variant-numeric: tabular-nums; }
.acct-nums span { font-size: .78rem; color: var(--muted); }
.acct-links { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; font-weight: 600; }
.acct-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 12px; font-size: .82rem; color: var(--muted); }
.conv-account { width: 100%; }
html[data-theme="dark"] .reach-box { background: rgba(31,207,154,.1); border-color: rgba(31,207,154,.3); }
html[data-theme="dark"] .reach-box.is-empty { background: rgba(240,180,41,.1); border-color: rgba(240,180,41,.3); }

/* ---------- Product catalog and orders (products, order timeline) ---------- */
.prod-thumb { width: 44px; height: 44px; flex: none; border-radius: 10px; object-fit: cover; background: var(--mist); border: 1px solid var(--line-soft); }
.prod-thumb-none { display: inline-grid; place-items: center; color: var(--muted); }
.prod-photo { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line-soft); background: var(--mist); }
.order-timeline { list-style: none; margin: 0; padding: 6px 0; }
.order-timeline li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 20px; font-size: .92rem; }
.order-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--mist); color: var(--muted); }
.order-timeline .is-paid .order-dot, .order-timeline .is-fulfilled .order-dot { background: var(--jade-tint); color: var(--jade-dark, #0E8F68); }
.order-timeline .is-cancelled .order-dot { background: var(--red-tint); color: var(--red); }
.order-timeline .is-note .order-dot { background: var(--amber-tint); color: #8A6400; }

/* ---------- SMS channel and SMS broadcasts ---------- */
.channel-sms { background: #0B8FA8; }
.sms-count { margin: 6px 2px 0; min-height: 1.2em; font-size: .78rem; }

/* ---------- Developers page: Zapier / Make / n8n guides ---------- */
.guide { border: 1px solid var(--line-soft); border-radius: var(--r); }
.guide > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; color: var(--heading); }
.guide[open] > summary { border-bottom: 1px solid var(--line-soft); }
.guide > .stack { padding: 16px; }
.snip { display: flex; gap: 8px; align-items: flex-start; }
.snip .codeblock { flex: 1; min-width: 0; }
.snip .btn { flex: none; }
@media (max-width: 560px) { .snip { flex-direction: column; align-items: stretch; } }

/* ---------- Bookings (appointments): today strip, day and week calendar, time picker, hours editor ---------- */
.bk-input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; min-height: 42px; }
.bk-input:focus { outline: none; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(31, 207, 154, .28); }
.toolbar .bk-input { width: auto; }
.bk-today { display: grid; grid-template-columns: 190px minmax(0, 1fr); margin-bottom: 18px; }
.bk-today-count { padding: 18px 20px; border-right: 1px solid var(--line-soft); }
.bk-today-count strong { display: block; font: 800 2rem/1.1 var(--font-display); color: var(--heading); font-variant-numeric: tabular-nums; }
.bk-today-count span { font-size: .84rem; color: var(--muted); }
.bk-today-list { list-style: none; margin: 0; padding: 6px 0; display: grid; align-content: center; }
.bk-today-list li { display: flex; align-items: baseline; gap: 12px; padding: 7px 20px; font-size: .92rem; min-width: 0; }
.bk-today-list time { flex: none; width: 72px; font-weight: 700; color: var(--heading); font-variant-numeric: tabular-nums; }
.bk-today-list a { color: inherit; font-weight: 600; }
.bk-today-list .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-range { font-weight: 700; color: var(--heading); margin-right: auto; white-space: nowrap; }
.bk-cal { overflow-x: auto; }
.bk-cal-grid { display: grid; grid-template-columns: 58px repeat(var(--bk-cols, 7), minmax(118px, 1fr)); min-width: calc(58px + var(--bk-cols, 7) * 118px); }
.bk-cal-head { position: sticky; top: 0; z-index: 3; display: flex; flex-direction: column; gap: 1px; padding: 9px 10px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line-soft); background: var(--surface); color: var(--heading); font-size: .86rem; font-weight: 700; }
.bk-cal-head small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.bk-cal-head.is-today { box-shadow: inset 0 -3px 0 var(--jade); }
.bk-cal-head:first-child { border-left: 0; }
.bk-cal-hours { position: relative; }
.bk-cal-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-cal-hours span:first-child { transform: none; }
.bk-cal-col { position: relative; border-left: 1px solid var(--line-soft); background: repeating-linear-gradient(135deg, var(--mist) 0 6px, transparent 6px 12px); }
.bk-cal-open { position: absolute; left: 0; right: 0; background: var(--surface); background-image: linear-gradient(var(--line-soft) 1px, transparent 1px); background-size: 100% 72px; }
.bk-cal-off { position: absolute; inset: 8px 6px auto; text-align: center; font-size: .76rem; color: var(--muted); }
.bk-cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--papaya); z-index: 2; pointer-events: none; }
.bk-cal-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--papaya); }
.bk-ev { position: absolute; z-index: 1; display: block; overflow: hidden; padding: 3px 7px; border-radius: 8px 8px 8px 3px; border: 1px solid #BFE8D7; border-left: 3px solid var(--jade); background: var(--jade-tint); color: var(--heading); font-size: .76rem; line-height: 1.3; }
.bk-ev:hover { box-shadow: var(--shadow-2); z-index: 2; color: var(--heading); }
.bk-ev strong { font-weight: 700; margin-right: 4px; font-variant-numeric: tabular-nums; }
.bk-ev span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-ev.is-completed { background: var(--mist); border-color: var(--line); border-left-color: var(--muted); }
.bk-ev.is-no_show { background: var(--red-tint); border-color: #F3C6CC; border-left-color: var(--red); text-decoration: line-through; }
.bk-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 16px; border-top: 1px solid var(--line-soft); font-size: .8rem; color: var(--muted); }
.bk-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--line); }
.bk-times { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-times label { position: relative; cursor: pointer; }
.bk-times input { position: absolute; opacity: 0; pointer-events: none; }
.bk-times span { display: block; padding: 8px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 600; font-size: .88rem; font-variant-numeric: tabular-nums; }
.bk-times label:hover span { border-color: var(--jade); }
.bk-times input:checked + span { background: var(--jade); border-color: var(--jade); color: #fff; }
.bk-times input:focus-visible + span { outline: 3px solid rgba(31, 207, 154, .55); }
.bk-hours { display: grid; gap: 10px; }
.bk-hours-day { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: start; }
.bk-hours-day > strong { padding-top: 10px; font-size: .9rem; color: var(--heading); }
.bk-hours-ranges { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.bk-hours-ranges > span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .86rem; }
.bk-hours-ranges .bk-input { width: 122px; }
.bk-log { list-style: none; margin: 0; padding: 0; }
.bk-log li { padding: 12px 20px; font-size: .9rem; }
.bk-log li + li { border-top: 1px solid var(--line-soft); }
.bk-log p { color: var(--muted); font-size: .84rem; margin-top: 3px; }
.bk-preview { white-space: pre-wrap; padding: 10px 12px; border-radius: var(--bubble); background: var(--mist); font-size: .88rem; }
html[data-theme="dark"] .bk-ev { border-color: rgba(43, 185, 141, .4); border-left-color: var(--jade); }
html[data-theme="dark"] .bk-ev.is-no_show { border-color: #6B2A35; border-left-color: var(--red); }
html[data-theme="dark"] .bk-times input:checked + span { background: #0E8C6A; border-color: #0E8C6A; }
@media (max-width: 720px) {
  .bk-today { grid-template-columns: 1fr; }
  .bk-today-count { border-right: 0; border-bottom: 1px solid var(--line-soft); display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; }
  .bk-today-list li { padding: 7px 16px; }
  .bk-hours-day { grid-template-columns: 1fr; gap: 4px; }
  .bk-hours-day > strong { padding-top: 0; }
}

/* ---------- Software update (admin) ---------- */
.sidebar-version { display: block; padding: 0 10px 8px; font: 500 .74rem/1.2 var(--font-mono); color: #6F8F8C; }
.sidebar-version:hover { color: #C5D8D5; }
.upd-grid > .stack { grid-template-columns: minmax(0, 1fr); }
.upd-msg { margin-top: 4px; max-width: 78ch; overflow-wrap: anywhere; }
.upd-cmd { margin: 10px 0 6px; }
.upd-kv { grid-template-columns: 124px minmax(0, 1fr); }
.upd-kv .badge { vertical-align: 1px; }
.upd-details { margin-top: 10px; }
.upd-details > summary { cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--heading); }
.upd-details > summary:hover { color: var(--jade-dark); }
.upd-details[open] > summary { margin-bottom: 8px; }
.upd-list { list-style: none; margin: 0; padding: 10px 12px; max-height: 260px; overflow: auto; background: var(--mist); border: 1px solid var(--line); border-radius: var(--r); font-size: .8rem; display: grid; gap: 3px; overflow-wrap: anywhere; }
.upd-reasons { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; max-width: 86ch; }
.upd-notes { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; font-size: .93rem; }
.upd-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.upd-counts > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--mist); }
.upd-counts strong { display: block; font: 800 1.45rem/1.1 var(--font-display); color: var(--heading); font-variant-numeric: tabular-nums; }
.upd-counts span { font-size: .8rem; color: var(--muted); }
.upd-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: .92rem; max-width: 78ch; }
.update-wait h1 { margin-top: 22px; }
.update-wait p { margin: 10px auto 0; max-width: 46ch; }
.update-wait-mark { width: 76px; height: 76px; margin: 0 auto; display: grid; place-items: center; background: var(--jade-tint); border-radius: 26px 26px 26px 8px; }
.update-wait-mark span { width: 30px; height: 30px; border: 3px solid rgba(15, 46, 51, .16); border-top-color: var(--jade); border-radius: 50%; animation: update-wait-spin 1s linear infinite; }
.update-wait-admin { margin-top: 28px !important; font-size: .84rem; }
.update-wait-admin a { color: var(--muted); text-decoration: underline; }
@keyframes update-wait-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .update-wait-mark span { animation: none; } }

/* "Your partner": shown to a partner's customers (sidebar chip and details card) */
.partner-chip { display: block; padding: 9px 12px; margin-bottom: 10px; border-radius: 14px 14px 14px 5px; background: rgba(31, 207, 154, .12); border: 1px solid rgba(31, 207, 154, .22); color: #EAF7F3; text-decoration: none; line-height: 1.25; }
.partner-chip small { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #9DD8C6; }
.partner-chip strong { display: block; font-size: .88rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.partner-chip:hover { background: rgba(31, 207, 154, .2); }
.partner-chip:focus-visible { outline: 2px solid var(--jade-bright); outline-offset: 2px; }
.partner-who { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.partner-who img { height: 44px; width: auto; max-width: 150px; border-radius: 8px; object-fit: contain; }
.partner-who strong { display: block; font: 800 1.1rem var(--font-display); color: var(--ink); }
.partner-who div > span { display: block; }
.partner-contacts { display: block; margin: 0; }
.partner-contacts > div { display: flex; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.partner-contacts > div[hidden] { display: none; }
.partner-contacts dt { width: 120px; flex: none; color: var(--muted); font-size: .86rem; }
.partner-contacts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Partner settlements and performance (partner portal: /partner/performance; admin: /admin/settlements) */
.pp-stat { font-size: 1.45rem; line-height: 1.2; overflow-wrap: anywhere; }
.is-late { color: var(--red); }
html[data-theme="dark"] .is-late { color: #FF9AA8; }
.section-title { font: 700 1.05rem var(--font-display); color: var(--heading); margin: 26px 0 12px; }
.row-overdue td { background: var(--red-tint); }
.table tbody tr.row-overdue:hover { background: var(--red-tint); }
html[data-theme="dark"] .row-overdue td { background: rgba(201, 54, 74, .16); }
.pay-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pay-form input { width: auto; flex: 1; min-width: 150px; max-width: 240px; padding-top: 7px; padding-bottom: 7px; font-family: var(--font-mono); font-size: .84rem; }
.settle-payto { border-bottom: 1px solid var(--line-soft); }
.settle-payto .codeblock { margin-top: 6px; }
.input-sm { width: 84px !important; flex: none; }
.rebate-terms td { vertical-align: middle; }
.rebate-terms tfoot td { border-top: 1px solid var(--line); border-bottom: 0; padding-top: 14px; }
.score { display: grid; gap: 14px; }
.score-sum { display: flex; gap: 12px 32px; flex-wrap: wrap; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.score-rate { font: 800 2rem/1 var(--font-display); color: var(--heading); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.score-money { display: grid; gap: 6px; flex: 1; min-width: 240px; }
.score-row { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 8px; }
.score-row.is-met { border-color: #BFE8D7; background: var(--jade-tint); }
html[data-theme="dark"] .score-row.is-met { border-color: #1F5A48; background: rgba(31, 207, 154, .08); }
.score-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.score-top strong { color: var(--heading); font-size: 1rem; }
.score-worth { margin-left: auto; font-size: .86rem; font-weight: 600; color: var(--muted); }
.score-row.is-met .score-worth { color: var(--jade-dark); }
html[data-theme="dark"] .score-row.is-met .score-worth { color: #9BE5C8; }
.score-rule, .score-now { margin: 0; font-size: .92rem; }
.score-rule { color: var(--muted); }
.score-foot { margin: 0; }
.pp-bars { height: 190px; gap: 10px; }
.pp-bars .bars-pair i { width: 46%; max-width: 20px; }
.pp-bar-volume { background: var(--ink-3); }
.pp-bar-margin { background: var(--jade-bright); }
html[data-theme="dark"] .pp-bar-volume { background: #5E8C94; }
.pp-legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); margin-bottom: 4px; }
.pp-legend span { display: inline-flex; align-items: center; gap: 7px; }
.pp-key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.pp-key-volume { background: var(--ink-3); } .pp-key-margin { background: var(--jade-bright); }
html[data-theme="dark"] .pp-key-volume { background: #5E8C94; }
.pp-figures { margin-top: 14px; }
.pp-figures summary { cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--muted); }
.pp-figures .table-wrap { margin-top: 10px; border: 1px solid var(--line-soft); border-radius: var(--r); }
@media (max-width: 640px) { .pp-bars { gap: 4px; } .pp-bars small { font-size: .6rem; } .score-worth { margin-left: 0; } }
.settle-side > .stack { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.settle-side .pay-form input { min-width: 120px; }

/* Partner portal: "How you're paid" strip */
.payout-method { margin-bottom: 20px; }
.payout-method.is-missing { border-color: var(--papaya); background: var(--papaya-tint); }
.payout-method-ico { width: 40px; height: 40px; border-radius: 12px 12px 12px 4px; display: grid; place-items: center; background: var(--jade-tint); color: var(--jade-dark); flex: none; }
.payout-method.is-missing .payout-method-ico { background: var(--surface); color: var(--papaya-dark); }

/* ---------- Admin → Help centre (appended; the article preview itself is styled by help.css) ---------- */
.help-cat-row th { background: var(--mist); font: 700 .76rem/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-block: 10px; }
.help-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.help-editor-panes { display: grid; grid-template-columns: minmax(0, 1fr); }
.help-editor-write textarea { display: block; width: 100%; min-height: 420px; border: 0; border-radius: 0; resize: vertical; padding: 18px 20px; font-size: .9rem; line-height: 1.6; background: var(--surface); }
.help-editor-write textarea:focus { outline: 3px solid rgba(31, 207, 154, .55); outline-offset: -3px; box-shadow: none; }
.help-editor-preview { padding: 20px; border-top: 1px solid var(--line-soft); background: var(--mist); min-width: 0; }
.help-editor[data-pane="preview"] .help-editor-write, .help-editor:not([data-pane="preview"]) .help-editor-preview { display: none; }
.help-syntax { border-top: 1px solid var(--line-soft); }
.help-syntax summary { cursor: pointer; padding: 14px 20px; font-weight: 600; color: var(--heading); }
.help-syntax td:first-child { white-space: nowrap; }
.help-comments { list-style: none; margin: 0; padding: 6px 20px 14px; display: grid; gap: 10px; }
.help-comments li { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.help-comments li:first-child { border-top: 0; }
.help-comments small { color: var(--muted); }
@media (min-width: 1100px) {
  .help-editor { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (min-width: 1500px) {
  /* Room for both: write on the left, the rendered article on the right. */
  .help-editor-tabs { display: none; }
  .help-editor-panes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .help-editor .help-editor-write, .help-editor .help-editor-preview { display: block !important; }
  .help-editor-preview { border-top: 0; border-left: 1px solid var(--line-soft); max-height: 760px; overflow: auto; }
  .help-editor-write textarea { height: 760px; }
}

/* Back office sign-in: the platform admin's own page */
.bo-body { margin: 0; background: #071C20; color: #DCEBE8; min-height: 100dvh; }
.bo { position: relative; min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 22px; padding: 32px 18px; overflow: hidden; }
.bo::before { content: ""; position: absolute; width: 720px; height: 720px; left: 50%; top: 42%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(31, 207, 154, .16), transparent 62%); pointer-events: none; }
.bo-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(circle at 50% 42%, #000 0, transparent 70%); -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0, transparent 70%); pointer-events: none; }
.bo-card { position: relative; width: min(420px, 100%); background: #0F2E33; border: 1px solid rgba(255, 255, 255, .1); border-radius: 26px 26px 26px 8px; padding: clamp(24px, 4vw, 34px); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.bo-top { display: flex; align-items: center; gap: 14px; }
.bo-lock { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px 14px 14px 5px; background: rgba(31, 207, 154, .14); color: #1FCF9A; border: 1px solid rgba(31, 207, 154, .3); }
.bo-kicker { display: block; font: 600 .7rem var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: #8FB3AD; }
.bo-card h1 { font: 800 1.7rem var(--font-display); letter-spacing: -.03em; color: #fff; line-height: 1.1; margin: 2px 0 0; }
.bo-lead { margin: 16px 0 20px; color: #A9C4BF; font-size: .95rem; }
.bo-form { display: grid; gap: 16px; }
.bo-field label { display: block; font-size: .82rem; font-weight: 600; color: #C7DCD8; margin-bottom: 6px; }
.bo-input { display: flex; align-items: center; gap: 10px; padding: 0 12px; background: #0A2226; border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px 12px 12px 4px; color: #8FB3AD; transition: border-color .15s, box-shadow .15s; }
.bo-input:focus-within { border-color: #1FCF9A; box-shadow: 0 0 0 3px rgba(31, 207, 154, .22); color: #1FCF9A; }
.bo-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: #fff; font: inherit; font-size: 1rem; padding: 13px 0; }
.bo-input input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 100px #0A2226 inset; caret-color: #fff; }
.bo-eye { border: 0; background: none; color: #8FB3AD; cursor: pointer; padding: 8px; margin-right: -6px; border-radius: 8px; display: grid; place-items: center; }
.bo-eye:hover, .bo-eye[aria-pressed="true"] { color: #1FCF9A; }
.bo-eye:focus-visible, .bo-go:focus-visible, .bo-foot a:focus-visible { outline: 2px solid #1FCF9A; outline-offset: 2px; }
.bo-field .field-error { color: #FFB4A0; margin-top: 6px; font-size: .84rem; }
.bo-go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 4px; padding: 14px 18px; border: 0; border-radius: 12px 12px 12px 4px; background: #1FCF9A; color: #06231C; font: 700 1rem var(--font-body); cursor: pointer; transition: transform .15s var(--ease), background .15s; }
.bo-go:hover { background: #3BE0AE; }
.bo-go:active { transform: scale(.985); }
.bo-go.is-busy { opacity: .7; pointer-events: none; }
.bo-alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; margin-bottom: 16px; border-radius: 12px 12px 12px 4px; background: rgba(255, 107, 61, .14); border: 1px solid rgba(255, 107, 61, .35); color: #FFC9B8; font-size: .9rem; }
.bo-alert.is-ok { background: rgba(31, 207, 154, .12); border-color: rgba(31, 207, 154, .3); color: #BFEBDD; }
.bo-alert svg { flex: none; margin-top: 2px; }
.bo-foot { display: grid; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .82rem; color: #8FB3AD; }
.bo-foot a { color: #BFEBDD; font-weight: 600; text-decoration: none; justify-self: start; border-radius: 4px; }
.bo-foot a:hover { text-decoration: underline; }
.bo-foot span { display: inline-flex; align-items: center; gap: 6px; }
.bo-meta { position: relative; display: inline-flex; align-items: center; gap: 8px; font: 500 .74rem var(--font-mono); color: #6E918B; margin: 0; }
.bo-dot { width: 7px; height: 7px; border-radius: 50%; background: #1FCF9A; }
@media (prefers-reduced-motion: no-preference) {
  .bo-card { animation: bo-in .5s var(--ease) both; }
  .bo-dot { animation: bo-pulse 2.4s ease-in-out infinite; }
}
@keyframes bo-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes bo-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 207, 154, .5); } 50% { box-shadow: 0 0 0 6px rgba(31, 207, 154, 0); } }
.bo-input input, .bo-input input:focus, .bo-input input:focus-visible { border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: 0; }

/* "Continue with Facebook": Meta's blue, used only for this button */
.btn-fb { background: #1877F2; color: #fff; border-color: #1877F2; }
.btn-fb:hover { background: #0F65D8; border-color: #0F65D8; color: #fff; }
.btn-fb:focus-visible { outline: 2px solid #1877F2; outline-offset: 2px; }

.auth-terms { margin-top: 12px; font-size: .84rem; line-height: 1.5; color: var(--muted); }
.auth-terms a { color: inherit; text-decoration: underline; }

/* Storefront editor: the three designs to pick from */
.st-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.st-pick-item { display: grid; gap: 12px; padding: 14px; border: 2px solid var(--line); border-radius: 16px; cursor: pointer; position: relative; background: var(--surface); }
.st-pick-item:has(input:checked) { border-color: var(--jade); box-shadow: 0 0 0 3px var(--jade-tint); }
.st-pick-item input { position: absolute; top: 12px; right: 12px; }
.st-pick-item small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.4; margin-top: 2px; }
.st-pick-art { display: grid; gap: 6px; align-content: center; height: 92px; padding: 14px; border-radius: 10px; }
.st-pick-art i { display: block; height: 9px; border-radius: 99px; }
.st-pick-bold { background: var(--ink); border-radius: 4px; } .st-pick-bold i { background: #fff; border-radius: 2px; } .st-pick-bold i:nth-child(1) { width: 78%; height: 16px; } .st-pick-bold i:nth-child(2) { width: 54%; opacity: .6; } .st-pick-bold i:nth-child(3) { width: 34%; background: var(--jade-bright); }
.st-pick-clean { background: #fff; border: 1px solid var(--line); justify-items: center; } .st-pick-clean i { background: var(--ink); } .st-pick-clean i:nth-child(1) { width: 64%; height: 14px; } .st-pick-clean i:nth-child(2) { width: 44%; opacity: .35; } .st-pick-clean i:nth-child(3) { width: 26%; background: var(--jade); }
.st-pick-soft { background: var(--jade-tint); border-radius: 26px; } .st-pick-soft i { background: var(--ink); } .st-pick-soft i:nth-child(1) { width: 70%; height: 15px; } .st-pick-soft i:nth-child(2) { width: 50%; opacity: .4; } .st-pick-soft i:nth-child(3) { width: 30%; background: var(--jade); height: 13px; }

/* Pages and forms (customer page builder) */
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.pg-card { padding: 18px; display: grid; gap: 10px; align-content: start; }
.pg-card h3 a { color: inherit; text-decoration: none; } .pg-card h3 a:hover { color: var(--jade); }
.pg-card-top { display: flex; justify-content: space-between; align-items: center; }
.pg-kind { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--jade-tint); color: var(--jade-dark); vertical-align: middle; }
.pg-kind-event { background: var(--blue-tint); color: #1B4C91; } .pg-kind-booking { background: var(--butter); color: #6B470A; } .pg-kind-poll { background: var(--papaya-tint); color: var(--papaya-dark); } .pg-kind-bill { background: var(--mist); color: var(--ink); } .pg-kind-form { background: #EDE7FB; color: #4A2F96; }
.pg-stats { display: flex; gap: 22px; margin: 4px 0; } .pg-stats dt { font-size: .76rem; color: var(--muted); } .pg-stats dd { margin: 0; font-weight: 700; font-size: 1.05rem; }
.pg-tpl { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pg-tpl-item { display: grid; gap: 6px; align-content: start; justify-items: start; padding: 16px; border: 2px solid var(--line); border-radius: 16px; cursor: pointer; position: relative; background: var(--surface); }
.pg-tpl-item:has(input:checked) { border-color: var(--jade); box-shadow: 0 0 0 3px var(--jade-tint); }
.pg-tpl-item input { position: absolute; top: 14px; right: 14px; } .pg-tpl-item strong { padding-right: 26px; } .pg-tpl-item small { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.pg-sticky { position: sticky; bottom: 14px; z-index: 5; box-shadow: var(--shadow-3); }
.pg-row { padding: 12px 0; border-bottom: 1px dashed var(--line-soft); } .pg-row:last-child { border-bottom: 0; }
.pg-row .form-row { align-items: end; } .pg-row-x { margin-bottom: 4px; }
.pg-results { display: grid; gap: 12px; }
.pg-look-fresh { background: var(--mist); border-radius: 18px; } .pg-look-fresh i { background: var(--ink); } .pg-look-fresh i:nth-child(1) { width: 66%; height: 15px; } .pg-look-fresh i:nth-child(2) { width: 86%; opacity: .35; } .pg-look-fresh i:nth-child(3) { width: 34%; height: 16px; background: var(--jade); }
.pg-look-boutique { background: #FBF9F6; border: 1px solid #E6E0D8; border-radius: 3px; justify-items: center; } .pg-look-boutique i { background: var(--ink); border-radius: 0; } .pg-look-boutique i:nth-child(1) { width: 74%; height: 18px; transform: skewX(-10deg); } .pg-look-boutique i:nth-child(2) { width: 50%; opacity: .35; height: 6px; } .pg-look-boutique i:nth-child(3) { width: 30%; height: 14px; }
.pg-look-night { background: #0B1416; border-radius: 14px; } .pg-look-night i { background: #fff; } .pg-look-night i:nth-child(1) { width: 72%; height: 16px; } .pg-look-night i:nth-child(2) { width: 88%; opacity: .3; } .pg-look-night i:nth-child(3) { width: 36%; height: 16px; background: var(--jade-bright); }
@media (max-width: 720px) { .pg-row .form-row { grid-template-columns: 1fr !important; } }

/* Widget availability */
.av-days { display: grid; gap: 8px; }
.av-day { display: grid; grid-template-columns: minmax(130px, 1fr) auto auto auto; gap: 10px; align-items: center; }
.av-day input[type="time"] { width: 130px; }
@media (max-width: 560px) { .av-day { grid-template-columns: 1fr 1fr; } .av-day .check { grid-column: 1 / -1; } .av-day span { display: none; } }
.pg-kind-invite { background: #FBE3EE; color: #8F2257; }

/* Widget design picker */
.wd-pick { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.wd-art { display: grid; grid-template-rows: 22px 1fr 1fr auto; gap: 5px; height: 104px; padding: 0 0 8px; border-radius: 12px; background: #F4F8F7; border: 1px solid var(--line); overflow: hidden; position: relative; }
.wd-art i { display: block; background: var(--jade); } .wd-art b { display: block; height: 9px; width: 56%; margin-left: 8px; border-radius: 8px 8px 8px 3px; background: #fff; border: 1px solid var(--line); align-self: center; }
.wd-art b + b { margin-left: auto; margin-right: 8px; background: var(--jade); border-color: transparent; border-radius: 8px 8px 3px 8px; width: 44%; }
.wd-art em { justify-self: end; margin-right: 8px; width: 18px; height: 18px; border-radius: 7px 7px 7px 3px; background: var(--jade); }
.wd-art-minimal { background: #fff; border-radius: 6px; } .wd-art-minimal i { background: #fff; border-bottom: 1px solid var(--line); } .wd-art-minimal b { border-radius: 3px; background: var(--mist); border-color: transparent; } .wd-art-minimal b + b { border-radius: 3px; } .wd-art-minimal em { border-radius: 50%; }
.wd-art-bubble { border-radius: 20px; background: #fff; } .wd-art-bubble i { border-radius: 0 0 12px 12px; background: linear-gradient(135deg, var(--jade), var(--jade-dark)); } .wd-art-bubble b, .wd-art-bubble b + b { border-radius: 99px; } .wd-art-bubble b { background: var(--mist); border-color: transparent; } .wd-art-bubble em { width: 38px; border-radius: 99px; }
.wd-art-dark { background: #101C1F; border-color: #101C1F; } .wd-art-dark i { background: #0A1315; border-bottom: 2px solid var(--jade); } .wd-art-dark b { background: #1A2B2F; border-color: #22363A; }

.wd-art-side { grid-template-rows: 1fr; grid-template-columns: 1fr 46%; padding: 0; background: #E3EAE8; } .wd-art-side i { grid-column: 2; grid-row: 1; background: #fff; border-left: 1px solid var(--line); box-shadow: inset 0 22px 0 var(--jade); } .wd-art-side b, .wd-art-side b + b { display: none; } .wd-art-side em { position: absolute; left: calc(54% - 9px); top: 38%; width: 9px; height: 30px; border-radius: 5px 0 0 5px; margin: 0; }
.wd-art-home { background: linear-gradient(var(--jade) 0 38px, #F4F8F7 38px); grid-template-rows: 30px 1fr 1fr auto; } .wd-art-home i { background: none; } .wd-art-home b, .wd-art-home b + b { width: auto; margin: 0 8px; height: 16px; border-radius: 6px; background: #fff; border: 1px solid var(--line); }

.pg-colours { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 8px; }
.pg-colour { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pg-colour input[type="color"] { width: 46px; height: 34px; padding: 3px; flex: none; }

/* Storefront design picker: a real picture of each design that scrolls on hover */
.st-pick { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.st-pick-shot { display: block; height: 230px; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2, #f4f7f6); }
.st-pick-shot img { display: block; width: 100%; height: auto; transition: transform 6s ease-in-out; will-change: transform; }
.st-pick-item:hover .st-pick-shot img, .st-pick-item:focus-within .st-pick-shot img { transform: translateY(calc(-100% + 230px)); }
@media (prefers-reduced-motion: reduce) { .st-pick-shot img { transition: none; } .st-pick-item:hover .st-pick-shot img, .st-pick-item:focus-within .st-pick-shot img { transform: none; } }
.st-pick-item { cursor: default; } .st-pick-item.is-chosen { border-color: var(--jade); box-shadow: 0 0 0 3px var(--jade-tint); }
.st-pick-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.st-pick-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 0; min-height: 40px; margin: 0; white-space: nowrap; }

/* Sign-in pages: the light panel's rounded corners sit over the picture side, so the glow and dots
   carry on behind them instead of stopping at a flat dark strip. */
@media (min-width: 901px) {
  .auth-panel { margin-left: -34px; z-index: 1; }
  .auth-art { padding-right: calc(clamp(28px, 4vw, 56px) + 34px); }
}

/* The Scan and connect add-on, offered on the home screen of a free account and on Plan and billing */
.addon-offer { border: 2px solid var(--jade); background: linear-gradient(120deg, var(--jade-tint), var(--surface) 55%); }
.addon-offer-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 22px; align-items: center; padding: 20px 24px; }
.addon-offer-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px 18px 18px 6px; background: var(--jade); color: #fff; }
.addon-offer-text h3 { margin: 8px 0 4px; font-size: 1.2rem; } .addon-offer-text p { margin: 0; color: var(--muted); max-width: 62ch; }
.addon-offer-buy { display: grid; justify-items: start; gap: 2px; } .addon-offer-buy b { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--ink); } .addon-offer-buy span { color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
@media (max-width: 760px) { .addon-offer-in { grid-template-columns: auto minmax(0, 1fr); } .addon-offer-buy { grid-column: 1 / -1; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 8px; } .addon-offer-buy span { margin: 0; } .addon-offer-buy .btn { justify-self: end; } }

/* ---------- WhatsApp voice calls: the call card in the corner ---------- */
.callbox { position: fixed; right: 20px; bottom: 20px; z-index: 900; width: min(360px, calc(100vw - 32px)); display: grid; gap: 14px; padding: 18px; border-radius: 22px 22px 8px 22px; background: var(--ink); color: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); animation: callbox-in .28s var(--ease, ease-out) both; }
.callbox[hidden] { display: none; }
.callbox-who { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; } .callbox-who strong { display: block; font-size: 1.08rem; } .callbox-who small { color: #B4CBC7; font-variant-numeric: tabular-nums; }
.callbox-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--jade); color: #fff; }
.callbox.is-ringing .callbox-ico { animation: callbox-ring 1.2s ease-in-out infinite; } .callbox.is-live .callbox-ico { background: var(--jade-bright); color: var(--ink); }
.callbox-actions { display: flex; gap: 10px; } .callbox-actions .btn { flex: 1 1 0; min-height: 46px; justify-content: center; }
.callbox .btn-ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); color: #fff; } .callbox .btn-ghost:hover { background: rgba(255, 255, 255, .18); }
.callbox .btn-danger { background: #D8433B; border-color: #D8433B; color: #fff; } .callbox .btn-danger:hover { background: #B8352E; }
@keyframes callbox-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes callbox-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 207, 154, .5); } 60% { box-shadow: 0 0 0 14px rgba(31, 207, 154, 0); } }
@media (prefers-reduced-motion: reduce) { .callbox, .callbox.is-ringing .callbox-ico { animation: none; } }

/* Meeting reminders: one organisation's block */
.org-box{border:1px solid var(--line);border-radius:14px;padding:16px;display:grid;gap:14px}
.org-steps{margin:0;padding-left:20px;display:grid;gap:6px;font-size:14px}
.org-steps code{background:var(--bg-soft,#f3f6f5);padding:2px 6px;border-radius:6px;word-break:break-all}

/* WhatsApp rules check */
.pg-list{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.pg-list li{display:grid;grid-template-columns:76px 1fr;gap:12px;align-items:start;font-size:14px;line-height:1.5}
.pg-result{border-radius:12px;padding:12px 14px;font-size:14px;line-height:1.5;margin-top:10px;border:1px solid transparent}
.pg-result div{margin-top:2px}
.pg-block{background:#fdecec;border-color:#f3b4b4;color:#7a1414}
.pg-warn{background:#fff6e0;border-color:#f0d48a;color:#6b4a00}
.pg-ok{background:#e6f6ef;border-color:#a9dcc6;color:#0b5a43}
.pg-match{font-family:var(--mono,ui-monospace,monospace);font-size:12.5px;background:rgba(0,0,0,.07);padding:1px 6px;border-radius:6px}

/* Small screens: a card in a grid or stack may never be wider than its column, whatever it holds (a chart, a table). */
.grid > *, .stack > * { min-width: 0; }
@media (max-width: 560px) {
  .pg-list li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .org-box { padding: 12px; }
  .org-steps code { display: inline-block; max-width: 100%; }
  .page-head > div[style*="display:flex"] { flex-direction: column; gap: 10px !important; }
}
/* The narrowest phones (320px): two-column grids fall to one column sooner, and long button labels wrap. */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
@media (max-width: 400px) { .btn { white-space: normal; height: auto; min-height: 44px; padding-block: 9px; line-height: 1.3; text-align: center; } .btn-sm { min-height: 36px; padding-block: 6px; } }
/* Long unbroken text (addresses, commands, keys) wraps inside its box instead of widening the page. */
.form-stack > *, .form-row > *, .field, .alert > *, .card-head > div { min-width: 0; }
.alert span, .alert code, .hint, .hint .mono, .org-steps code, p .mono { overflow-wrap: anywhere; }
input[type="file"] { max-width: 100%; }
@media (max-width: 400px) { .card-head { flex-wrap: wrap; } }
/* A field is one column that can shrink; a file picker fills it and no more. */
.field { grid-template-columns: minmax(0, 1fr); }
input[type="file"] { width: 100%; min-width: 0; }

/* AI Assist: token balance bars */
.ait-bar { display: grid; gap: 6px; }
.ait-bar .meter { height: 10px; margin-top: 0; }
.ait-bar .hint { margin: 0; }
.plan-addon { font-style: normal; font-weight: 700; color: var(--papaya, #FF6B3D); }
.plan-addon { font-style: normal; font-weight: 700; color: var(--papaya, #FF6B3D); }

/* Home screen: AI Assist tokens */
.ai-home .card-head h3 { display: flex; align-items: center; gap: 8px; }
.ai-home-body { display: grid; gap: 16px; }
.ai-home-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ai-home-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.ai-home-stats div { background: var(--mist, #F3F7F6); border-radius: 12px; padding: 10px 14px; }
.ai-home-stats dt { font-size: .8rem; color: var(--muted); } .ai-home-stats dd { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; } .ai-home-stats small { font-weight: 500; color: var(--muted); }
@media (max-width: 700px) { .ai-home-bars, .ai-home-stats { grid-template-columns: minmax(0, 1fr); } }
.ait-bar .mono { font-family: inherit; font-weight: 700; font-variant-numeric: tabular-nums; }
