/* ScaleMax Team bot demo. Chat look is our own CSS/SVG in a familiar messaging style (no logos). */

:root {
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";

  /* Page */
  --page: #f6f5fd;
  --ink: #11231e;
  --ink-2: #3f524b;
  --muted: #64766f;
  --line: #d2dcd7;
  --surface: #ffffff;
  --surface-2: #f3f7f5;
  --surface-veil: rgba(255, 255, 255, .84);
  --brand: #0e5b4f;
  --accent: #14a06b;
  --hl: #fff0a3;
  --focus: #1b7cf2;
  --shadow-panel: 0 1px 2px rgba(16, 40, 34, .06), 0 18px 40px -18px rgba(16, 40, 34, .22);

  /* Chat */
  --wa-head: #0e5b4f;
  --wa-head-sub: rgba(255, 255, 255, .78);
  --wa-wall: #ece4da;
  --wa-doodle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%235a4630' stroke-opacity='.10' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 18h20a6 6 0 0 1 6 6v9a6 6 0 0 1-6 6h-9l-7 6v-6h-4a6 6 0 0 1-6-6v-9a6 6 0 0 1 6-6z'/%3E%3Ccircle cx='112' cy='22' r='7'/%3E%3Cpath d='M70 54l3.6 7.3 8 1.2-5.8 5.6 1.4 8L70 72.3l-7.2 3.8 1.4-8-5.8-5.6 8-1.2z'/%3E%3Cpath d='M128 70c9 0 15 7 15 15-8 0-15-6-15-15zM128 70v24'/%3E%3Cpath d='M16 100q7-7 14 0t14 0t14 0'/%3E%3Crect x='94' y='112' width='24' height='17' rx='3'/%3E%3Cpath d='M94 116l12 7 12-7'/%3E%3Cpath d='M30 134l7-11 7 11z'/%3E%3Cpath d='M146 138a8 8 0 1 1-8-8'/%3E%3Cpath d='M64 120h10M69 115v10'/%3E%3Cpath d='M78 22c4 5 11 5 15 0'/%3E%3Cpath d='M44 70v10M39 75h10'/%3E%3Ccircle cx='100' cy='88' r='3'/%3E%3C/g%3E%3C/svg%3E");
  --wa-in: #ffffff;
  --wa-out: #d9fdd3;
  --wa-ink: #111b21;
  --wa-meta: #667781;
  --wa-tick: #53bdeb;
  --wa-chip-bg: #ffffff;
  --wa-chip-ink: #087a63;
  --wa-chip-hover: #f2fbf7;
  --wa-sys: #fff5c9;
  --wa-sys-ink: #54656f;
  --wa-day: rgba(255, 255, 255, .94);
  --wa-green: #16a174;
  --wa-green-hover: #128f66;
  --wa-disabled: #b8d8ca;
  --card-line: #e5ebe8;
  --shadow-1: 0 1px .5px rgba(11, 20, 26, .13);

  /* Owner sheet */
  --sheet-line: #e1e7e4;
  --sheet-head: #f1f5f3;
  --sheet-rn: #f6f8f7;

  /* Status pills */
  --ok-bg: #daf4e6; --ok-ink: #0a7550;
  --warn-bg: #fff0c7; --warn-ink: #855600;
  --hot-bg: #fde1dc; --hot-ink: #b0261d;
  --warm-bg: #ffe8cc; --warm-ink: #944a00;
  --cold-bg: #dfeafa; --cold-ink: #22578f;
  --bad-bg: #fde8e1; --bad-ink: #9f4527;

  --op-empty-a: #e8f3ee;
  --op-empty-b: #cde0d7;
  --op-empty-c: #1f9d6b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #12101f;
    --ink: #e4ece8;
    --ink-2: #b5c3bd;
    --muted: #8a9b95;
    --line: #22312d;
    --surface: #121c19;
    --surface-2: #17231f;
    --surface-veil: rgba(18, 28, 25, .86);
    --brand: #1f8a76;
    --accent: #1fb27a;
    --hl: rgba(255, 214, 90, .26);
    --focus: #5aa6ff;
    --shadow-panel: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -18px rgba(0, 0, 0, .6);

    --wa-head: #12302a;
    --wa-wall: #0b141a;
    --wa-doodle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.045' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 18h20a6 6 0 0 1 6 6v9a6 6 0 0 1-6 6h-9l-7 6v-6h-4a6 6 0 0 1-6-6v-9a6 6 0 0 1 6-6z'/%3E%3Ccircle cx='112' cy='22' r='7'/%3E%3Cpath d='M70 54l3.6 7.3 8 1.2-5.8 5.6 1.4 8L70 72.3l-7.2 3.8 1.4-8-5.8-5.6 8-1.2z'/%3E%3Cpath d='M128 70c9 0 15 7 15 15-8 0-15-6-15-15zM128 70v24'/%3E%3Cpath d='M16 100q7-7 14 0t14 0t14 0'/%3E%3Crect x='94' y='112' width='24' height='17' rx='3'/%3E%3Cpath d='M94 116l12 7 12-7'/%3E%3Cpath d='M30 134l7-11 7 11z'/%3E%3Cpath d='M146 138a8 8 0 1 1-8-8'/%3E%3Cpath d='M64 120h10M69 115v10'/%3E%3Cpath d='M78 22c4 5 11 5 15 0'/%3E%3Cpath d='M44 70v10M39 75h10'/%3E%3Ccircle cx='100' cy='88' r='3'/%3E%3C/g%3E%3C/svg%3E");
    --wa-in: #1f2c33;
    --wa-out: #005c4b;
    --wa-ink: #e9edef;
    --wa-meta: #8d9ca5;
    --wa-chip-bg: #1f2c33;
    --wa-chip-ink: #3ad6a8;
    --wa-chip-hover: #24353d;
    --wa-sys: #1d2a30;
    --wa-sys-ink: #f2cf7e;
    --wa-day: #1d2a30;
    --wa-green: #12a37a;
    --wa-green-hover: #0f9169;
    --wa-disabled: #24463c;
    --card-line: #2b3a42;
    --shadow-1: 0 1px .5px rgba(0, 0, 0, .35);

    --sheet-line: #24322e;
    --sheet-head: #16211e;
    --sheet-rn: #141e1b;

    --ok-bg: rgba(44, 200, 130, .16); --ok-ink: #6fe0ab;
    --warn-bg: rgba(255, 190, 60, .16); --warn-ink: #f6c766;
    --hot-bg: rgba(255, 95, 80, .17); --hot-ink: #ff9a8e;
    --warm-bg: rgba(255, 150, 60, .16); --warm-ink: #ffb877;
    --cold-bg: rgba(90, 150, 255, .16); --cold-ink: #9cc2ff;
    --bad-bg: rgba(255, 120, 80, .14); --bad-ink: #ffab8c;

    --op-empty-a: #18302a;
    --op-empty-b: #24443b;
    --op-empty-c: #1fb27a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { flex: 0 0 auto; }

/* ---------- Live dot (owner panel) ---------- */
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #1fb27a; flex: 0 0 auto;
  animation: live 2.2s ease-out infinite;
}
@keyframes live {
  0% { box-shadow: 0 0 0 0 rgba(31, 178, 122, .55); }
  70% { box-shadow: 0 0 0 7px rgba(31, 178, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 178, 122, 0); }
}
.demo-banner {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px;
  background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; font-weight: 650;
}
.db-text { flex: 1; }
.db-close { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 50%; font-size: 22px; line-height: 1; color: inherit; }

/* ---------- Phone ---------- */
.device-caption { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.device-caption svg { width: 16px; height: 16px; }
.device { position: relative; }
.screen { position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); isolation: isolate; }
.statusbar { display: none; }
.screens { position: relative; flex: 1; min-height: 0; overflow: hidden; }

.list-screen, .chat-screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  transition: transform .34s cubic-bezier(.2, .8, .2, 1), visibility .34s;
}
.list-screen { background: var(--surface); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(127, 127, 127, .35) transparent; }
.chat-screen {
  transform: translateX(100%); visibility: hidden;
  background-color: var(--wa-wall); background-image: var(--wa-doodle); background-size: 170px 170px;
}
.screens.in-chat .chat-screen { transform: none; visibility: visible; }
.screens.in-chat .list-screen { transform: translateX(-24%); visibility: hidden; }

/* Chat list */
.list-head { background: var(--wa-head); color: #fff; padding: 12px 18px 13px; }
.lh-title { margin: 0; font-size: 22px; font-weight: 750; letter-spacing: -.015em; }
.lh-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--wa-head-sub); }
.list-intro { margin: 0; padding: 12px 18px; font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.chat-list { list-style: none; margin: 0; padding: 4px 0; }
.chat-row { width: 100%; display: flex; align-items: center; gap: 13px; padding: 0 16px; border: 0; background: transparent; text-align: left; color: var(--ink); }
.chat-row:hover { background: var(--surface-2); }
.chat-row:focus-visible { outline-offset: -2px; }
.avatar {
  flex: 0 0 auto; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .02em; user-select: none;
}
.avatar.is-emoji { font-size: 25px; }
.avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.avatar.sm.is-emoji { font-size: 19px; }
.cr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.chat-list li:last-child .cr-main { border-bottom: 0; }
.cr-top, .cr-bottom { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cr-name { flex: 1; min-width: 0; font-weight: 650; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.cr-time.is-unread { color: var(--accent); font-weight: 650; }
.cr-prev { flex: 1; min-width: 0; display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 14px; }
.cr-prev.is-typing { color: var(--accent); font-weight: 550; }
.cr-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-badge {
  flex: 0 0 auto; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 750;
}
.list-foot { margin-top: auto; padding: 18px 18px 22px; border-top: 1px solid var(--line); background: var(--surface-2); }

/* Chat header */
.chat-head { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; min-height: 60px; padding: 8px 4px 8px 2px; background: var(--wa-head); color: #fff; position: relative; z-index: 2; }
.icon-btn { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; color: inherit; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.head-avatar .avatar { width: 40px; height: 40px; font-size: 14.5px; }
.head-avatar .avatar.is-emoji { font-size: 21px; }
.who { flex: 1; min-width: 0; padding-left: 6px; }
.who-name { font-weight: 650; font-size: 16.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-status { font-size: 12.5px; color: var(--wa-head-sub); line-height: 1.3; }
.who-status.is-typing { color: #a8f0c9; }
.head-menu { position: relative; }
.menu-pop {
  position: absolute; right: 6px; top: 44px; z-index: 10; min-width: 190px; padding: 6px; border-radius: 12px;
  background: var(--surface); color: var(--ink); box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
  animation: menuIn .16s ease-out both; transform-origin: top right;
}
@keyframes menuIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.menu-item { width: 100%; text-align: left; border: 0; background: transparent; padding: 11px 12px; border-radius: 8px; font-size: 14.5px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); }

/* Thread */
.thread {
  position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 10px;
  scrollbar-width: thin; scrollbar-color: rgba(127, 127, 127, .35) transparent;
}
.sys { align-self: center; margin: 6px auto 4px; padding: 5px 12px; border-radius: 8px; font-size: 12px; text-align: center; max-width: 86%; box-shadow: var(--shadow-1); line-height: 1.35; }
.sys-day { background: var(--wa-day); color: var(--wa-meta); font-weight: 550; }
.sys-note { background: var(--wa-sys); color: var(--wa-sys-ink); margin-bottom: 6px; }

.msg { display: flex; flex-direction: column; max-width: 100%; }
.msg.in { align-items: flex-start; }
.msg.out { align-items: flex-end; }
.msg.first { margin-top: 8px; }
.bubble {
  position: relative; max-width: min(84%, 460px); padding: 6px 9px 7px; border-radius: 9px;
  background: var(--wa-in); color: var(--wa-ink); box-shadow: var(--shadow-1);
  font-size: 14.6px; line-height: 1.4; overflow-wrap: anywhere;
}
.msg.out .bubble { background: var(--wa-out); }
.msg.in.first .bubble { border-top-left-radius: 0; }
.msg.out.first .bubble { border-top-right-radius: 0; }
.msg.first .bubble::before { content: ""; position: absolute; top: 0; width: 8px; height: 13px; }
.msg.in.first .bubble::before { left: -8px; background: var(--wa-in); clip-path: polygon(0 0, 100% 0, 100% 100%); }
.msg.out.first .bubble::before { right: -8px; background: var(--wa-out); clip-path: polygon(0 0, 100% 0, 0 100%); }
.txt strong { font-weight: 700; }
.meta-gap { display: inline-block; width: 54px; height: 1px; }
.meta-gap.with-ticks { width: 72px; }
.meta { position: absolute; right: 8px; bottom: 4px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; line-height: 1; color: var(--wa-meta); white-space: nowrap; }
.tick { display: inline-flex; color: var(--wa-meta); transition: color .35s ease; }
.tick svg { width: 17px; height: 11px; }
.tick.is-read { color: var(--wa-tick); }
.cr-prev .tick svg { width: 16px; }

.msg.enter { animation: pop .24s cubic-bezier(.2, .9, .3, 1.15) both; }
.msg.in.enter { transform-origin: 0 100%; }
.msg.out.enter { transform-origin: 100% 100%; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

.typing .bubble { padding: 12px 14px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--wa-meta); opacity: .45; animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .16s; }
.dots i:nth-child(3) { animation-delay: .32s; }
@keyframes blink { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-3px); opacity: 1; } }
/* AI wait hint under the dots: empty (no height) until 2.5 s, then one line that swaps every 3 s. */
.typing-hint { max-width: 250px; font-size: 12.5px; line-height: 1.35; color: var(--wa-meta); }
.typing-hint:not(:empty) { margin-top: 7px; }
.hint-txt { display: block; animation: hintIn .3s ease both; }
@keyframes hintIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0 2px; max-width: min(94%, 480px); }
.msg.out .quick { justify-content: flex-end; }
.qbtn {
  border: 0; padding: 8px 14px; border-radius: 18px; background: var(--wa-chip-bg); color: var(--wa-chip-ink);
  font-weight: 650; font-size: 14px; line-height: 1.25; box-shadow: var(--shadow-1); transition: background .15s, transform .12s;
}
.qbtn:hover { background: var(--wa-chip-hover); }
.qbtn:active { transform: scale(.96); }
.msg.enter .qbtn { animation: chipIn .28s .1s cubic-bezier(.2, .9, .3, 1.1) both; }
.msg.enter .qbtn:nth-child(2) { animation-delay: .14s; }
.msg.enter .qbtn:nth-child(3) { animation-delay: .18s; }
.msg.enter .qbtn:nth-child(4) { animation-delay: .22s; }
.msg.enter .qbtn:nth-child(n+5) { animation-delay: .26s; }
@keyframes chipIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Composer */
.composer { flex: 0 0 auto; display: flex; align-items: flex-end; gap: 6px; padding: 6px 8px 8px; }
.comp-field {
  flex: 1; min-width: 0; display: flex; align-items: center; min-height: 46px; padding: 0 4px 0 16px;
  border-radius: 24px; background: var(--wa-in); box-shadow: var(--shadow-1); transition: box-shadow .15s;
}
.comp-field:focus-within { box-shadow: var(--shadow-1), 0 0 0 2px rgba(22, 161, 116, .4); }
.comp-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 11px 0; font-size: 16px; color: var(--wa-ink); }
.comp-input::placeholder { color: var(--wa-meta); }
.attach { color: var(--wa-meta); width: 38px; height: 38px; }
.attach:hover { background: rgba(0, 0, 0, .05); }
.send-btn {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--wa-green); color: #fff; box-shadow: var(--shadow-1); transition: transform .15s, opacity .15s, background .15s;
}
.send-btn svg { width: 22px; height: 22px; margin-left: 2px; }
.send-btn:hover { background: var(--wa-green-hover); }
.composer:not(.has-text) .send-btn { opacity: .7; }
.composer.has-text .send-btn { transform: scale(1.04); }

/* ---------- Card building blocks ---------- */
.bubble.card { width: min(312px, 88%); max-width: none; padding: 0; }
.bubble.card-listings { width: min(336px, 94%); }
.bubble.card-jobs { width: min(328px, 92%); }
.card-meta { display: flex; justify-content: flex-end; padding: 0 10px 6px; }
.card-meta .meta { position: static; }
.card-head { display: flex; flex-direction: column; gap: 1px; padding: 12px 13px 8px; }
.card-title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.card-sub { font-size: 12.5px; color: var(--wa-meta); }
.mini-label { margin: 10px 0 5px; font-size: 12px; font-weight: 700; color: var(--wa-meta); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 9px 14px;
  border: 0; border-radius: 10px; font-weight: 650; font-size: 14px; line-height: 1.2; text-decoration: none; text-align: center;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn svg { width: 17px; height: 17px; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary { background: var(--wa-green); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--wa-green-hover); }
.btn.primary:disabled { background: var(--wa-disabled); color: rgba(255, 255, 255, .92); }
.btn.ghost { background: transparent; color: var(--wa-chip-ink); box-shadow: inset 0 0 0 1.5px var(--card-line); }
.btn.ghost:hover:not(:disabled) { background: rgba(22, 161, 116, .08); }
.btn.ghost:disabled { opacity: .45; }
.btn.block { width: 100%; }
.btn.sm { min-height: 34px; padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--wa-ink); font-size: 12.5px; font-weight: 650; }
.chip svg { width: 13px; height: 13px; }
.bubble .chip { background: rgba(0, 0, 0, .05); }
.bubble .chip { background: rgba(127, 127, 127, .12); }

/* Catalogue */
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-item { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--card-line); transition: background .2s; }
.cat-item.is-picked { background: rgba(22, 161, 116, .07); }
.cat-ic { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; background: rgba(127, 127, 127, .1); font-size: 19px; }
.cat-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cat-name { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-sub { display: flex; gap: 8px; font-size: 12.5px; color: var(--wa-meta); }
.cat-price { color: var(--wa-ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.stepper { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 20px; background: rgba(127, 127, 127, .1); }
.step {
  width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--wa-in); color: var(--wa-chip-ink); font-size: 19px; font-weight: 700; line-height: 1; box-shadow: var(--shadow-1);
}
.step:disabled { opacity: .35; box-shadow: none; }
.qty { min-width: 22px; text-align: center; font-weight: 750; font-size: 14px; font-variant-numeric: tabular-nums; }
.cat-foot { display: flex; flex-direction: column; gap: 9px; padding: 10px 12px 8px; border-top: 1px solid var(--card-line); }
.cat-sum { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--wa-meta); }
.cat-total { color: var(--wa-ink); font-size: 16px; font-variant-numeric: tabular-nums; }

/* Cart (filled by the AI) */
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--card-line); }
.cart-line.is-new { animation: blockUpd 1.6s ease-out both; }
.cart-ic { width: 24px; flex: 0 0 auto; text-align: center; font-size: 17px; }
.cart-name { flex: 1; min-width: 0; font-size: 14px; color: var(--wa-ink); }
.cart-amt { font-weight: 650; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--wa-ink); }
.cart-foot { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 8px 12px 6px; border-top: 1px solid var(--card-line); }
.cart-row { font-size: 13px; color: var(--wa-meta); }
.cart-total { font-size: 15px; color: var(--wa-ink); }
.cart-empty { margin: 0; padding: 4px 12px 10px; color: var(--wa-meta); font-size: 14px; }

/* QR */
.qr { position: relative; overflow: hidden; padding: 14px 14px 2px; text-align: center; border-radius: 9px 9px 0 0; }
.ribbon {
  position: absolute; top: 15px; right: -36px; transform: rotate(45deg); padding: 4px 42px;
  background: #f0b400; color: #2b1d00; font-weight: 800; font-size: 11px; letter-spacing: .14em; box-shadow: 0 2px 6px rgba(0, 0, 0, .16);
}
.qr-amt { font-size: 27px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.qr-for { font-size: 13px; color: var(--wa-meta); }
.qr-box { position: relative; width: 186px; height: 186px; margin: 12px auto 10px; padding: 8px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px #e1e8e5; }
.qr-box svg { display: block; width: 100%; height: 100%; }
.qr-box.is-ph { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #f3f6f4 0 8px, #e9eeeb 8px 16px); }
.qr-ph { font-weight: 800; font-size: 30px; color: #8ea199; letter-spacing: .12em; }
.qr-stamp {
  position: absolute; inset: 0; border-radius: 14px; display: grid; place-content: center; justify-items: center; gap: 4px;
  background: rgba(255, 255, 255, .88); color: #0b8a58; font-weight: 800; font-size: 20px; animation: stamp .38s cubic-bezier(.2, .9, .3, 1.3) both;
}
.qr-stamp svg { width: 46px; height: 46px; }
@keyframes stamp { from { opacity: 0; transform: scale(1.25); } to { opacity: 1; transform: none; } }
.qr-demo { display: inline-block; margin: 0 auto 2px; padding: 3px 11px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-ink); font-size: 12.5px; font-weight: 700; }
.qr-hint { margin: 4px 0 10px; font-size: 12.5px; color: var(--wa-meta); }
.qr-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 10px; }
.qr-note { margin: 0 0 10px; padding: 7px 10px; border-radius: 8px; background: var(--wa-sys); color: var(--wa-sys-ink); font-size: 12.5px; text-align: left; }

/* Slots */
.slots { padding-bottom: 8px; }
.day-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 2px 12px 8px; }
.day-tab { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 4px; border: 0; border-radius: 10px; background: rgba(127, 127, 127, .1); color: var(--wa-ink); }
.day-tab[aria-selected="true"] { background: var(--wa-head); color: #fff; }
.day-tab:disabled { opacity: .45; }
.dt-top { font-size: 12px; font-weight: 650; opacity: .85; }
.dt-date { font-size: 14.5px; font-weight: 750; }
.slot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 2px 12px 10px; }
.slot {
  min-height: 46px; border: 0; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: transparent; color: var(--wa-chip-ink); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--card-line); transition: background .15s;
}
.slot:hover:not(:disabled) { background: rgba(22, 161, 116, .08); }
.slot[aria-pressed="true"] { background: var(--wa-green); color: #fff; box-shadow: none; }
.slot.is-booked { color: var(--wa-meta); background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(127, 127, 127, .08) 6px 12px); }
.slot.is-booked .slot-time { text-decoration: line-through; }
.slot.is-booked.is-past .slot-time { text-decoration: none; opacity: .6; } /* passed, not booked: no strike */
.slot-tag { font-size: 11px; font-weight: 550; }
.slots > .btn.block { width: calc(100% - 24px); margin: 0 12px; }

/* Booking */
.bk { padding: 12px 12px 8px; }
.bk-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 6px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-ink); font-size: 12.5px; font-weight: 750; }
.bk-badge svg { width: 15px; height: 15px; }
.bk-row { display: flex; gap: 12px; margin: 10px 0 12px; }
.bk-date { flex: 0 0 auto; width: 58px; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; text-align: center; background: var(--wa-in); box-shadow: inset 0 0 0 1px var(--card-line); }
.bk-mon { padding: 3px 0; background: #d64a3b; color: #fff; font-size: 11.5px; font-weight: 750; }
.bk-day { padding-top: 2px; font-size: 25px; font-weight: 750; line-height: 1.1; }
.bk-wd { padding-bottom: 5px; font-size: 11.5px; color: var(--wa-meta); }
.bk-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bk-title { font-weight: 700; line-height: 1.3; }
.bk-line { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--wa-meta); }
.bk-line svg { width: 15px; height: 15px; margin-top: 1px; }
.bk-acts { display: grid; gap: 8px; }

/* Listings */
.lst-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 12px 10px; scrollbar-width: none; overscroll-behavior-x: contain; }
.lst-row::-webkit-scrollbar { display: none; }
.lst-card { flex: 0 0 76%; scroll-snap-align: start; overflow: hidden; border-radius: 12px; background: var(--wa-in); box-shadow: inset 0 0 0 1px var(--card-line); }
.lst-art { position: relative; height: 104px; }
.lst-art svg { display: block; width: 100%; height: 100%; }
.lst-tag { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; font-weight: 650; }
.lst-body { padding: 9px 11px 11px; }
.lst-price { font-weight: 750; font-size: 16px; font-variant-numeric: tabular-nums; }
.lst-title { font-weight: 650; font-size: 13.5px; }
.lst-meta, .lst-loc { font-size: 12.5px; color: var(--wa-meta); }
.lst-loc { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.lst-loc svg { width: 13px; height: 13px; }

/* Resume profile */
.prof { padding: 12px 13px 6px; }
.prof-top { display: flex; align-items: center; gap: 11px; }
.prof-av { width: 46px; height: 46px; font-size: 16px; background: #6f58c9; }
.prof-name { font-weight: 750; font-size: 16px; }
.prof-edu { font-size: 13px; color: var(--wa-meta); }
.prof-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.prof-skills { display: flex; flex-wrap: wrap; gap: 5px; }
.skill { padding: 3px 8px; border-radius: 6px; background: rgba(22, 161, 116, .11); color: var(--wa-chip-ink); font-size: 12.5px; font-weight: 650; }
.prof-roles { font-size: 13.5px; }

/* Jobs */
.jobs { padding-bottom: 4px; }
.jobs > .card-head { padding-bottom: 6px; }
.job { margin: 0 10px 8px; padding: 10px 11px; border-radius: 11px; box-shadow: inset 0 0 0 1px var(--card-line); }
.jobs > .job:first-child { margin-top: 10px; }
.job-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.job-title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.job-pct { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-ink); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.job-co { font-size: 13px; }
.job-meta { font-size: 12.5px; color: var(--wa-meta); }
.job-why { margin-top: 6px; padding-left: 8px; border-left: 2px solid rgba(22, 161, 116, .45); font-size: 12.5px; }
.job-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.job-status { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 13px; font-weight: 700; }
.job-status svg { width: 16px; height: 16px; }
.job-status.is-busy { color: var(--wa-meta); }
.job-status.is-done { color: var(--ok-ink); animation: chipIn .25s ease-out both; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.job-rej { margin: 2px 10px 8px; padding-top: 2px; border-top: 1px dashed var(--card-line); }
.rej-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.rej-main { min-width: 0; }
.rej-title { font-size: 13px; font-weight: 650; color: var(--wa-meta); }
.rej-co { font-size: 12px; color: var(--wa-meta); }
.rej-why { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; background: var(--bad-bg); color: var(--bad-ink); font-size: 11.5px; font-weight: 700; white-space: nowrap; }

/* Inline form */
.fcard { display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 6px; }
.f-title { font-weight: 650; font-size: 14.5px; line-height: 1.35; }
.f-row { position: relative; display: flex; flex-direction: column; gap: 4px; }
.f-label { font-size: 12.5px; font-weight: 700; color: var(--wa-meta); }
.f-input {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 10px; resize: vertical;
  background: rgba(127, 127, 127, .08); box-shadow: inset 0 0 0 1px var(--card-line); color: var(--wa-ink); font-size: 16px;
}
.f-input::placeholder { color: var(--wa-meta); opacity: .8; }
.f-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--wa-green); }
.f-input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #d4483a; }
.f-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.f-chip { border: 0; padding: 7px 12px; border-radius: 999px; background: rgba(127, 127, 127, .08); box-shadow: inset 0 0 0 1px var(--card-line); color: var(--wa-ink); font-size: 13.5px; font-weight: 650; }
.f-chip[aria-checked="true"] { background: var(--wa-green); color: #fff; box-shadow: none; }
.f-count { align-self: flex-end; font-size: 11.5px; color: var(--wa-meta); font-variant-numeric: tabular-nums; }
.f-err { font-size: 12.5px; font-weight: 650; color: #c8402f; }
.f-note { margin: 0; font-size: 12px; line-height: 1.4; color: var(--wa-meta); }
.f-done { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 13.5px; }
.f-done dt { font-size: 12.5px; color: var(--wa-meta); }
.f-done dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.f-ok { display: inline-flex; align-items: center; gap: 5px; color: var(--ok-ink); font-size: 13px; font-weight: 750; }
.f-ok svg { width: 16px; height: 16px; }

/* Upload */
.upl { padding: 12px 12px 6px; }
.upl-drop {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px; border: 0; border-radius: 12px;
  background: rgba(127, 127, 127, .07); outline: 2px dashed var(--card-line); outline-offset: -6px; transition: background .15s;
}
.upl-drop:hover, .upl-drop.is-over { background: rgba(22, 161, 116, .09); }
.upl-big { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--wa-green); color: #fff; margin-bottom: 2px; }
.upl-big svg { width: 22px; height: 22px; }
.upl-cta { font-weight: 750; color: var(--wa-chip-ink); }
.upl-hint { font-size: 12px; color: var(--wa-meta); }
.upl-doc { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: rgba(127, 127, 127, .08); }
.upl-ic { width: 38px; height: 44px; border-radius: 6px; display: grid; place-items: center; background: #d64a3b; color: #fff; }
.upl-ic svg { width: 22px; height: 22px; }
.upl-info { flex: 1; min-width: 0; }
.upl-name { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upl-size { font-size: 12px; color: var(--wa-meta); }
.upl-ok { color: var(--ok-ink); display: grid; }
.upl-ok svg { width: 22px; height: 22px; }

/* ---------- Owner's view ---------- */
.owner-panel { display: flex; flex-direction: column; background: var(--surface); }
.op-head { padding: 20px 22px 0; border-bottom: 1px solid var(--line); }
.op-title-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.op-titles { min-width: 0; }
.op-title { margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -.015em; line-height: 1.25; }
.op-sub { display: flex; align-items: center; gap: 7px; margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.segs {
  display: flex; gap: 2px; width: max-content; max-width: 100%; margin: 16px 0; padding: 3px; overflow-x: auto; scrollbar-width: none;
  border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}
.segs::-webkit-scrollbar { display: none; }
.seg { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 650; font-size: 13.5px; white-space: nowrap; transition: background .15s, color .15s; }
.seg:hover { color: var(--ink); }
.seg[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }
.seg-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; background: #e0453a; color: #fff; font-size: 11px; font-weight: 750; animation: badge .4s cubic-bezier(.2, .9, .3, 1.4) both; }
@keyframes badge { from { transform: scale(.4); } to { transform: none; } }
.op-body { flex: 1; min-height: 0; overflow: auto; padding: 18px 22px 22px; }

.op-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 44ch; margin: 0 auto; padding: 30px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.op-empty p { margin: 0; }
.op-empty-art svg { display: block; width: 120px; height: 84px; }
.op-empty-art .ea { fill: var(--op-empty-a); }
.op-empty-art .eb { fill: none; stroke: var(--op-empty-b); stroke-width: 2; }
.op-empty-art .ec { fill: var(--op-empty-c); }
.op-empty.is-overlay { position: absolute; inset: 60px 0 0; justify-content: center; max-width: none; background: var(--surface-veil); }

.sheet-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sheet-file { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sheet-ic svg { display: block; width: 28px; height: 28px; }
.sheet-names { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.sheet-name { font-weight: 700; font-size: 14.5px; }
.sheet-live { padding: 2px 7px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-ink); font-size: 11.5px; font-weight: 750; }
.sheet-dl { display: flex; flex-wrap: wrap; gap: 6px; }
.op-body .btn.ghost { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.op-body .btn.ghost:hover:not(:disabled) { background: var(--surface-2); }
.sheet-sub { margin: 22px 0 10px; font-size: 14.5px; font-weight: 700; }

.grid-wrap { position: relative; overflow: hidden; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--sheet-line); }
.grid-scroll { overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.grid th, .grid td { height: 35px; padding: 6px 10px; text-align: left; white-space: nowrap; border-right: 1px solid var(--sheet-line); border-bottom: 1px solid var(--sheet-line); }
.grid tr > :last-child { border-right: 0; }
.grid tbody tr:last-child > * { border-bottom: 0; }
.grid .letters th { height: 24px; padding: 3px; background: var(--sheet-head); color: var(--muted); font-size: 11.5px; font-weight: 550; text-align: center; }
.grid .hdr th { background: var(--surface-2); color: var(--ink); font-weight: 700; }
.grid .rn { width: 40px; min-width: 40px; padding: 3px; text-align: center; background: var(--sheet-rn); color: var(--muted); font-size: 11.5px; font-weight: 550; }
.grid tbody td { color: var(--ink); }
.grid-wrap.is-plain .grid th, .grid-wrap.is-plain .grid td { height: auto; padding: 6px 9px; }

.row-new > td:not(.rn) { animation: rowIn 2s ease-out both; animation-delay: inherit; }
.row-new > td.rn { animation: rowInRn 2s ease-out both; animation-delay: inherit; }
.row-upd > td:not(.rn) { animation: rowUpd 1.6s ease-out both; animation-delay: inherit; }
@keyframes rowIn { 0% { opacity: 0; transform: translateY(-8px); background: var(--hl); } 12% { opacity: 1; transform: none; } 65% { background: var(--hl); } 100% { background: transparent; } }
@keyframes rowInRn { 0% { opacity: 0; transform: translateY(-8px); } 12% { opacity: 1; transform: none; } 100% { opacity: 1; } }
@keyframes rowUpd { 0%, 45% { background: var(--hl); } 100% { background: transparent; } }
li.row-new, div.row-new, article.row-new { animation: blockIn 2s ease-out both; }
li.row-upd, div.row-upd { animation: blockUpd 1.6s ease-out both; }
@keyframes blockIn { 0% { opacity: 0; transform: translateY(-6px); outline: 3px solid var(--hl); } 12% { opacity: 1; transform: none; } 65% { outline: 3px solid var(--hl); } 100% { outline: 3px solid transparent; } }
@keyframes blockUpd { 0%, 45% { outline: 3px solid var(--hl); } 100% { outline: 3px solid transparent; } }

.pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill.hot { background: var(--hot-bg); color: var(--hot-ink); }
.pill.warm { background: var(--warm-bg); color: var(--warm-ink); }
.pill.cold { background: var(--cold-bg); color: var(--cold-ink); }
.pill.neutral { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }

.pay-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.stat-label { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.stat-val { font-size: 23px; font-weight: 750; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.stat.ok .stat-val { color: var(--ok-ink); }
.stat.warn .stat-val { color: var(--warn-ink); }
.pay-list, .agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pay-row, .ag-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.pay-ic { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.pay-ic svg { width: 20px; height: 20px; }
.pay-main, .ag-main { flex: 1; min-width: 0; }
.pay-amt { font-weight: 750; font-variant-numeric: tabular-nums; }
.pay-meta { font-size: 12.5px; color: var(--muted); }

.cal-title { margin-bottom: 10px; font-weight: 700; font-size: 14px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 16px; }
.wk-day { min-height: 136px; display: flex; flex-direction: column; gap: 5px; padding: 8px 5px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.wk-day.is-today { box-shadow: inset 0 0 0 1.5px var(--brand); }
.wk-wd { font-size: 11.5px; font-weight: 650; color: var(--muted); text-align: center; }
.wk-num { margin-bottom: 2px; font-size: 17px; font-weight: 750; text-align: center; }
.wk-ev { display: flex; flex-direction: column; overflow: hidden; padding: 4px 5px; border-radius: 7px; background: var(--brand); color: #fff; font-size: 11px; line-height: 1.25; }
.wk-time { font-weight: 750; }
.wk-who { opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-row { align-items: flex-start; }
.ag-date { width: 46px; flex: 0 0 auto; display: flex; flex-direction: column; overflow: hidden; border-radius: 10px; text-align: center; box-shadow: inset 0 0 0 1px var(--line); }
.ag-mon { padding: 2px 0; background: #d64a3b; color: #fff; font-size: 11px; font-weight: 750; }
.ag-day { padding: 2px 0 3px; font-size: 19px; font-weight: 750; }
.ag-title { font-weight: 700; }
.ag-meta, .ag-who { font-size: 13px; color: var(--muted); }

.mail-card { overflow: hidden; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mail-subj { margin: 0; padding: 16px 18px 10px; font-size: 18px; font-weight: 750; letter-spacing: -.015em; line-height: 1.3; }
.mail-hdr { display: flex; align-items: center; gap: 10px; padding: 0 18px 12px; border-bottom: 1px solid var(--line); }
.mail-who { flex: 1; min-width: 0; font-size: 13px; }
.mail-addr, .mail-to, .mail-time { color: var(--muted); }
.mail-to, .mail-time { font-size: 12.5px; }
.mail-body { padding: 14px 18px 18px; font-size: 14px; }
.mail-body p { margin: 0 0 8px; }
.mail-lines { margin: 0 0 14px; padding-left: 20px; }
.mail-lines li { margin: 3px 0; }
.mail-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.mail-body .mail-foot { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---------- In-app CTA (chat list + owner's view; base .btn-cta lives in landing.css) ---------- */
.privacy { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); max-width: 92ch; }
.list-foot .cta-q, .owner-foot .cta-q { margin-bottom: 10px; font-weight: 700; font-size: 15px; color: var(--ink); }
.list-foot .btn-cta, .owner-foot .btn-cta { width: 100%; justify-content: center; background: var(--accent); color: #fff; white-space: normal; }
.list-foot .privacy, .owner-foot .privacy { margin-top: 12px; }

.wire, .tabbar, .toast, .app-bar { display: none; }
.noscript { padding: 24px; text-align: center; }

/* ---------- Desktop: phone frame + owner panel side by side ---------- */
@media (min-width: 1024px) {
  .app { max-width: 1260px; margin: 0 auto; padding: 0 32px; }
  .stage {
    --dev-h: clamp(600px, calc(100dvh - 100px), 820px);
    display: grid; grid-template-columns: 400px 72px minmax(0, 1fr); align-items: start;
  }
  .device-col { display: flex; flex-direction: column; gap: 12px; }
  .device-caption { order: 2; }
  .device {
    width: 400px; height: var(--dev-h); padding: 11px; border-radius: 58px;
    background: linear-gradient(150deg, #34403c 0%, #0f1715 38%, #1b2522 100%);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .09), 0 0 0 1px rgba(0, 0, 0, .4), 0 44px 80px -34px rgba(9, 44, 36, .5), 0 18px 36px -20px rgba(0, 0, 0, .4);
  }
  .device::before, .device::after { content: ""; position: absolute; width: 3px; border-radius: 3px; background: #26302d; }
  .device::before { right: -3px; top: 190px; height: 70px; }
  .device::after { left: -3px; top: 150px; height: 96px; }
  .screen { border-radius: 47px; }
  .statusbar {
    flex: 0 0 auto; position: relative; display: flex; align-items: center; justify-content: space-between; height: 42px; padding: 2px 30px 0 36px;
    background: var(--wa-head); color: #fff; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums;
  }
  .sb-island { position: absolute; left: 50%; top: 10px; width: 98px; height: 27px; transform: translateX(-50%); border-radius: 20px; background: #000; }
  .sb-icons { display: inline-flex; align-items: center; gap: 6px; }
  .sb-icons svg { height: 11px; width: auto; fill: currentColor; }
  .list-head { padding-top: 6px; }
  .lh-sub, .list-intro, .list-foot { display: none; }
  .bubble { font-size: 14.4px; }
  .comp-input { font-size: 15px; }

  .wire { display: block; position: relative; align-self: center; height: 2px; margin: 0 12px; }
  .wire-line { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px); }
  .wire-line::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 6px solid var(--line); border-right: 0; }
  .wire-dot { position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--accent); opacity: 0; }
  .wire.pulse .wire-dot { animation: wire .75s ease-in both; }
  @keyframes wire { 0% { left: 0; opacity: 0; transform: scale(.6); } 20% { opacity: 1; transform: none; } 100% { left: calc(100% - 10px); opacity: 0; } }

  .owner { height: var(--dev-h); }
  /* Long text wraps so every column fits in the panel; short codes, numbers and pills stay on one line. */
  .grid th, .grid td { padding: 6px 7px; }
  .grid tbody td { white-space: normal; overflow-wrap: break-word; min-width: 52px; line-height: 1.35; }
  .grid tbody td.c-orderId, .grid tbody td.c-phone, .grid tbody td.c-total, .grid tbody td.c-applied,
  .grid tbody td.c-score, .grid tbody td.c-budget, .grid tbody td.c-area { white-space: nowrap; }
  .grid tbody td.c-items, .grid tbody td.c-skills, .grid tbody td.c-asked, .grid tbody td.c-title { min-width: 100px; }
  .grid .pill { white-space: normal; text-align: center; line-height: 1.25; }
  .owner-panel { height: 100%; overflow: hidden; border-radius: 22px; box-shadow: var(--shadow-panel), inset 0 0 0 1px var(--line); }
  .owner-foot { display: none; }
}

/* Narrow desktops (1024–1199 px): give the owner panel more room so every sheet column fits. */
@media (min-width: 1024px) and (max-width: 1199.98px) {
  .app { padding: 0 20px; }
  .stage { grid-template-columns: 400px 36px minmax(0, 1fr); }
  .wire { margin: 0 6px; }
  .op-head { padding: 18px 16px 0; }
  .op-body { padding: 14px 16px 18px; }
  .grid { font-size: 12.5px; }
}

/* ---------- Phone and tablet: full-height chat with a bottom tab bar ---------- */
@media (max-width: 1023.98px) {
  .app { display: none; }
  html.demo-open, html.demo-open body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  html.demo-open .lp-hide-in-demo, html.demo-open .demo-banner { visibility: hidden; }
  html.demo-open .app {
    position: fixed; left: 0; right: 0; top: var(--vv-top, 0); height: var(--app-h, 100dvh); z-index: 50;
    display: flex; flex-direction: column; overflow: hidden; background: var(--page);
  }
  .app-bar {
    flex: 0 0 auto; display: flex; align-items: center; gap: 6px; min-height: 52px;
    padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
    background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line);
  }
  .app-bar .icon-btn:hover { background: var(--surface-2); }
  .app-title { font-weight: 650; font-size: 15.5px; }
  .app-bar .lang-btn { padding: 5px 10px; font-size: 12.5px; }
  .demo-banner { margin: 0; border-radius: 0; }
  .device-caption, .wire { display: none; }
  .stage { position: relative; flex: 1; min-height: 0; }
  .device-col, .owner { position: absolute; inset: 0; }
  .device, .screen { height: 100%; }
  body[data-tab="owner"] .device-col { visibility: hidden; }
  body[data-tab="chat"] .owner { visibility: hidden; }
  .owner { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 12px 12px 0; background: var(--page); }
  .owner-panel { border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
  .op-head { padding: 16px 14px 0; }
  .op-title { font-size: 17.5px; }
  .segs { width: 100%; margin: 14px 0; }
  .seg { flex: 1 1 auto; justify-content: center; padding: 7px 8px; font-size: 12.5px; }
  .op-body { overflow: visible; padding: 14px; }
  .owner-foot { padding: 20px 4px 28px; }
  .wk-day { min-height: 110px; padding: 6px 3px; }
  .wk-ev { font-size: 10.5px; padding: 3px 4px; }
  .stat-val { font-size: 20px; }

  .tabbar {
    flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr; padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--line);
  }
  body.kbd .tabbar { display: none; }
  .tab { position: relative; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 700; }
  .tab svg { width: 52px; height: 28px; padding: 2px 14px; border-radius: 14px; transition: background .2s; }
  .tab[aria-selected="true"] { color: var(--brand); }
  .tab[aria-selected="true"] svg { background: var(--ok-bg); }
  .tab-badge { position: absolute; top: 5px; left: calc(50% + 10px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center; background: #e0453a; color: #fff; font-size: 11px; font-weight: 750; animation: badge .4s cubic-bezier(.2, .9, .3, 1.4) both; }

  .toast {
    position: absolute; left: 10px; right: 10px; top: calc(52px + env(safe-area-inset-top) + 8px); z-index: 30;
    display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-radius: 14px; text-align: left;
    background: #13302b; color: #fff; font-size: 14px; font-weight: 650; box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
  }
  .toast.is-in { animation: toastIn .32s cubic-bezier(.2, .9, .3, 1.15) both; }
  .toast-ic svg { display: block; width: 22px; height: 22px; color: #7fe0b6; }
  .toast-text { flex: 1; min-width: 0; }
  .toast-view { color: #7fe0b6; font-weight: 750; }
  @keyframes toastIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 380px) {
  .bubble.card { width: 92%; }
  .bubble.card-listings, .bubble.card-jobs { width: 96%; }
  .qr-box { width: 172px; height: 172px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .live-dot, .dots i, .hint-txt { animation: none !important; }
  .dots i { opacity: .7; }
  .spin { animation: none !important; border-right-color: currentColor; opacity: .5; }
}
