/* =========================================================================
   Reach design system (a product of OdotServices). Loaded after app.css and
   takes precedence over it.

   Home follows design/odot-reach-home. Inner pages share its language: white
   cards on cool grey, navy panels with a blue glow, Bricolage Grotesque for
   headings, Instrument Sans for everything else.
   ========================================================================= */

:root {
    --ink: #08223F;
    --ink2: #41506B;
    --mute: #6B7891;
    --line: #E2E7F0;
    --bg: #F3F6FA;
    --blue: #0074CC;
    --blue-h: #0A63AE;
    --brand: #0099F8;
    --sky: #E6F3FE;
    --violet: #6B3FD4;  --violet-bg: #F1ECFD;
    --amberish: #A05E00; --amber-bg: #FFF4E0;
    --ok-fg: #0B7E47;   --okbg: #E8F7EF;
    --bad: #D23A3A;     --badbg: #FDECEC;
    --gut: 24px;
    --tabbar: 66px;

    /* Tokens used by app.css */
    --paper: var(--bg);
    --surface: #FFFFFF;
    --surface-2: #F7F9FC;
    --muted: var(--ink2);
    --faint: var(--mute);
    --teal: var(--blue);
    --teal-600: var(--blue-h);
    --teal-soft: var(--sky);
    --amber: var(--blue);
    --amber-600: var(--blue-h);
    --amber-soft: var(--sky);
    --ok: #0E9F5A;
    --danger: var(--bad);
    --danger-soft: var(--badbg);
    --panel-bg: #FFFFFF;
    --panel-ink: var(--ink);
    --panel-dim: var(--ink2);
    --panel-line: var(--line);
    --radius: 20px;
    --radius-sm: 12px;
    --shadow-sm: none;
    --shadow: none;
    --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
    --f-body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
    --f-mono: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
    --f-code: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

:root { color-scheme: light; }
html { overflow-x: clip; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; overflow-x: clip; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.015em; }
a { color: var(--blue); }
code, pre, kbd, .varchip { font-family: var(--f-code); }
::selection { background: var(--blue); color: #fff; }
[hidden] { display: none !important; }
:where(a, button, input, select, textarea, summary, [tabindex], [contenteditable]):focus-visible { outline: 3px solid #7CCBFF; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.textlink { font-size: 14.5px; font-weight: 700; color: var(--blue); }
.linkbtn { padding: 0; border: 0; background: none; color: var(--blue); font: 700 13px var(--f-body); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* -------------------------------------------------------------------------
   Buttons and fields
   ------------------------------------------------------------------------- */
.btn { min-height: 44px; padding: 11px 18px; border-radius: 12px; font: 700 15px var(--f-body); transition: background .15s ease; }
.btn:hover { transform: none; box-shadow: none; }
.btn:active { transform: none; }
.btn--primary, .btn--amber { --btn-bg: var(--blue); --btn-fg: #fff; }
.btn--primary:hover, .btn--amber:hover { background: var(--blue-h); }
.btn--soft { --btn-bg: var(--sky); --btn-fg: var(--blue-h); border-color: transparent; }
.btn--soft:hover { background: #D5EBFD; }
.btn--ghost { --btn-fg: var(--ink); background: #fff; border-color: var(--line); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--sm { min-height: 36px; padding: 7px 13px; font-size: 14px; }

.form { gap: 1.1rem; }
.field { gap: .4rem; }
.field__label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field__opt { font-size: 13px; color: var(--mute); }
.field__hint { display: block; margin: 0; font-size: 13px; color: var(--mute); }
.field__hint:empty { display: none; }
.field input, .field textarea, .field select { min-height: 46px; font-size: 16px; font-family: var(--f-body); color: var(--ink); background-color: #fff; border: 1px solid #CFD8E6; border-radius: 12px; }
.field input:focus, .field textarea:focus, .field select:focus,
.compose--sms .field input:focus, .compose--sms .field textarea:focus, .compose--sms .field select:focus,
.compose--email .field input:focus, .compose--email .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--sky); outline: none; }
.field textarea { min-height: 140px; }
.reveal { min-height: 32px; right: .45rem; font: 600 13px var(--f-body); color: var(--ink2); background: var(--bg); border: 0; border-radius: 8px; }
.recipient-grid { gap: 14px; }
.note { margin: 0; padding: .65rem .85rem; border-radius: 12px; background: var(--sky); color: var(--blue-h); font-size: 14px; }
.note a { font-weight: 700; text-decoration: underline; }
.note--warn { background: var(--amber-bg); color: var(--amberish); }
.kicker { margin: 0 0 .25rem; font-size: 13px; font-weight: 600; color: var(--mute); }
.kicker--email, .kicker--sms { color: var(--mute); }

.status--sent { color: var(--ok-fg); background: var(--okbg); }
.status--failed { color: var(--bad); background: var(--badbg); }
.status--simulated, .status--partial, .sms-studio__badge--demo { color: var(--amberish); background: var(--amber-bg); }
.statuschip--warn, .compose__from--warn, .sms-studio__demo-note { color: var(--amberish); }
.db-banner { background: var(--amber-bg); border-color: #F1DDB6; color: var(--amberish); }

/* -------------------------------------------------------------------------
   Top bar, account menu, bottom tabs
   ------------------------------------------------------------------------- */
.app { display: block; min-height: 100vh; background: var(--bg); }
.chrome { position: sticky; top: 0; z-index: 20; display: block; padding: 0; background: #fff; border-bottom: 1px solid var(--line); color: var(--ink); }
.chrome__bar { position: relative; display: flex; align-items: center; gap: 22px; height: 68px; max-width: 1280px; margin: 0 auto; padding: 0 var(--gut); }

.brandmark { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--ink); white-space: nowrap; }
.brandmark:hover { text-decoration: none; }
.brandmark img { width: 32px; height: 32px; }
.brandmark__name { font: 800 22px var(--f-display); letter-spacing: -.5px; }
.brandmark__by { align-self: flex-end; margin: 0 0 5px -4px; font-size: 11.5px; font-weight: 500; color: var(--mute); }

.mainnav { display: flex; gap: 2px; margin-left: 6px; }
.mainnav a { padding: 9px 13px; border-radius: 10px; color: var(--ink2); font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.mainnav a:hover, .navghost:hover { background: #F1F5FA; text-decoration: none; }
.mainnav a[aria-current=page] { background: #EEF3F9; color: var(--ink); font-weight: 700; }

.chrome__end { position: static; display: flex; align-items: center; flex-direction: row; gap: 10px; margin: 0 0 0 auto; padding: 0; }
.navghost { display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 10px; color: var(--ink2); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.navghost--icon { width: 40px; height: 40px; justify-content: center; padding: 0; }
.avatar { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--ink); color: #fff; font: 700 14px var(--f-body); cursor: pointer; }

.account-menu { position: absolute; right: var(--gut); top: 62px; z-index: 30; min-width: 240px; padding: 8px; border-radius: 16px; background: #fff; box-shadow: 0 20px 50px rgba(8, 34, 63, .16), 0 0 0 1px var(--line); }
.account-menu a { display: flex; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-size: 14.5px; font-weight: 600; }
.account-menu a:hover { background: #F1F5FA; text-decoration: none; }
.account-menu__me { display: block; margin-bottom: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }
.account-menu__me b { display: block; color: var(--ink); font-weight: 600; }
.account-menu a.account-menu__out { color: var(--bad); }
.account-menu__narrow { display: none !important; }

.chrome__menu { display: none; }
.tabbar { display: none; }

.stage { flex: none; width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px var(--gut) 48px; }
.stage:has(.sms-studio), .stage:has(.mail-studio), .stage:has(.contacts), .stage:has(.compose) { max-width: 1280px; }

@media (max-width: 1180px) {
    .brandmark__by { display: none; }
    .mainnav a { padding: 9px 10px; }
}
@media (max-width: 1040px) {
    .mainnav a:nth-child(n+6) { display: none; }
    .account-menu__narrow { display: flex !important; }
}
@media (max-width: 860px) {
    :root { --gut: 16px; }
    .chrome__bar { height: 60px; }
    .brandmark__by { display: inline; }
    .mainnav, .chrome__api, .chrome__settings { display: none; }
    .stage { padding: 20px var(--gut) calc(var(--tabbar) + env(safe-area-inset-bottom) + 28px); }
    .account-menu { top: 56px; }

    .chrome__menu {
        position: fixed; left: 0; right: 0; top: auto;
        bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
        z-index: 25;
        display: none; flex-direction: column; flex: none; gap: 2px;
        width: auto; max-height: 70vh; margin: 0; padding: 10px;
        overflow-y: auto;
        background: #fff; border: 0; border-top: 1px solid var(--line);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -14px 40px rgba(8, 34, 63, .16);
    }
    .chrome.is-open .chrome__menu { display: flex; }
    .chrome__menu a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 12px; color: var(--ink); font-size: 16px; font-weight: 600; }
    .chrome__menu a:hover { text-decoration: none; background: #F1F5FA; }
    .chrome__menu a[aria-current=page] { background: var(--sky); color: var(--blue); }

    .tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        display: grid; grid-template-columns: repeat(5, 1fr);
        padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
        background: #fff; border-top: 1px solid var(--line);
    }
    .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--mute); font: 700 11.5px var(--f-body); cursor: pointer; }
    .tabbar a:hover { text-decoration: none; }
    .tabbar a > span, .tabbar button > span { display: flex; align-items: center; justify-content: center; width: 44px; height: 30px; border-radius: 999px; }
    .tabbar a[aria-current=page], .tabbar button.is-current, .tabbar button[aria-expanded=true] { color: var(--blue); }
    .tabbar a[aria-current=page] > span, .tabbar button.is-current > span, .tabbar button[aria-expanded=true] > span { background: var(--sky); }

    .flash-stack { margin-bottom: 14px; }
}

/* -------------------------------------------------------------------------
   Headings
   ------------------------------------------------------------------------- */
.hello { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.hello h1 { margin: 0; font: 800 38px/1.05 var(--f-display); letter-spacing: -1px; }
.hello p { margin: 6px 0 0; color: var(--ink2); font-size: 16.5px; }
.hello p b { color: var(--ink); font-weight: 600; }
.hello__date { color: var(--mute); font-size: 14px; }

/* Inner-page banner: the delivery panel's navy and glow, with the page's picture. */
.banner, .page-head {
    position: relative;
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-start; gap: 16px 56px;
    min-height: 168px;
    margin: 0 0 20px;
    padding: 28px 30px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--ink);
    color: #fff;
    isolation: isolate;
}
.banner::before, .page-head::before {
    content: ""; position: absolute; right: -60px; top: -110px; z-index: -1;
    width: 340px; height: 340px; border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 153, 248, .5), transparent 70%);
}
.banner::after, .page-head::after {
    content: ""; position: absolute; inset: 0 0 0 auto; z-index: -1;
    width: 54%;
    background-repeat: no-repeat; background-size: cover; background-position: center;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%);
            mask-image: linear-gradient(90deg, transparent, #000 55%);
}
.banner--team::after { background-image: url("../assets/reach-team.jpg"); background-position: 70% 30%; width: 62%; }
.banner--history::after { background-image: url("../assets/reach-success.jpg"); background-position: 60% 32%; }
.banner--contacts::after, .banner--templates::after, .banner--brand::after, .banner--api::after, .page-head--auto::after {
    inset: 6px 22px 6px auto; width: 34%; max-width: 380px; background-size: contain; background-position: right center;
    -webkit-mask-image: none; mask-image: none; opacity: .95;
}
.banner--contacts::after { background-image: url("../assets/reach-contacts.svg"); }
.banner--templates::after, .banner--api::after, .banner--brand::after { background-image: url("../assets/reach-dispatch.svg"); }
.page-head--auto::after { background-image: url("../assets/reach-dispatch.svg"); }

/* Text, stats and buttons stay left, so nothing ever sits on a face or a drawing. */
.banner > :not(.banner__art), .page-head > * { max-width: min(100%, 720px); }
.banner { padding-right: 42%; }
.page-head { padding-right: 34%; }
.page-head--auto { flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; }
.automation-hero { padding-right: 30px; }
.banner--templates { flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; }
.contacts > .banner, .templates > .banner, .team > .banner { margin-bottom: 0; }
.team__grid { margin-top: 20px; }
.banner__copy { max-width: 560px; }
.banner h1, .page-head h1 { margin: 0; max-width: none; color: #fff; font: 800 34px/1.08 var(--f-display); letter-spacing: -.9px; }
.banner p, .page-head > div > p:not(.kicker) { margin: 6px 0 0; color: #C6D5EA; font-size: 15.5px; }
.page-head > div > p b { color: #fff; }
.banner__stats { display: flex; gap: 8px 30px; margin: 0; }
.banner__stats div { display: flex; flex-direction: column-reverse; }
.banner__stats dt { color: #B9CBE6; font-size: 13px; }
.banner__stats dd { margin: 0; font: 800 28px/1.1 var(--f-display); letter-spacing: -.5px; }
.banner--contacts .banner__stats, .banner--team .banner__stats { position: relative; z-index: 1; }
.banner .btn--soft, .page-head .btn--soft { --btn-bg: rgba(255, 255, 255, .14); --btn-fg: #fff; }
.banner .btn--soft:hover, .page-head .btn--soft:hover { background: rgba(255, 255, 255, .24); }
.auto-actions { position: relative; z-index: 1; }
.page-head > div, .page-head > a, .page-head > button, .page-head > form { position: relative; z-index: 1; }
.page-head .kicker { color: #B9CBE6; }

/* -------------------------------------------------------------------------
   Home
   ------------------------------------------------------------------------- */
.home-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 20px; align-items: start; }
.home-grid > * { min-width: 0; }
.composer { background: #fff; border-radius: 24px; box-shadow: 0 0 0 1px var(--line), 0 20px 40px rgba(8, 34, 63, .05); }
.cmp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.cmp-seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg); }
.cmp-seg button { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border: 0; border-radius: 9px; background: transparent; color: var(--mute); font: 700 15px var(--f-body); cursor: pointer; }
.cmp-seg button[aria-selected=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(8, 34, 63, .12); }
.cmp-template { position: relative; color: var(--blue); font-size: 14.5px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.cmp-template select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.cmp-template:has(select:focus-visible) { outline: 3px solid #7CCBFF; outline-offset: 3px; border-radius: 4px; }
.cmp-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 22px 8px; }
.cmp-row { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 40px; padding-bottom: 10px; border-bottom: 1px solid #EEF2F7; }
.cmp-label { width: 74px; flex-shrink: 0; color: var(--mute); font-size: 14px; font-weight: 600; }
.cmp-val { font-size: 15px; font-weight: 600; }
.cmp-hint { color: var(--mute); font-size: 14px; overflow-wrap: anywhere; }
.cmp-hint:empty { display: none; }
.cmp-row input { flex: 1; min-width: 140px; padding: 4px 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 400 15px var(--f-body); }
.cmp-row input::placeholder, .cmp-textarea::placeholder { color: var(--mute); }
.cmp-select { flex: 1; min-width: 140px; max-width: 280px; padding: 4px 22px 4px 0; border: 0; background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2341506B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right center; color: var(--ink); font: 600 15px var(--f-body); appearance: none; cursor: pointer; }
.cmp-select--wide { max-width: none; }
.cmp-help { margin: -4px 0 0 86px; color: var(--mute); font-size: 13px; line-height: 1.45; }
.cmp-help--warn, .field__hint--warn { color: var(--amberish); }
.cmp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: 999px; background: var(--sky); color: var(--blue); font-size: 13.5px; font-weight: 700; }
.cmp-chip button { padding: 0 2px; border: 0; background: transparent; color: var(--blue); font-size: 15px; line-height: 1; cursor: pointer; }
.cmp-suggest { position: absolute; left: 86px; right: 0; top: 100%; z-index: 15; margin: 2px 0 0; padding: 6px; list-style: none; border-radius: 14px; background: #fff; box-shadow: 0 20px 50px rgba(8, 34, 63, .16), 0 0 0 1px var(--line); }
.cmp-suggest li { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.cmp-suggest li:hover, .cmp-suggest li[aria-selected=true] { background: #F1F5FA; }
.cmp-suggest b { font-size: 14.5px; font-weight: 600; }
.cmp-suggest small { color: var(--mute); font-size: 13px; }

.cmp-message { gap: 0; }
.cmp-message .editor { border: 0; border-radius: 0; background: transparent; overflow: visible; }
.cmp-message .editor:focus-within { border: 0; box-shadow: none; }
.cmp-message .editor__area { min-height: 170px; max-height: 420px; padding: 6px 0; font-size: 15.5px; line-height: 1.55; }
.cmp-message .editor__area:empty::before { color: var(--mute); }
.cmp-textarea { width: 100%; min-height: 150px; padding: 6px 0; border: 0; outline: none; resize: vertical; background: transparent; color: var(--ink); font: 400 15.5px/1.55 var(--f-body); }
.cmp-count { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; color: var(--mute); font-size: 13.5px; }
.cmp-count.is-over { color: var(--bad); }
.cmp-files { margin: 0; }
.sms-note { margin: 0; color: var(--amberish); font-size: 13px; }
.sms-note .linkbtn { margin-left: .3rem; color: var(--blue); }
.cmp-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 20px; background: #FAFBFD; border-top: 1px solid var(--line); border-radius: 0 0 24px 24px; }
.cmp-attach { position: relative; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink2); cursor: pointer; }
.cmp-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cmp-attach:has(input:focus-visible) { outline: 3px solid #7CCBFF; outline-offset: 2px; }
.cmp-note { color: var(--mute); font-size: 13.5px; }
.cmp-err { color: var(--bad); font-size: 13.5px; font-weight: 600; }
.cmp-acts { display: flex; gap: 8px; margin-left: auto; }

.home-side { display: flex; flex-direction: column; gap: 20px; }
.delivery { position: relative; overflow: hidden; padding: 22px 24px; border-radius: 24px; background: var(--ink); color: #fff; }
.delivery::before { content: ""; position: absolute; right: -70px; top: -90px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 153, 248, .45), transparent 70%); }
.delivery > * { position: relative; }
.delivery__top { display: flex; align-items: baseline; justify-content: space-between; color: #B9CBE6; font-size: 15px; font-weight: 600; }
.delivery__top small { color: #8FA6C4; font-size: 13px; font-weight: 500; }
.delivery__big { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.delivery__big b { font: 800 54px/1 var(--f-display); letter-spacing: -2px; }
.delivery__big span { color: #B9CBE6; }
.delivery__bar { display: flex; gap: 2px; height: 10px; margin-top: 16px; overflow: hidden; border-radius: 6px; background: rgba(255, 255, 255, .12); }
.delivery__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.delivery__stats span { display: flex; align-items: center; gap: 6px; color: #B9CBE6; font-size: 13px; }
.delivery__stats i { width: 8px; height: 8px; border-radius: 2px; }
.delivery__stats b { font: 800 26px var(--f-display); letter-spacing: -.5px; }

.fail-alert { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1.5px #F6C9C9; color: var(--ink); font-family: var(--f-body); text-align: left; cursor: pointer; }
.fail-alert__ic { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--badbg); color: var(--bad); }
.fail-alert b { display: block; font-size: 15px; }
.fail-alert small { color: var(--ink2); font-size: 13.5px; }
.fail-alert__go { margin-left: auto; color: var(--bad); font-size: 14px; font-weight: 700; }

.qtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qtile { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); transition: transform .15s, box-shadow .15s; }
.qtile:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line), 0 14px 30px rgba(8, 34, 63, .08); text-decoration: none; }
.qtile__ic { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; }
.qtile b { display: block; font-size: 15px; }
.qtile small { color: var(--mute); font-size: 13px; }

/* Activity (Home and History) */
.activity { margin-top: 20px; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.activity__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.activity__head h2 { margin: 0; font: 800 22px var(--f-display); letter-spacing: -.4px; }
.feed-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.feed-filters button, .feed-filters a { padding: 7px 13px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink2); font: 700 13.5px var(--f-body); cursor: pointer; }
.feed-filters a:hover { text-decoration: none; background: #F1F5FA; }
.feed-filters button[aria-pressed=true], .feed-filters a[aria-current=page] { background: var(--ink); color: #fff; box-shadow: none; }
.feed-filters [data-feed-filter=failed] { color: var(--bad); }
.feed-filters [data-feed-filter=failed][aria-pressed=true] { background: var(--bad); color: #fff; }
.feed-day { padding-bottom: 4px; }
.feed-day__label { padding: 12px 24px 4px; color: var(--mute); font-size: 13px; font-weight: 700; }
.feed-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 24px; border: 0; background: transparent; color: var(--ink); font-family: var(--f-body); text-align: left; cursor: pointer; }
.feed-row:hover { background: #FAFCFF; }
.feed-row:focus-visible { outline-offset: -3px; }
.feed-ic { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; }
.feed-ic.is-email { background: var(--sky); color: var(--blue); }
.feed-ic.is-sms { background: var(--okbg); color: #0E9F5A; }
.feed-ic.is-bad { background: var(--badbg); color: var(--bad); }
.feed-main { flex: 1; min-width: 0; }
.feed-title { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.feed-title b { font-size: 15px; overflow-wrap: anywhere; }
.feed-title small { color: var(--mute); font-size: 12.5px; }
.feed-preview { display: block; margin-top: 2px; overflow: hidden; color: var(--ink2); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.feed-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.feed-pill { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.feed-pill.is-ok { background: var(--okbg); color: var(--ok-fg); }
.feed-pill.is-bad { background: var(--badbg); color: var(--bad); }
.feed-time { color: var(--mute); font-size: 12.5px; }
.feed-chev { flex-shrink: 0; color: #9AA7B8; transition: transform .2s; }
.feed-row[aria-expanded=true] .feed-chev { transform: rotate(180deg); }
.feed-detail { margin: 0 24px 12px 78px; padding: 4px 0 4px 16px; border-left: 2px solid var(--line); color: var(--ink2); font-size: 14px; }
.feed-detail p { margin: 6px 0; overflow-wrap: anywhere; }
.feed-reason { color: var(--bad); }
.feed-recipient { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; overflow-wrap: anywhere; }
.feed-recipient .is-ok { color: #0E9F5A; font-weight: 700; }
.feed-recipient .is-bad { color: var(--bad); font-weight: 700; }
.feed-more { color: var(--mute); font-size: 13px; }
.feed-detail .btn { margin-top: 8px; }
.feed-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 24px; color: var(--mute); text-align: center; }
.feed-empty p { margin: 0; }
.feed-empty img { width: 120px; height: 90px; object-fit: cover; border-radius: 16px; }
.activity__foot { padding: 14px 24px 18px; border-top: 1px solid var(--line); }

/* Older compact list, still used beside the composers */
.log { border: 0; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.log__head { padding: 14px 18px; background: none; border-bottom: 1px solid var(--line); }
.log__head h3 { color: var(--ink); font: 700 16px var(--f-display); }
.log__count { display: none; }
.log__empty { padding: 18px; color: var(--mute); }
.log__list .logrow { position: relative; grid-template-columns: minmax(0, 1fr); padding: 10px 44px 10px 18px; }
.logrow__chan { display: none; }
.logrow__to { font-size: 14px; font-weight: 600; }
.logrow__link:hover .logrow__to, .logrow--sms .logrow__link:hover .logrow__to { color: var(--blue); }
.logrow__subj { font-size: 13.5px; }
.logrow__meta { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
.logrow__status, .logrecip__status { padding: 2px 9px; font-size: 12px; font-weight: 700; text-transform: capitalize; }
.logrow__time { color: var(--mute); font-size: 12.5px; }
.logrow__toggle { grid-column: auto; position: absolute; top: 6px; right: 4px; justify-content: center; width: 38px; height: 38px; margin: 0; padding: 0; border-radius: 10px; color: #9AA7B8; }
.logrow__toggle:hover { background: #F1F5FA; }
.logrow__toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.logrecip__audit small { color: var(--mute); font-size: 12px; }

/* -------------------------------------------------------------------------
   Compose pages
   ------------------------------------------------------------------------- */
.sms-studio, .mail-studio { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.sms-studio__main, .mail-studio__main { display: block; min-width: 0; }
.sms-studio__composer, .mail-studio__composer { padding: 24px; border: 0; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 20px 40px rgba(8, 34, 63, .05); }
.sms-studio__aside, .mail-studio__aside { position: sticky; top: 88px; display: grid; gap: 16px; }
.sms-meter { display: inline-flex; align-items: baseline; gap: .7rem; font-weight: 400; }
.sms-meter__seg { padding: 0; background: none; border: 0; color: var(--blue); font-size: 13px; font-weight: 700; }
.counter { color: var(--mute); font-size: 13px; font-variant-numeric: tabular-nums; }
.sendbar { margin-top: 4px; }
.btn--send { min-width: 170px; }
.ai-fold { padding-top: 12px; border-top: 1px solid var(--line); }
.ai-fold summary { color: var(--blue); font-size: 14.5px; font-weight: 700; cursor: pointer; }
.ai-fold .ai-assistant { margin: 10px 0 0; padding: 0; border: 0; background: none; }
.mail-studio__advanced { border: 0; border-radius: 0; background: none; }
.mail-studio__advanced summary { padding: 0; color: var(--blue); font-size: 14.5px; font-weight: 700; }
.mail-studio__advanced summary::before { content: none; }
.mail-studio__advanced .recipient-grid { padding: 0; }
.attachment-box { border: 1px solid var(--line); border-radius: 16px; background: #FAFBFD; }
.attachment-box__icon { color: var(--blue); background: var(--sky); }

.unit-card { position: relative; overflow: hidden; padding: 20px 22px; border-radius: 24px; background: var(--ink); color: #fff; }
.unit-card::before { content: ""; position: absolute; right: -60px; top: -80px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 153, 248, .5), transparent 70%); }
.unit-card > * { position: relative; display: block; }
.unit-card span { color: #B9CBE6; font-size: 14px; font-weight: 600; }
.unit-card b { font: 800 44px/1.1 var(--f-display); letter-spacing: -1.4px; }
.unit-card small { color: #8FA6C4; font-size: 13px; }
.unit-card.is-empty small { color: #FF9C9C; }

.photo-card { margin: 0; overflow: hidden; border-radius: 24px; background: var(--ink); color: #fff; }
.photo-card img { display: block; width: 100%; height: 190px; object-fit: cover; object-position: 60% 30%; }
.photo-card figcaption { padding: 14px 18px 16px; color: #C6D5EA; font-size: 14px; }
.photo-card code { color: #fff; font-size: 13px; }

.sms-preview { margin: 0; justify-items: stretch; }
.sms-preview figcaption { display: none; }
.sms-preview__phone { max-width: none; padding: 14px; border: 0; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.sms-preview__speaker { display: none; }
.sms-preview__screen { border-radius: 16px; background: var(--bg); }
.sms-preview__bar { background: none; border-bottom-color: var(--line); }
.sms-preview__avatar { background: var(--brand); color: #fff; }
.sms-preview__meta b { color: var(--ink); }
.sms-preview__meta small { color: var(--mute); font-size: 12px; }
.sms-preview__thread { align-items: flex-start; }
.sms-preview__bubble { border-radius: 16px 16px 16px 4px; background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line); font-size: 14px; }
.sms-preview__bubble.is-empty { background: transparent; color: var(--mute); box-shadow: none; }

/* -------------------------------------------------------------------------
   Other pages
   ------------------------------------------------------------------------- */
.contacts, .templates { gap: 20px; }
.contacts__grid { gap: 20px; }
.books, .book-panel, .team__create, .team__list, .auto-panel, .tpl-browser, .tpl-card, .brand-card, .brand-form-card, .builder-block { border: 0; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.books { top: 88px; }
.book-item { border-radius: 14px; }
.book-panel__owner b { margin-left: .28em; }

.history { max-width: none; display: block; }
.pager { margin-top: 16px; }
.pager__info { color: var(--mute); font-size: 13px; }
.pager__btn, .pager__num { min-width: 40px; height: 40px; border-radius: 12px; }
.pager__num.is-active, .pager__num.is-active:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.team { max-width: none; }
.team__grid { gap: 20px; }
.team__create, .team__list { padding: 24px; }
.team h2 { font-size: 1.2rem; }
.memberrow__avatar { border-radius: 50%; background: var(--ink); color: #fff; }

/* Templates: colour-coded occasions, echoing Home's shortcuts */
.templates__vars { margin: 0; }
.templates__vars summary { color: var(--blue); font-size: 14.5px; font-weight: 700; cursor: pointer; }
.templates__var-chips { margin-top: 10px; }
.tpl-browser { padding: 22px; }
.tpl-browser__head { align-items: center; padding-bottom: 14px; margin-bottom: 14px; }
.tpl-browser__head h2 { font: 800 22px var(--f-display); letter-spacing: -.4px; }
.templates__tabs { padding: 3px; border: 0; border-radius: 12px; background: var(--bg); }
.templates__tab { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--mute); }
.templates__tab.is-active, .templates__tab.is-active:hover { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(8, 34, 63, .12); }
.tpl-categories { gap: 12px; }
.tpl-category { grid-template-columns: 42px minmax(0, 1fr); min-height: 70px; border: 0; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s, box-shadow .15s; }
.tpl-category:hover { transform: translateY(-2px); background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 14px 30px rgba(8, 34, 63, .08); }
.tpl-category.is-active { background: var(--sky); box-shadow: inset 0 0 0 1.5px var(--blue); }
.tpl-category__count { display: none; }
.tpl-category__icon { border: 0; }
.tpl-category:nth-child(4n+1) .tpl-category__icon { background: var(--sky); color: var(--blue); }
.tpl-category:nth-child(4n+2) .tpl-category__icon { background: var(--violet-bg); color: var(--violet); }
.tpl-category:nth-child(4n+3) .tpl-category__icon { background: var(--amber-bg); color: var(--amberish); }
.tpl-category:nth-child(4n+4) .tpl-category__icon { background: var(--okbg); color: var(--ok-fg); }
.tpl-card { border-left: 0; padding: 18px; }
.tpl-card:hover { box-shadow: 0 0 0 1px var(--line), 0 14px 30px rgba(8, 34, 63, .08); }
.tpl-card__chan, .tpl-card--sms .tpl-card__chan { border-radius: 999px; padding: 2px 9px; background: var(--sky); color: var(--blue); font-size: 12px; font-weight: 700; }
.tpl-card--sms .tpl-card__chan { background: var(--okbg); color: var(--ok-fg); }
.tpl-group__title { color: var(--ink); font: 700 17px var(--f-display); }

/* Automations */
.auto-page { max-width: none; margin: 0; }
.auto-panel { padding: 22px; }
.auto-panel h2 { font: 800 22px var(--f-display); letter-spacing: -.4px; }
.empty-state { padding: 30px 16px; border: 0; color: var(--mute); }
.source-secret { border-radius: 20px; }
.ai-assistant { border: 0; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.ai-badge { background: var(--sky); color: var(--blue); }
.automation-studio { max-width: none; }
.studio-rail { top: 88px; padding: 20px; border-radius: 24px; background: var(--ink); color: #C6D5EA; box-shadow: none; }
.studio-rail b { color: #fff; }
.studio-rail p, .studio-rail small, .studio-rail .field-help { color: #B9CBE6; font-size: 13.5px; line-height: 1.5; }
.studio-rail a { color: #7CCBFF; font-weight: 700; }
.studio-rail hr { border-top-color: rgba(255, 255, 255, .14); margin: 16px 0; }
.studio-rail .btn--soft { --btn-bg: rgba(255, 255, 255, .14); --btn-fg: #fff; }
.rail-upload { border-top-color: rgba(255, 255, 255, .14); }
.rail-upload .field__label { color: #fff; font-size: 13px; }
.build-progress { margin: 0 0 16px; border: 0; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.build-progress span { font: 600 13px var(--f-body); }
.build-progress .is-active { background: var(--ink); }
.builder-block { padding: 22px; }
.builder-block > .kicker { color: var(--blue); font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
.builder-block > .field { margin-bottom: 16px; }

/* Brand */
.brand-page { max-width: none; margin: 0; }
.brand-studio { gap: 20px; }
.brand-card { grid-template-rows: 170px auto auto; align-self: start; overflow: hidden; }
.brand-card > div:not(.brand-card__preview):not(.brand-card__footer) { padding: 20px 22px 8px; }
.brand-card__footer { padding: 0 22px 22px; }
.brand-card > div h2 { font: 800 20px var(--f-display); }

.brand-card__preview { position: relative; }
.brand-card__unsaved { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: #fff; color: var(--ink); font: 700 12.5px var(--f-body); white-space: nowrap; }
.brand-drop { min-height: 104px; margin: 0; border-color: #B8C7DA; border-radius: 16px; background: var(--surface-2); transition: background .15s ease, border-color .15s ease; }
.brand-drop:hover, .brand-drop.is-over { background: var(--sky); border-color: var(--blue); }
.brand-drop.has-file { background: var(--okbg); border-color: #0E9F5A; border-style: solid; }
.brand-drop span { color: var(--ink); overflow-wrap: anywhere; }
.brand-drop small { color: var(--ink2); font-size: 13px; }
.brand-drop-error { margin: -6px 0 0; color: var(--bad); font-size: 13.5px; font-weight: 600; }
.brand-drop-actions { display: flex; gap: 8px; margin-top: -6px; }

/* API guide */
.api-docs { max-width: none; padding-top: 0; margin-top: 0; }
.api-docs pre, .api-docs pre code { font-family: var(--f-code); }
.sms-studio__aside .logrow__more, .mail-studio__aside .logrow__more, .logrow__book { display: none; }
.api-docs__toc { border-radius: 20px; }
.api-docs__env, .api-docs__section, .api-docs article { border-radius: 24px; }

/* -------------------------------------------------------------------------
   Sign in: your team photo, one logo, two fields
   ------------------------------------------------------------------------- */
.auth { min-height: 100vh; background: #fff; }
.auth__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth-panel { position: relative; display: flex; align-items: flex-start; overflow: hidden; padding: clamp(2.5rem, 5vw, 4.5rem); background: var(--ink) url("../assets/reach-team.jpg") 62% center / cover no-repeat; color: #fff; isolation: isolate; }
.auth-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(170deg, rgba(8, 34, 63, .9) 0%, rgba(8, 34, 63, .35) 45%, rgba(8, 34, 63, .05) 100%); }
.auth-panel__line { margin: 0; font: 800 clamp(2.6rem, 4.6vw, 4.4rem)/1.04 var(--f-display); letter-spacing: -.03em; }
.formside { min-height: 0; padding: 2rem 1.5rem; background: #fff; }
.formcard { width: 100%; max-width: 380px; }
.formside .flash-stack, .auth .flash-stack { max-width: 380px; }
.formcard__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.formcard__brand img { width: 44px; height: 44px; }
.formcard__brand b { display: block; font: 800 26px/1 var(--f-display); letter-spacing: -.6px; color: var(--ink); }
.formcard__brand small { display: block; margin-top: 2px; color: var(--mute); font-size: 12.5px; }
.formcard__title { margin: 0 0 22px; font: 800 34px/1.05 var(--f-display); letter-spacing: -1px; }
.formcard__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; margin-top: 18px; color: var(--ink2); font-size: 14px; }
.formcard__foot a { font-weight: 700; }
.formcard__foot > span { white-space: nowrap; }
.auth-help-link { padding: 0; border: 0; background: none; color: var(--ink2); font: 500 14px var(--f-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn--login { min-height: 48px; margin-top: 4px; }
.auth-help { width: min(480px, calc(100vw - 2rem)); padding: 26px; border-radius: 20px; }
.auth-help h2 { margin: 0 40px 14px 0; font: 800 22px var(--f-display); }
.auth-help::backdrop { background: rgba(8, 34, 63, .5); backdrop-filter: none; }
.auth-help__close { right: 12px; top: 12px; width: 40px; height: 40px; border: 0; background: none; }
.auth-help__steps { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0; padding: 0 0 0 18px; list-style: disc; }
.auth-help__steps li { display: list-item; padding: 0; border: 0; color: var(--ink2); font-size: 15px; }
.auth-help__steps b { display: inline; margin: 0; color: var(--ink); }
@media (max-width: 860px) {
    .auth__grid { grid-template-columns: 1fr; grid-template-rows: 190px 1fr; }
    .auth-panel { padding: 24px; align-items: flex-end; background-position: 62% 30%; }
    .auth-panel::before { background: linear-gradient(0deg, rgba(8, 34, 63, .85) 0%, rgba(8, 34, 63, .1) 75%); }
    .auth-panel__line { font-size: 26px; }
    .formside { justify-content: flex-start; align-items: stretch; padding: 26px 20px 28px; }
    .formcard { margin: 0 auto; max-width: 420px; }
    .formcard__brand { margin-bottom: 20px; }
    .formcard__title { font-size: 28px; }
}

/* -------------------------------------------------------------------------
   Flash and overlays
   ------------------------------------------------------------------------- */
.flash { border-radius: 14px; box-shadow: none; }
.flash--success { background: var(--okbg); border-color: #BFE7D2; }
.flash--error { background: var(--badbg); border-color: #F6C9C9; }
.flash__close { min-width: 28px; min-height: 28px; }
.app-loader { background: rgba(8, 34, 63, .4); backdrop-filter: none; }
.app-loader__box { border-radius: 20px; }
.app-loader__spinner { border-top-color: var(--blue); }
.errpage { background: var(--bg); }
.guide { display: none; }

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .sms-studio, .mail-studio { grid-template-columns: 1fr; }
    .sms-studio__aside, .mail-studio__aside { position: static; }
    .sms-preview { display: none; }
    .photo-card img { height: 150px; }
}
@media (max-width: 860px) {
    .hello { margin-bottom: 16px; }
    .hello h1 { font-size: 28px; letter-spacing: -.6px; }
    .hello p { font-size: 15px; }
    .hello__date { display: none; }
    .home-grid { grid-template-columns: 1fr; gap: 16px; }
    .home-side { gap: 16px; }
    .cmp-head { padding: 12px 14px; }
    .cmp-body { padding: 14px 16px 6px; }
    .cmp-foot { padding: 12px 14px; }
    .cmp-seg button { padding: 9px 14px; }
    .cmp-label { width: 66px; white-space: nowrap; }
    .cmp-help { margin-left: 0; }
    .cmp-suggest { left: 0; }
    .cmp-message .editor__area, .cmp-textarea { min-height: 120px; }
    .delivery { padding: 18px; }
    .delivery__big b { font-size: 44px; }
    .activity__head { padding: 16px; }
    .feed-day__label { padding: 12px 16px 4px; }
    .feed-row { gap: 12px; padding: 12px 16px; }
    .feed-detail { margin: 0 16px 12px 68px; }
    .activity__foot { padding: 14px 16px 18px; }

    .banner, .page-head, .page-head--auto { flex-direction: column; align-items: flex-start; gap: 12px; min-height: 132px; padding: 20px; border-radius: 20px; }
    .banner h1, .page-head h1 { font-size: 28px; letter-spacing: -.6px; }
    .banner p, .page-head > div > p:not(.kicker) { font-size: 14.5px; }
    .banner::after, .page-head::after { width: 60%; opacity: .55; }
    .banner--contacts::after, .banner--templates::after, .banner--brand::after, .banner--api::after, .page-head--auto::after { inset: 10px -30px 10px auto; width: 170px; opacity: .35; }
    .banner__stats dd { font-size: 24px; }

    .sms-studio__composer, .mail-studio__composer { padding: 18px; border-radius: 20px; }
    .sendbar { position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); z-index: 5; margin: 0 -18px -18px; padding: 12px 18px; background: #fff; border-top: 1px solid var(--line); border-radius: 0 0 20px 20px; }
    .sendbar .btn { width: 100%; }
    .tpl-browser, .auto-panel, .builder-block, .team__create, .team__list { padding: 18px; border-radius: 20px; }
    .tpl-browser__head { align-items: flex-start; }
    .page-head { align-items: flex-start; }
    .auto-actions { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 560px) {
    .tpl-categories { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Placeholders: quieter than real text ----------
   Labels and hints name each field, so placeholder text is only an example.
   It used to share the hint colour (--mute) and read like a second label. */
:root { --placeholder: #A7B1C2; }
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; font-weight: 400; }
.cmp-row input::placeholder, .cmp-textarea::placeholder,
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.editor__area:empty::before { color: var(--placeholder); font-weight: 400; }
input:focus::placeholder, textarea:focus::placeholder { color: #C3CAD6; }
/* The quick add-contact row has no visible labels, so its placeholders stay readable. */
.addbar__grid input::placeholder { color: var(--mute); }

/* ---------- Contacts: search and pages ---------- */
.csearch { position: relative; display: flex; align-items: center; max-width: 360px; }
.csearch svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--mute); pointer-events: none; }
.csearch input { width: 100%; min-height: 44px; padding: 0 64px 0 42px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: 400 15px var(--f-body); }
.csearch input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--sky); }
.csearch input::-webkit-search-cancel-button { display: none; }
.csearch__clear { position: absolute; right: 8px; padding: 6px 10px; border-radius: 8px; color: var(--blue); font: 600 13px var(--f-body); }
.csearch__clear:hover { background: var(--sky); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 4px 4px 0; }
.pager__info { margin: 0; color: var(--mute); font-size: 14px; font-variant-numeric: tabular-nums; }
.pager__pages { display: flex; align-items: center; gap: 4px; }
.pager__num, .pager__step { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px; color: var(--ink2); font: 600 14px var(--f-body); font-variant-numeric: tabular-nums; text-decoration: none; }
.pager__num:hover, .pager__step:hover { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.pager__num.is-current { background: var(--ink); color: #fff; box-shadow: none; }
.pager__step svg { width: 18px; height: 18px; }
.pager__step.is-off { color: #C3CAD6; pointer-events: none; }
.pager__gap { min-width: 24px; text-align: center; color: var(--mute); }
.pager__compact { display: none; padding: 0 10px; color: var(--ink2); font: 600 14px var(--f-body); font-variant-numeric: tabular-nums; }
.pager__size { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 14px; }
.pager__size select { min-height: 40px; padding: 0 30px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2341506B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 10px center; color: var(--ink); font: 600 14px var(--f-body); appearance: none; cursor: pointer; }

@media (max-width: 620px) {
    .csearch { max-width: none; }
    .pager { justify-content: center; }
    .pager__info { width: 100%; text-align: center; }
    /* Phones get Prev · 3 / 7 · Next with big targets instead of a row of numbers. */
    .pager__num, .pager__gap { display: none; }
    .pager__compact { display: inline-block; }
    .pager__step { min-width: 48px; height: 48px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
}

/* ---------- Contacts on phones: one compact card per person ----------
   [x] (A) Name                [edit][delete]
           email
           phone · company
   No "Name:" / "Email:" prefixes, and empty fields are hidden, not dashed. */
@media (max-width: 620px) {
    .ctable tbody tr { display: grid; grid-template-columns: auto auto 1fr auto; grid-template-areas: "pick who who act" ". mail mail act" ". tel tel ." ". co co ."; align-items: center; column-gap: 10px; row-gap: 2px; padding: 14px 14px; }
    .ctable tbody td { width: auto; padding: 0 !important; min-width: 0; }
    .ctable td[data-label]::before { content: none; }
    .ctable__pick { grid-area: pick; }
    .ctable__pick input { width: 20px; height: 20px; }
    .ctable__who { grid-area: who; display: flex !important; align-items: center; min-width: 0; }
    .ctable__who .ctable__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
    .ctable__email { grid-area: mail; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 38px !important; font-size: 14px; }
    .ctable__phone { grid-area: tel; padding-left: 38px !important; color: var(--ink2); font-size: 14px; }
    .ctable__co { grid-area: co; padding-left: 38px !important; color: var(--mute); font-size: 13px; }
    .ctable__co .ctable__org, .ctable__co .ctable__role { display: inline; }
    .ctable__co .ctable__role::before { content: " · "; }
    .ctable tbody td.ctable__email, .ctable tbody td.ctable__phone, .ctable tbody td.ctable__co { padding-left: 37px !important; }
    .ctable tbody td.is-empty { display: none; }
    .ctable__actions { grid-area: act; align-self: start; display: flex !important; gap: 6px; }
    .ctable__actions .iconbtn { width: 40px; height: 40px; margin: 0; }
}

/* ---------- Empty states: grey icon, short title, one line, optional next step ----------
   Shared by empty_state() in core/helpers.php. No photos: an empty list should
   be calm and obvious, not decorative. */
.empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 44px 24px; text-align: center; }
.empty__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 12px; border-radius: 16px; background: #EEF2F7; color: #8592A8; }
.empty__icon svg { width: 24px; height: 24px; }
.empty__title { margin: 0; color: var(--ink); font: 700 16px/1.35 var(--f-body); }
.empty__text { margin: 0; max-width: 52ch; text-wrap: balance; color: var(--mute); font-size: 14px; line-height: 1.5; }
.empty__action { margin-top: 14px; }
.empty--compact { padding: 24px 16px; }
.empty--compact .empty__icon { width: 40px; height: 40px; margin-bottom: 8px; border-radius: 12px; }
.empty--compact .empty__icon svg { width: 20px; height: 20px; }
.empty--compact .empty__title { font-size: 14px; }
.empty--compact .empty__text { font-size: 13px; }
/* Contacts' own empty boxes use the same grey tile. */
.book-empty__art { background: #EEF2F7; color: #8592A8; }
