/* RISHA LAUNDRY — base UI. No external fonts or CDNs (strict CSP: self only). */
:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --ink: #14212b;
    --ink-2: #4a5a66;
    --muted: #6b7a86;
    --line: #dfe5ea;
    --brand: #0d6e7a;
    --brand-ink: #ffffff;
    --brand-soft: #e3f2f3;
    --ok: #177245; --ok-soft: #e4f4ea;
    --warn: #9a5b00; --warn-soft: #fdf1dc;
    --err: #b3261e; --err-soft: #fbe7e6;
    --info: #1f5fa8; --info-soft: #e5eefa;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(20, 33, 43, .06), 0 4px 16px rgba(20, 33, 43, .05);
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1519; --surface: #172026; --ink: #e6edf1; --ink-2: #b7c3cb; --muted: #8b99a3; --line: #26333b;
        --brand: #3fb3c1; --brand-ink: #062a2f; --brand-soft: #173338;
        --ok: #5fcf92; --ok-soft: #173326; --warn: #f0b456; --warn-soft: #3a2c14; --err: #f28b82; --err-soft: #3b1d1b;
        --info: #8ab4f8; --info-soft: #1b2a40;
        --shadow: 0 1px 2px rgba(0,0,0,.4);
        color-scheme: dark;
    }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1rem; margin: 0 0 .75rem; }
code { font: .85em var(--mono); background: var(--brand-soft); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1rem; border-radius: 8px;
    border: 1px solid transparent; font: 600 .95rem var(--font); cursor: pointer; text-decoration: none; min-height: 42px; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-sm { padding: .35rem .7rem; min-height: 34px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-icon { background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: var(--ink); padding: .25rem .5rem; display: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.form label { display: block; font-weight: 600; font-size: .9rem; margin: .9rem 0 .35rem; }
input, select, textarea { width: 100%; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 8px; font: inherit;
    color: var(--ink); background: var(--surface); min-height: 42px; }
input:focus, select:focus { border-color: var(--brand); outline: 2px solid var(--brand-soft); }
input[aria-invalid="true"] { border-color: var(--err); }
.form .btn { margin-top: 1.1rem; }
.field-error { color: var(--err); font-size: .85rem; margin: .3rem 0 0; }
.otp-input { font: 600 1.6rem var(--mono); letter-spacing: .5em; text-align: center; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.form-grid .field label { margin-top: .6rem; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
.form-actions .btn { margin-top: 0; }
.inline-form { margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.stack { display: grid; gap: .6rem; margin: 1.25rem 0; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .8rem; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Alerts & pills */
.alert { padding: .7rem .9rem; border-radius: 8px; margin: 0 0 1rem; font-size: .92rem; border: 1px solid transparent; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-err { background: var(--err-soft); color: var(--err); }
.alert-info { background: var(--info-soft); color: var(--info); }
.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-muted { background: var(--line); color: var(--ink-2); }

/* Auth layout */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 2rem; box-shadow: var(--shadow); }
.auth-card h1 { margin-top: 1.25rem; }
.auth-foot { color: var(--muted); font-size: .8rem; margin-top: 1rem; }
.brand-mark { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; letter-spacing: .06em; color: var(--ink); font-size: .95rem; }
.brand-mark:hover { text-decoration: none; }
.brand-dot { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--brand), #49b6c2); display: inline-block; }
.error-code { font: 800 3rem var(--mono); color: var(--brand); margin: 1rem 0 0; }
.debug { white-space: pre-wrap; font: .8rem var(--mono); background: var(--err-soft); color: var(--err); padding: .75rem; border-radius: 8px; overflow: auto; }

/* Panel layout */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: .25rem; }
.side-label { font-size: .78rem; color: var(--muted); margin: .4rem 0 1rem; text-transform: uppercase; letter-spacing: .06em; }
.nav-link { display: block; padding: .55rem .75rem; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.nav-link:hover { background: var(--brand-soft); text-decoration: none; }
.nav-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.side-note { margin-top: auto; font-size: .75rem; color: var(--muted); }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: .6rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); min-height: 60px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.who { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.who small { color: var(--muted); text-transform: capitalize; }
.branch-switch select { min-width: 200px; min-height: 36px; padding: .35rem .6rem; }
.content { padding: 1.5rem; max-width: 1200px; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.grid-2 .card { margin-bottom: 0; }
.grid-2 + .card, .grid-2 + section { margin-top: 1.25rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; }
.stat-n { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-l { color: var(--muted); font-size: .85rem; }
.status-list, .activity, .tags { list-style: none; margin: 0; padding: 0; }
.status-list li { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.status-list li:last-child { border-bottom: 0; }
.activity li { padding: .4rem 0; border-bottom: 1px dashed var(--line); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: .5rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; }
.toolbar { display: flex; gap: .6rem; margin-bottom: 1rem; max-width: 520px; }
.table-card { padding: 0; overflow-x: auto; }
.table-card h2 { padding: 1.1rem 1.25rem 0; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: .7rem 1.25rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }

@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; inset: 0 30% 0 0; z-index: 20; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
    .sidebar.open { transform: none; }
    .btn-icon { display: inline-block; }
    .topbar { padding: .5rem 16px; flex-wrap: wrap; }
    .content { padding: 1rem 16px; }
    .grid-2, .form-grid { grid-template-columns: 1fr; }
    .who { display: none; }
    .branch-switch select { min-width: 0; max-width: 55vw; }
    .kv { grid-template-columns: 1fr; gap: .1rem; }
    .kv dd { margin-bottom: .6rem; }
}

/* ---------- Modules (orders, logistics, payments, admin) ---------- */
.field-full { grid-column: 1 / -1; }
.help { color: var(--muted); font-size: .82rem; margin: .35rem 0 0; }
.check { display: flex !important; align-items: center; gap: .5rem; font-weight: 500 !important; margin: .8rem 0 .2rem !important; }
.check input { width: auto; min-height: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.crumbs { margin: 0 0 .25rem; font-size: .85rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actions form { margin: 0; }
.thumb { max-width: 160px; max-height: 120px; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; }
.prose { line-height: 1.7; }
.prose img { max-width: 100%; height: auto; }
.pager { display: flex; align-items: center; gap: .75rem; justify-content: center; margin: 1rem 0; }
.toolbar-wide { max-width: none; flex-wrap: wrap; }
.toolbar-wide input[type=search] { flex: 1 1 220px; }
.toolbar-wide select, .toolbar-wide input[type=date] { flex: 0 1 190px; }
.nav-group { margin: 1rem .75rem .35rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.side-nav { display: flex; flex-direction: column; padding-bottom: 2rem; }
@media (min-width: 861px) { .sidebar { overflow-y: auto; max-height: 100vh; position: sticky; top: 0; } }
@media (max-width: 860px) { .sidebar { overflow-y: auto; } }
.bell { position: relative; font-size: 1.15rem; text-decoration: none !important; padding: .25rem .4rem; }
.bell-count { position: absolute; top: -4px; right: -6px; background: var(--err); color: #fff; border-radius: 999px; font-size: .65rem; padding: 0 .35rem; font-weight: 700; }
.announcement { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1rem; background: var(--info-soft); border: 1px solid var(--line); }
.announcement p { margin: .25rem 0 0; }
.announcement-alert { background: var(--err-soft); }
.announcement-banner { background: var(--brand-soft); }
.announcement-img { max-width: 100%; max-height: 200px; margin-top: .5rem; border-radius: 8px; }
.announcement.popup-open { position: fixed; z-index: 50; inset: 20% 10% auto; box-shadow: 0 20px 60px rgba(0,0,0,.35); background: var(--surface); }
.popup-close { position: absolute; top: .4rem; right: .6rem; background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--ink); }
tr.unread td { font-weight: 600; }
.nowrap { white-space: nowrap; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.form-section { font-size: .95rem; margin: 1.25rem 0 .25rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.pill-err { background: var(--err-soft); color: var(--err); }
.note { background: var(--warn-soft); color: var(--ink); padding: .6rem .8rem; border-radius: 8px; font-size: .9rem; }
.card-pad { padding: 1.1rem 1.25rem 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .6rem 0 0; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 140px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.table-scroll { overflow-x: auto; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 .9rem .75rem; }
.timeline li::before { content: ""; position: absolute; left: -1.42rem; top: .4rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--brand); border: 2px solid var(--surface); }
.totals { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0; }
.totals dt { color: var(--ink-2); }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.totals .total { font-weight: 800; font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: .4rem; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.summary-card { position: sticky; top: 1rem; }
.items-table td { padding: .5rem; vertical-align: top; }
.items-table th { padding: .5rem; }
.items-table .qty { width: 110px; }
.scan-row { display: flex; gap: .5rem; }
.scan-input { font: 700 1.2rem var(--mono); letter-spacing: .05em; }
.scan-video { width: 100%; max-width: 420px; margin-top: .75rem; border-radius: 10px; background: #000; }
.stage-buttons { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0; }
.stage-buttons .btn { margin: 0; }
.codes { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.codes svg { max-width: 100%; height: auto; }
.photo-grid { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: .75rem; }
.photo-grid figure { margin: 0; }
.job-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.job-card { display: block; color: var(--ink); text-decoration: none !important; margin: 0; }
.job-card:hover { border-color: var(--brand); }
.job-top { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .35rem; }
.copy-input { width: 100%; font: .9rem var(--mono); margin-top: .4rem; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem 1.5rem; }
.perm-grid fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem .8rem; margin: 0; }
.perm-grid legend { font-weight: 700; font-size: .85rem; padding: 0 .3rem; text-transform: capitalize; }
.perm-grid .check { margin: .3rem 0 !important; font-size: .88rem; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.plan-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: var(--surface); display: flex; flex-direction: column; gap: .5rem; }
.plan-card.current { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.plan-price { font-size: 1.6rem; font-weight: 800; }
.feature-list { margin: 0; padding-left: 1.1rem; font-size: .9rem; }
.msg { border: 1px solid var(--line); border-radius: 10px; padding: .75rem 1rem; margin-bottom: .75rem; }
.msg-internal { background: var(--warn-soft); }
.msg-staff { background: var(--brand-soft); }
.msg-meta { font-size: .8rem; color: var(--muted); margin-bottom: .3rem; }
.rating { color: #e0a100; letter-spacing: .1em; }
.w-0 { width: 0; } .w-10 { width: 10%; } .w-20 { width: 20%; } .w-30 { width: 30%; } .w-40 { width: 40%; } .w-50 { width: 50%; }
.w-60 { width: 60%; } .w-70 { width: 70%; } .w-80 { width: 80%; } .w-90 { width: 90%; } .w-100 { width: 100%; }
.h-0 { height: 2px; } .h-10 { height: 10%; } .h-20 { height: 20%; } .h-30 { height: 30%; } .h-40 { height: 40%; } .h-50 { height: 50%; }
.h-60 { height: 60%; } .h-70 { height: 70%; } .h-80 { height: 80%; } .h-90 { height: 90%; } .h-100 { height: 100%; }
@media (max-width: 1100px) { .order-grid { grid-template-columns: 1fr; } .summary-card { position: static; } }
@media (max-width: 860px) {
    .announcement.popup-open { inset: 10% 4% auto; }
    .scan-row { flex-wrap: wrap; }
    .items-table .qty { width: auto; }
    .items-table thead { display: none; }
    .items-table, .items-table tbody, .items-table tr, .items-table td { display: block; width: 100%; }
    .items-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
    .items-table td { padding: 0; border: 0; }
    .items-table td:first-child { grid-column: 1 / -1; }
    .items-table td:has(.js-remove-row) { align-self: center; justify-self: end; width: auto; }
}
@media print { .sidebar, .topbar, .no-print { display: none !important; } .shell { display: block; } }
/* Grid/flex children must be allowed to shrink below their content width on phones. */
.form-grid > *, .grid > *, .order-grid > *, .card { min-width: 0; }
.stat-n { font-size: clamp(1.2rem, 5vw, 1.7rem); overflow-wrap: anywhere; }
.status-list .pill { align-self: center; flex: none; }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr 1fr; gap: .6rem; } .stat { padding: .8rem; } }
.status-list li { flex-wrap: wrap; justify-content: flex-start; gap: .25rem .4rem; align-items: center; }
.status-list li > .pill:last-child { margin-left: auto; }
/* Brand logo & image previews */
.brand-logo { max-height: 40px; max-width: 180px; width: auto; display: block; }
.auth .brand-logo { max-height: 48px; }
.site-brand .brand-logo { max-height: 44px; }
.img-preview { display: flex; align-items: center; min-height: 64px; padding: .5rem; margin-bottom: .5rem; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-2, transparent); }
.brand-thumb { max-height: 80px; max-width: 100%; object-fit: contain; border: 0; }
.is-empty, .is-hidden { display: none !important; }
/* Filter tabs (e.g. Contact messages by type) */
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.tabs a { padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); font-size: .88rem; text-decoration: none; background: var(--surface); }
.tabs a.active, .tabs a:hover { border-color: var(--brand); color: var(--brand); }
.alert-list { margin: .4rem 0 0; padding-left: 1.1rem; }
.alert-list li { margin: .1rem 0; }
.integration-card .page-head { align-items: flex-start; }
.integration-card .page-head p { margin: .2rem 0 0; }
.integration-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--line); }
.integration-actions .inline-form { margin: 0; }

/* ---- searchable select (js-searchable) ---- */
.ss { position: relative; }
.ss-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; bottom: 0; left: 50%; }
.ss-btn { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .8rem; text-align: left; font: inherit; color: var(--ss-ink); background: var(--ss-bg); border: 1px solid var(--ss-line); border-radius: var(--ss-radius, 8px); cursor: pointer; }
.ss-btn::after { content: ""; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .6; transition: transform .2s; flex: none; }
.ss.is-open .ss-btn::after { transform: rotate(-135deg) translateY(-2px); }
.ss-btn.is-placeholder { color: var(--ss-muted); }
.ss-btn:focus-visible, .ss.is-open .ss-btn { outline: none; border-color: var(--ss-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ss-accent) 20%, transparent); }
.ss.is-invalid .ss-btn { border-color: var(--ss-err, #b3261e); }
.ss-panel { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; right: 0; padding: .45rem; background: var(--ss-bg); border: 1px solid var(--ss-line); border-radius: var(--ss-radius, 8px); box-shadow: 0 16px 36px -12px rgba(15, 23, 42, .35); animation: ss-in .14s ease-out; }
@keyframes ss-in { from { opacity: 0; transform: translateY(-4px); } }
.ss-search { width: 100%; min-height: 38px; margin: 0 0 .35rem; }
.ss-list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; overscroll-behavior: contain; }
.ss-list li { padding: .5rem .6rem; border-radius: 6px; cursor: pointer; color: var(--ss-ink); }

.ss-list li.is-active { background: color-mix(in srgb, var(--ss-accent) 14%, transparent); }
.ss-list li[aria-selected="true"] { font-weight: 600; color: var(--ss-accent); }
.ss-list li.ss-placeholder { color: var(--ss-muted); }
.ss-empty { margin: .4rem .6rem; color: var(--ss-muted); font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .ss-panel { animation: none; } .ss-btn::after { transition: none; } }
:root { --ss-ink: var(--ink); --ss-bg: var(--surface); --ss-line: var(--line); --ss-accent: var(--brand); --ss-muted: var(--muted); --ss-err: var(--err); --ss-radius: 8px; }
.img-preview-dark { background: #0f1b2d; border-color: #24324a; }
.img-preview-dark .muted { color: #9fb0c6; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .4rem 1rem; margin-top: .4rem; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { font-weight: 600; font-size: .9rem; margin-bottom: .2rem; }
/* ---- CAPTCHA ---- */
.captcha-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.captcha-img { border-radius: 8px; border: 1px solid var(--line); background: #f1f5fb; }
.captcha-refresh { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.15rem; cursor: pointer; }
.captcha-refresh:hover { border-color: var(--brand); color: var(--brand); }
.captcha-input { width: 90px !important; flex: 0 0 90px; text-align: center; font-size: 1.1rem; letter-spacing: .1em; }
/* ---- email template editor ---- */
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.email-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .grid-2-1, .email-editor-grid { grid-template-columns: 1fr; } }
.ee-toolbar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .35rem; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--bg); }
.ee-toolbar button { min-width: 34px; height: 32px; padding: 0 .55rem; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: .85rem; }
.ee-toolbar button:hover, .ee-toolbar button[aria-pressed="true"] { background: var(--surface); border-color: var(--line); }
.ee-source-btn { margin-left: auto; }
.ee-area, .ee-source { min-height: 240px; max-height: 520px; overflow: auto; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 0 0 8px 8px; background: var(--surface); line-height: 1.6; }
.ee-area:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: -2px; }
.ee-area p { margin: 0 0 .75rem; }
.ee-area h3 { margin: 1rem 0 .4rem; font-size: 1.05rem; }
.ee-source { width: 100%; font-family: var(--mono); font-size: .85rem; }
.ee-link { display: flex; gap: .4rem; padding: .4rem; border: 1px solid var(--line); border-bottom: 0; background: var(--bg); }
.ee-link input { flex: 1; }
.ee-vars, .preview-switch { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0 .5rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: .8rem; cursor: pointer; transition: background .15s, border-color .15s; }
.chip:hover, .chip.is-active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.email-preview { display: block; width: 100%; height: 720px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin: .5rem auto; transition: width .25s; }
.email-preview.is-mobile { width: 375px; max-width: 100%; }
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.inline-actions .inline-form { margin: 0; }
.right { text-align: right; }
.ee-link[hidden], .ee-area[hidden], .ee-source[hidden] { display: none; }
