/* ============================================================
   WHBU — WhatsApp Business Suite
   Modern, responsive UI (light + dark)
   ============================================================ */

:root {
    --bg: #f2f6f4;
    --bg-soft: #ecf2ef;
    --surface: #ffffff;
    --surface-2: #f7faf8;
    --surface-3: #eef4f1;
    --text: #0b1f18;
    --text-2: #31473e;
    --muted: #6a8077;
    --line: #e2ebe6;
    --line-strong: #d2e0d9;
    --brand: #12b76a;
    --brand-2: #0a9e58;
    --brand-3: #087a45;
    --brand-soft: #e6f9ef;
    --brand-soft-2: #cff5e0;
    --teal: #075e54;
    --danger: #e5484d;
    --danger-soft: #fdecec;
    --warn: #e8890c;
    --warn-soft: #fdf3e2;
    --info: #2f7cf6;
    --info-soft: #eaf2ff;
    --sidebar: #06231c;
    --sidebar-2: #0a3228;
    --sidebar-text: #dcece5;
    --sidebar-muted: #7ea396;
    --chat-bg: #eef3f0;
    --bubble-in: #ffffff;
    --bubble-out: #d7fbe6;
    --bubble-text: #10261e;
    --shadow-sm: 0 1px 2px rgba(9, 30, 22, .05);
    --shadow: 0 14px 34px -16px rgba(9, 30, 22, .24);
    --shadow-lg: 0 30px 70px -24px rgba(9, 30, 22, .38);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 9px;
    --topbar-h: 70px;
    --sidebar-w: 264px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
    --bg: #071310;
    --bg-soft: #091914;
    --surface: #0d1c17;
    --surface-2: #11251e;
    --surface-3: #163029;
    --text: #e9f5f0;
    --text-2: #c4d8d0;
    --muted: #89a69a;
    --line: #1d352c;
    --line-strong: #28493c;
    --brand: #20cf7f;
    --brand-2: #16b56c;
    --brand-3: #0e9a5b;
    --brand-soft: #0d2f23;
    --brand-soft-2: #12402f;
    --danger-soft: #391a1c;
    --warn-soft: #3a2a12;
    --info-soft: #12233f;
    --sidebar: #04100d;
    --sidebar-2: #071c16;
    --chat-bg: #081511;
    --bubble-in: #12241d;
    --bubble-out: #0e3b2a;
    --bubble-text: #e7f3ee;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 18px 40px -20px rgba(0, 0, 0, .7);
    --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--brand-3); }
button { font-family: inherit; }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }

::selection { background: var(--brand-soft-2); color: var(--text); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ---------------- Utilities ---------------- */

.mb-0 { margin-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.flip-x { transform: scaleX(-1); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--brand-2);
}

.code-block {
    display: block;
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, .06);
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    word-break: break-all;
}

/* ---------------- Buttons ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: var(--surface-3);
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .12s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary {
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(18, 183, 106, .65), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--brand-2), var(--brand-3)); color: #fff; }

.btn-outline {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--text-2);
    box-shadow: var(--shadow-sm);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand-2); }

.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }

.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn-ghost { color: var(--sidebar-muted); }
.icon-btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.icon-btn-brand {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(18, 183, 106, .8);
}
.icon-btn-brand:hover { background: var(--brand-2); color: #fff; }

/* ---------------- Chips / badges ---------------- */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}
.chip-green { background: var(--brand-soft); color: var(--brand-3); }
.chip-blue { background: var(--info-soft); color: var(--info); }
.chip-amber { background: var(--warn-soft); color: var(--warn); }
.chip-red { background: var(--danger-soft); color: var(--danger); }
.chip-gray { background: var(--surface-3); color: var(--muted); }

[data-theme="dark"] .chip-green { color: #4ade9a; }
[data-theme="dark"] .chip-amber { color: #fbbf24; }
[data-theme="dark"] .chip-red { color: #fda4a6; }
[data-theme="dark"] .chip-blue { color: #93b8ff; }

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    flex-shrink: 0;
    user-select: none;
}
.avatar-xs { width: 30px; height: 30px; font-size: 10.5px; }
.avatar-sm { width: 36px; height: 36px; font-size: 11.5px; }
.avatar-md { width: 46px; height: 46px; font-size: 14px; }
.avatar-lg { width: 58px; height: 58px; font-size: 17px; }

/* ---------------- App shell ---------------- */

.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    padding: 20px 14px 14px;
    background:
        radial-gradient(120% 70% at 0% 0%, rgba(37, 211, 102, .16), transparent 60%),
        linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
    color: var(--sidebar-text);
    z-index: 60;
    overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
.brand-mark {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(145deg, #25d366, #0f9d58);
    color: #04231a;
    box-shadow: 0 8px 20px -6px rgba(37, 211, 102, .55), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.brand-sub { font-size: 10.5px; color: var(--sidebar-muted); letter-spacing: .02em; }

.sidebar-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-section {
    margin: 16px 10px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--sidebar-muted);
    opacity: .8;
}
.nav-section:first-child { margin-top: 2px; }

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 11px;
    border-radius: 11px;
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 500;
    transition: background .16s ease, color .16s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.is-active {
    background: linear-gradient(100deg, rgba(37, 211, 102, .24), rgba(37, 211, 102, .07));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(37, 211, 102, .25);
}
.nav-item.is-active::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    border-radius: 0 4px 4px 0;
    background: #25d366;
}
.nav-icon { display: inline-flex; color: currentColor; opacity: .9; }
.nav-item.is-active .nav-icon { color: #4ade9a; opacity: 1; }

.sidebar-foot { padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.status-card {
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
    border-radius: 12px;
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--sidebar-muted);
}
.status-row strong { margin-left: auto; font-size: 11px; color: var(--sidebar-text); font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status-dot.is-on { background: #25d366; box-shadow: 0 0 0 3px rgba(37, 211, 102, .18); }
.status-dot.is-off { background: #64748b; box-shadow: 0 0 0 3px rgba(100, 116, 139, .15); }

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .06);
}
.user-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.user-meta strong { font-size: 12.5px; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { font-size: 10.5px; color: var(--sidebar-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 12, 9, .55);
    backdrop-filter: blur(2px);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 26px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.topbar-title p { font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }

.theme-toggle { position: relative; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: inline-flex; }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 600;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.topbar-user:hover { border-color: var(--brand); color: var(--text); box-shadow: 0 0 0 3px var(--brand-soft); }
.topbar-user-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { flex: 1; padding: 26px 26px 44px; }
.content.content-flush {
    padding: 0;
    height: calc(100vh - var(--topbar-h));
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ---------------- Page primitives ---------------- */

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 3px; max-width: 720px; }
.page-head-actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.card-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }
.card-body-tight { padding: 14px 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card {
    position: relative;
    overflow: hidden;
    padding: 17px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.stat-card::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--brand-soft), transparent 70%);
    opacity: .8;
    pointer-events: none;
}
.stat-top { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.stat-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand-2);
}
.stat-icon.is-blue { background: var(--info-soft); color: var(--info); }
.stat-icon.is-amber { background: var(--warn-soft); color: var(--warn); }
.stat-icon.is-purple { background: #f1ebff; color: #7c3aed; }
[data-theme="dark"] .stat-icon.is-purple { background: #241b3d; color: #b79bff; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 27px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.stat-foot { margin-top: 8px; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-foot strong { color: var(--brand-2); font-weight: 700; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }

.hero-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: var(--radius);
    background:
        radial-gradient(100% 160% at 100% 0%, rgba(37, 211, 102, .22), transparent 55%),
        linear-gradient(135deg, #06231c, #0b3a2c 70%);
    color: #e9f7f0;
    box-shadow: var(--shadow);
}
.hero-card h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 7px; color: #fff; }
.hero-card p { font-size: 13px; color: #a9c9bb; max-width: 560px; }
.hero-actions { display: flex; gap: 9px; margin-top: 18px; flex-wrap: wrap; }
.hero-card .btn-outline { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.hero-card .btn-outline:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(37, 211, 102, .14);
    border: 1px solid rgba(37, 211, 102, .25);
    color: #7ff0b0;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 14px;
}

.setup-list { display: flex; flex-direction: column; }
.setup-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.setup-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.setup-item:first-child { padding-top: 2px; }
.setup-bullet {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid var(--line);
}
.setup-item.is-done .setup-bullet { background: var(--brand); border-color: var(--brand); color: #fff; }
.setup-main { flex: 1; min-width: 0; }
.setup-main strong { display: block; font-size: 13px; font-weight: 600; }
.setup-main span { display: block; font-size: 11.5px; color: var(--muted); }
.setup-item.is-done .setup-main strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.setup-link { font-size: 12px; font-weight: 600; color: var(--brand-2); white-space: nowrap; }

.progress { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #4ade80); transition: width .4s ease; }

.recent-list { display: flex; flex-direction: column; }
.recent-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); color: inherit; }
.recent-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.recent-item:hover .recent-name { color: var(--brand-2); }
.recent-main { flex: 1; min-width: 0; }
.recent-name { font-size: 13px; font-weight: 600; transition: color .15s ease; }
.recent-preview { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.recent-meta { text-align: right; flex-shrink: 0; }
.recent-time { font-size: 10.5px; color: var(--muted); display: block; }
.recent-unread { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; margin-top: 4px; }

.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-tile {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.action-tile:hover { border-color: var(--brand); color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow); }
.action-tile span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-2); }

.info-strip {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    background: var(--info-soft);
    color: var(--text-2);
    font-size: 12.5px;
    border: 1px solid color-mix(in srgb, var(--info) 18%, transparent);
}
.info-strip svg { color: var(--info); margin-top: 1px; }

/* ---------------- Forms ---------------- */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.field .help { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row .field { margin-bottom: 0; }
.field-row + .field-row, .field-row + .field { margin-top: 16px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"],
input[type="tel"], input[type="search"], select, textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.4;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
    appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
textarea { resize: vertical; min-height: 92px; }
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236a8077' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.input-icon { position: relative; }
.input-icon > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > input { padding-left: 40px; }
.input-icon-action > input { padding-right: 44px; }
.pass-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.pass-toggle:hover { background: var(--surface-3); color: var(--text); }

.secret-field { position: relative; }
.secret-field input { padding-right: 44px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: var(--line-strong);
    transition: background .18s ease;
    flex-shrink: 0;
}
.switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .18s ease;
}
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch-label { font-size: 13px; font-weight: 600; }

.alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.alert p { margin: 0; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.alert-success { background: var(--brand-soft); color: var(--brand-3); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.alert-info { background: var(--info-soft); color: var(--text-2); border-color: color-mix(in srgb, var(--info) 18%, transparent); }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }

/* ---------------- Inbox ---------------- */

.page-inbox { overflow: hidden; height: 100vh; height: 100dvh; }
.page-inbox .app-shell { height: 100%; min-height: 0; overflow: hidden; }
.page-inbox .main { height: 100%; min-height: 0; overflow: hidden; }
.page-inbox .content.content-flush { flex: 1; height: auto; min-height: 0; }
.inbox {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    background: var(--surface);
}

.chat-list-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--line);
    background: var(--surface);
}
.chat-list-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; }
.chat-list-title { display: flex; align-items: center; gap: 8px; }
.chat-list-title h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.count-pill {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
}
.chat-list-head .icon-btn { margin-left: auto; }

.chat-search { position: relative; padding: 6px 18px 12px; }
.chat-search svg { position: absolute; left: 31px; top: 50%; transform: translateY(-55%); color: var(--muted); pointer-events: none; }
.chat-search input {
    height: 38px;
    padding: 0 14px 0 38px;
    border-radius: 999px;
    background: var(--surface-2);
    font-size: 12.5px;
    border-color: transparent;
}
.chat-search input:focus { background: var(--surface); border-color: var(--brand); }

.chat-list { flex: 1; overflow-y: auto; padding: 0 8px 10px; }
.chat-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px 11px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
    transition: background .14s ease;
}
.chat-item:hover { background: var(--surface-2); }
.chat-item.is-active { background: var(--brand-soft); }
[data-theme="dark"] .chat-item.is-active { background: var(--brand-soft); }
.chat-item-main { flex: 1; min-width: 0; }
.chat-item-top { display: flex; align-items: baseline; gap: 8px; }
.chat-item-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.chat-item-time { font-size: 10px; color: var(--muted); flex-shrink: 0; }
.chat-item-bottom { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.chat-item-preview { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.chat-item-preview.is-typing { color: var(--brand-2); font-style: italic; }
.unread-badge {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}
.chat-item .ai-mini { color: var(--brand-2); display: inline-flex; }

.chat-list-empty { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 12.5px; }
.chat-list-error { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.chat-list-error strong { color: var(--danger); font-size: 12.5px; }
.chat-list-error span { font-size: 11.5px; line-height: 1.5; word-break: break-word; }
.chat-list-error .btn { margin-top: 4px; }

.chat-pane { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    padding: 30px;
    background:
        radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 55%),
        var(--surface-2);
}
.chat-empty-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--brand-2);
    box-shadow: var(--shadow);
}
.chat-empty h3 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.chat-empty p { font-size: 13px; color: var(--muted); max-width: 360px; }
.chat-empty .btn { margin-top: 4px; }

.chat-live { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    min-height: 66px;
    flex-shrink: 0;
}
.chat-back { display: none; }
.chat-header-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.chat-header-info strong { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-header-info span { font-size: 11.5px; color: var(--muted); }
.chat-header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.window-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
}
.window-badge.is-open { background: var(--brand-soft); color: var(--brand-3); }
.window-badge.is-closed { background: var(--warn-soft); color: var(--warn); }
[data-theme="dark"] .window-badge.is-open { color: #57e6a1; }
.window-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.chat-menu-wrap { position: relative; }
.menu-pop {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 30;
    display: none;
}
.menu-pop.is-open { display: block; animation: popIn .16s ease; }
.menu-pop button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-2);
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
}
.menu-pop button:hover { background: var(--surface-3); color: var(--text); }
.menu-pop button.is-danger { color: var(--danger); }
.menu-pop button.is-danger:hover { background: var(--danger-soft); }

.export-formats { display: grid; gap: 8px; }
.export-format {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}
.export-format:hover { border-color: var(--line-strong); }
.export-format.is-active { border-color: var(--brand); background: var(--brand-soft); }
.export-format input { position: absolute; opacity: 0; pointer-events: none; }
.export-format-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--brand-2);
    flex-shrink: 0;
}
.export-format-text { display: flex; flex-direction: column; line-height: 1.35; }
.export-format-text strong { font-size: 12.5px; }
.export-format-text span { font-size: 11px; color: var(--muted); }

.window-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    background: var(--warn-soft);
    color: var(--warn);
    font-size: 11.5px;
    border-bottom: 1px solid color-mix(in srgb, var(--warn) 18%, transparent);
    flex-shrink: 0;
}
.window-banner strong { font-weight: 700; }
.window-banner .btn { margin-left: auto; }

.chat-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 26px 24px;
    background-color: var(--chat-bg);
    background-image:
        radial-gradient(circle at 16% 18%, rgba(18, 183, 106, .08), transparent 30%),
        radial-gradient(circle at 84% 82%, rgba(7, 94, 84, .07), transparent 32%),
        radial-gradient(rgba(11, 31, 24, .05) 1px, transparent 1px);
    background-size: auto, auto, 20px 20px;
    scroll-behavior: smooth;
}
[data-theme="dark"] .chat-body {
    background-image:
        radial-gradient(circle at 16% 18%, rgba(32, 207, 127, .07), transparent 30%),
        radial-gradient(circle at 84% 82%, rgba(32, 207, 127, .05), transparent 32%),
        radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
}
.messages { display: flex; flex-direction: column; gap: 3px; max-width: 980px; margin: 0 auto; }

.date-sep { display: flex; justify-content: center; margin: 16px 0 10px; }
.date-sep span {
    padding: 4px 11px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.msg { display: flex; margin-top: 2px; }
.msg.out { justify-content: flex-end; }
.msg + .msg.same-sender { margin-top: 1px; }
.msg.first-of-group { margin-top: 9px; }

.bubble {
    position: relative;
    max-width: min(560px, 76%);
    padding: 7px 10px 19px;
    border-radius: 11px;
    background: var(--bubble-in);
    color: var(--bubble-text);
    font-size: 13.8px;
    line-height: 1.48;
    box-shadow: 0 1px 1px rgba(9, 30, 22, .1);
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.msg.out .bubble { background: var(--bubble-out); }
.msg.in.first-of-group .bubble { border-top-left-radius: 3px; }
.msg.out.first-of-group .bubble { border-top-right-radius: 3px; }
.bubble .msg-text { white-space: pre-wrap; }
.bubble .msg-text a { text-decoration: underline; word-break: break-all; }

.msg-meta {
    position: absolute;
    right: 9px;
    bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: var(--muted);
    line-height: 1;
    white-space: nowrap;
}
.msg.out .msg-meta { color: #5b7a6c; }
[data-theme="dark"] .msg.out .msg-meta { color: #7fa896; }
.msg-meta .ticks { display: inline-flex; color: #869c92; }
.msg-meta .ticks.is-read { color: #53bdeb; }
.msg-meta .ticks.is-failed { color: var(--danger); }

.ai-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-right: 4px;
    padding: 1px 5px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--brand) 16%, transparent);
    color: var(--brand-3);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
[data-theme="dark"] .ai-tag { color: #62e6a8; }

.msg-media { margin: -1px -2px 5px; border-radius: 8px; overflow: hidden; }
.msg-media img, .msg-media video { display: block; max-width: 100%; width: 100%; max-height: 340px; object-fit: cover; border-radius: 8px; background: var(--surface-3); }
.msg-media audio { width: 100%; min-width: 230px; display: block; }
.msg-doc {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--text) 5%, transparent);
    margin-bottom: 5px;
    color: var(--bubble-text);
}
.msg-doc-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand-2);
    flex-shrink: 0;
}
.msg-doc-info { min-width: 0; }
.msg-doc-info strong { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.msg-doc-info span { font-size: 10.5px; color: var(--muted); }
.msg-failed { display: block; margin-top: 4px; font-size: 10.5px; color: var(--danger); }

.typing-row { display: flex; margin: 8px 0 0; }
.typing-bubble { display: inline-flex; gap: 4px; padding: 10px 12px; border-radius: 11px; background: var(--bubble-in); }
.typing-bubble i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1.2s infinite; }
.typing-bubble i:nth-child(2) { animation-delay: .18s; }
.typing-bubble i:nth-child(3) { animation-delay: .36s; }

.composer {
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: 11px 16px;
    flex-shrink: 0;
}
.composer-inner { display: flex; align-items: flex-end; gap: 8px; max-width: 980px; margin: 0 auto; }
.composer-input-wrap { flex: 1; position: relative; display: flex; align-items: flex-end; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px 6px 4px 4px; transition: border-color .16s ease, box-shadow .16s ease; }
.composer-input-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.composer-input-wrap textarea {
    border: 0;
    background: transparent;
    box-shadow: none;
    min-height: 38px;
    max-height: 140px;
    padding: 8px 6px;
    font-size: 13.5px;
    resize: none;
    outline: none;
}
.composer-input-wrap textarea:focus { box-shadow: none; }
.composer-btn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease;
}
.composer-btn:hover { background: var(--surface-3); color: var(--text-2); }
.send-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 8px 18px -8px rgba(18, 183, 106, .8);
    transition: transform .12s ease, filter .18s ease;
}
.send-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.send-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.composer-closed {
    display: flex;
    align-items: center;
    gap: 11px;
    max-width: 980px;
    margin: 0 auto;
    padding: 4px 2px;
    color: var(--muted);
    font-size: 12px;
}
.composer-closed .lock-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); flex-shrink: 0; }
.composer-closed strong { display: block; color: var(--text-2); font-size: 12.5px; }
.composer-closed .btn { margin-left: auto; }

/* ---------------- Templates ---------------- */

.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.tpl-card { display: flex; flex-direction: column; overflow: hidden; }
.tpl-card-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 16px 12px; }
.tpl-card-title { min-width: 0; flex: 1; }
.tpl-card-title strong { display: block; font-size: 13.5px; font-weight: 700; word-break: break-word; }
.tpl-card-title span { font-size: 10.5px; color: var(--muted); display: flex; gap: 7px; margin-top: 3px; }
.tpl-preview {
    margin: 0 16px 14px;
    padding: 13px;
    border-radius: 11px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--text-2);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
    max-height: 190px;
    overflow: hidden;
    position: relative;
}
.tpl-preview .tpl-header { display: block; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.tpl-preview .tpl-footer { display: block; margin-top: 7px; font-size: 11px; color: var(--muted); }
.tpl-buttons { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.tpl-btn-chip { padding: 3px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); font-size: 10.5px; color: var(--text-2); }
.tpl-card-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 11px; color: var(--muted); }
.tpl-card-foot .chip { margin-left: auto; }

/* Template picker modal */
.tpl-picker { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding-right: 3px; }
.tpl-option {
    width: 100%;
    text-align: left;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    cursor: pointer;
    color: inherit;
    transition: border-color .15s ease, background .15s ease;
}
.tpl-option:hover { border-color: var(--brand); }
.tpl-option.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 18%, transparent); }
.tpl-option-head { display: flex; align-items: center; gap: 8px; }
.tpl-option-head strong { font-size: 12.5px; font-weight: 600; flex: 1; }
.tpl-option-body { font-size: 11.5px; color: var(--muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tpl-var-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl-var-grid .field { margin-bottom: 0; }

/* ---------------- Settings / AI ---------------- */

.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.settings-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.settings-side { display: flex; flex-direction: column; gap: 16px; }

.settings-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 16px;
    padding: 4px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.settings-tab svg { flex-shrink: 0; }
.settings-tab:hover { color: var(--text-2); background: var(--surface); }
.settings-tab.is-active { background: var(--surface); color: var(--brand-2); box-shadow: var(--shadow-sm); }

.form-section + .form-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 14px; color: var(--text-2); }
.form-section-title svg { color: var(--brand-2); }

.webhook-box {
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    padding: 13px 14px;
    background: var(--surface-2);
}
.webhook-row { display: flex; align-items: center; gap: 8px; }
.webhook-row + .webhook-row { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.webhook-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); width: 88px; flex-shrink: 0; }
.webhook-value { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--text-2); word-break: break-all; }
.copy-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.copy-btn:hover { color: var(--brand-2); border-color: var(--brand); }

.connection-state {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.connection-head { display: flex; align-items: center; gap: 11px; }
.connection-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand-2);
    flex-shrink: 0;
}
.connection-icon.is-off { background: var(--surface-3); color: var(--muted); }
.connection-head strong { display: block; font-size: 13.5px; }
.connection-head span { font-size: 11.5px; color: var(--muted); }
.connection-details { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.connection-details b { color: var(--text-2); font-weight: 600; }

.ai-test-box { display: flex; flex-direction: column; gap: 10px; }
.test-output {
    min-height: 80px;
    padding: 13px;
    border-radius: 11px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 12.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--text-2);
}
.test-output.is-empty { color: var(--muted); font-style: italic; }

.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--brand); }
.range-value { min-width: 38px; text-align: center; padding: 3px 7px; border-radius: 7px; background: var(--surface-3); font-size: 11.5px; font-weight: 700; }

.provider-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.provider-pill { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .15s ease; }
.provider-pill input { display: none; }
.provider-pill:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-3); }
[data-theme="dark"] .provider-pill:has(input:checked) { color: #57e6a1; }

/* ---------------- Modals ---------------- */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 12, 9, .55);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }
.modal {
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    transform: translateY(12px) scale(.98);
    transition: transform .2s ease;
    overflow: hidden;
}
.modal-backdrop.is-open .modal { transform: translateY(0) scale(1); }
.modal-lg { max-width: 680px; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.modal-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.modal-close { margin-left: auto; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.modal-foot .btn { height: 38px; }

/* ---------------- Toasts ---------------- */

.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 9px; max-width: 360px; }
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    font-size: 12.5px;
    color: var(--text-2);
    animation: toastIn .24s ease;
}
.toast.is-leaving { animation: toastOut .2s ease forwards; }
.toast-icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.toast-success .toast-icon { background: var(--brand-soft); color: var(--brand-2); }
.toast-error .toast-icon { background: var(--danger-soft); color: var(--danger); }
.toast-info .toast-icon { background: var(--info-soft); color: var(--info); }
.toast strong { display: block; font-size: 12px; color: var(--text); margin-bottom: 1px; }
.toast span { display: block; color: var(--muted); line-height: 1.45; }

/* ---------------- Empty state ---------------- */

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px; padding: 46px 24px; }
.empty-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); margin-bottom: 4px; }
.empty-state h3 { font-size: 15px; font-weight: 700; }
.empty-state p { font-size: 12.5px; color: var(--muted); max-width: 380px; }
.empty-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }

/* ---------------- Auth ---------------- */

.auth-body { background: var(--bg); }
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); min-height: 100vh; }

.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px;
    background:
        radial-gradient(90% 70% at 10% 0%, rgba(37, 211, 102, .22), transparent 55%),
        radial-gradient(80% 60% at 100% 100%, rgba(7, 94, 84, .5), transparent 60%),
        linear-gradient(150deg, #04120e, #06231c 55%, #0a3a2c);
    color: #e9f7f0;
}
.auth-brand-inner { position: relative; z-index: 2; max-width: 520px; width: 100%; }
.brand-on-dark { padding-left: 0; }
.brand-on-dark .brand-name { color: #fff; }
.auth-brand h1 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.12; font-weight: 800; letter-spacing: -.035em; margin: 30px 0 16px; color: #fff; }
.auth-brand p { font-size: 14px; color: #a9c9bb; max-width: 440px; line-height: 1.65; }
.auth-points { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.auth-points li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #cfe6db; }
.auth-points svg { color: #25d366; background: rgba(37, 211, 102, .12); border-radius: 50%; padding: 2px; }
.auth-orb { position: absolute; border-radius: 50%; filter: blur(10px); opacity: .5; }
.auth-orb-1 { width: 380px; height: 380px; right: -120px; top: -140px; background: radial-gradient(circle, rgba(37, 211, 102, .3), transparent 65%); }
.auth-orb-2 { width: 300px; height: 300px; left: -100px; bottom: -120px; background: radial-gradient(circle, rgba(16, 185, 129, .22), transparent 65%); }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 28px; background: var(--bg); }
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
}
.auth-card-wide { max-width: 470px; }
.auth-head { margin-bottom: 22px; }
.auth-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; margin-top: 7px; }
.auth-head p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form .field { margin-bottom: 0; }
.auth-form .btn { height: 46px; margin-top: 4px; }
.auth-note { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); justify-content: center; margin-top: 2px; }
.auth-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.auth-foot span { display: inline-flex; align-items: center; gap: 5px; }
.auth-foot a { font-weight: 600; }

.install-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 18px; }
.install-check { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: 8px; font-size: 11px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.install-check-icon { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.install-check.is-ok .install-check-icon { background: var(--brand-soft); color: var(--brand-2); }
.install-check.is-bad .install-check-icon { background: var(--danger-soft); color: var(--danger); }
.install-check.is-bad { color: var(--danger); }

/* ---------------- Campaigns ---------------- */

.campaign-stat-grid { margin-bottom: 16px; }
.stat-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-icon.is-green { background: var(--brand-soft); color: var(--brand-2); }
.stat-icon.is-red { background: var(--danger-soft); color: var(--danger); }
.icon-flip { transform: rotate(180deg); }

.runner-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--muted);
}
.runner-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--line-strong);
    flex-shrink: 0;
}
.runner-dot.is-live {
    background: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
    animation: runnerPulse 1.7s ease-in-out infinite;
}
@keyframes runnerPulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--brand-soft); }
    50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 12%, transparent); }
}
.runner-text strong { color: var(--text); }
.runner-copy { margin-left: auto; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
    text-align: left;
    font-size: 10.5px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 11px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    font-weight: 700;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table-compact th, .data-table-compact td { padding: 8px 10px; font-size: 11.5px; }

.campaign-name a { font-weight: 600; }
.campaign-name span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.campaign-table .progress { min-width: 130px; }
.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 10.5px;
    color: var(--muted);
    margin-bottom: 5px;
    white-space: nowrap;
}
.campaign-next { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.progress-lg { height: 12px; }

.campaign-progress-card { margin-bottom: 16px; }
.campaign-next-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-2);
    background: var(--brand-soft);
    padding: 5px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.schedule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.schedule-grid > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.schedule-grid span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.schedule-grid strong { display: block; font-size: 12.5px; margin-top: 3px; }

.campaign-columns { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.activity-list { display: flex; flex-direction: column; }
.activity-item { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed var(--line); font-size: 12px; }
.activity-item:last-child { border-bottom: 0; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--line-strong); }
.activity-dot.is-ok { background: var(--brand); }
.activity-dot.is-bad { background: var(--danger); }
.activity-main { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.activity-main strong { font-size: 12px; }
.activity-main span { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-time { color: var(--muted); font-size: 10.5px; white-space: nowrap; }

.campaign-toolbar { margin-bottom: 16px; }
.campaign-toolbar-main { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.campaign-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.campaign-toolbar-meta { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.campaign-error { color: var(--danger); max-width: 260px; }

.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-tab { padding: 5px 10px; border-radius: 8px; font-size: 11px; color: var(--muted); border: 1px solid transparent; }
.filter-tab span { opacity: .65; }
.filter-tab:hover { background: var(--surface-2); }
.filter-tab.is-active { background: var(--brand-soft); color: var(--brand-3); border-color: transparent; font-weight: 600; }

/* Campaign wizard */
.wizard { max-width: 1000px; }
.wizard-steps { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 600;
}
.wizard-step span {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--surface-3);
    font-size: 10.5px;
}
.wizard-step.is-active { border-color: var(--brand); color: var(--brand-2); background: var(--brand-soft); }
.wizard-step.is-active span { background: var(--brand); color: #fff; }
.wizard-step.is-done { color: var(--text-2); }
.wizard-step.is-done span { background: var(--brand-soft); color: var(--brand-2); }
.wizard-panel { display: none; }
.wizard-panel.is-active { display: block; }
.wizard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    border-radius: 0 0 var(--radius) var(--radius);
    flex-wrap: wrap;
}

.upload-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 30px 20px;
    border: 2px dashed var(--line-strong);
    border-radius: 14px;
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}
.upload-drop:hover, .upload-drop.is-drag { border-color: var(--brand); background: var(--brand-soft); }
.upload-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--brand-2);
    margin-bottom: 4px;
}
.upload-drop strong { font-size: 13.5px; }
.upload-drop > span { font-size: 11.5px; color: var(--muted); }
.upload-state {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text-2);
}
.upload-state.is-ok { background: var(--brand-soft); color: var(--brand-3); border-color: transparent; }
.upload-state.is-bad { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.upload-state.is-loading { color: var(--muted); }
.upload-ok { font-weight: 700; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.form-grid .field { margin-bottom: 0; }
.preview-block { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 12px; }
.req { color: var(--danger); }

.mapping-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.campaign-map-field { margin-bottom: 0; }
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.review-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.review-item span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.review-item strong { display: block; font-size: 12.5px; margin-top: 3px; }

.tpl-search { position: relative; display: flex; align-items: center; margin-bottom: 10px; }
.tpl-search svg { position: absolute; left: 11px; color: var(--muted); }
.tpl-search input { width: 100%; padding-left: 34px; }
.tpl-empty-search {
    padding: 20px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.tpl-empty-search strong { font-size: 12.5px; }
.tpl-empty-search span { font-size: 11.5px; color: var(--muted); }

.chat-ai-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px 3px 4px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    cursor: pointer;
}
.chat-ai-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chat-ai-toggle .switch-track { width: 30px; height: 17px; }
.chat-ai-toggle .switch-track::after { width: 11px; height: 11px; top: 3px; left: 3px; }
.chat-ai-toggle input:checked + .switch-track { background: var(--brand); }
.chat-ai-toggle input:checked + .switch-track::after { transform: translateX(13px); }
.chat-ai-toggle .switch-label { font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.chat-ai-toggle input:checked ~ .switch-label { color: var(--brand-2); }

/* ---------------- Animations ---------------- */

@keyframes popIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
@keyframes typing { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .9s linear infinite; }

/* ---------------- Responsive ---------------- */

@media (max-width: 1180px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-grid { grid-template-columns: 1fr; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-side { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
    :root { --sidebar-w: 264px; }
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar.is-open + .sidebar-backdrop { opacity: 1; pointer-events: auto; }
    .main { margin-left: 0; }
    .menu-btn { display: inline-flex; }
    .topbar { padding: 0 18px; }
    .content { padding: 20px 18px 40px; }
    .content.content-flush { padding: 0; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-panel { min-height: 100vh; padding: 24px 16px; }
    .inbox { grid-template-columns: 320px minmax(0, 1fr); }
}

@media (max-width: 820px) {
    .inbox { grid-template-columns: 1fr; position: relative; }
    .chat-list-panel { border-right: 0; }
    .chat-pane {
        position: absolute;
        inset: 0;
        z-index: 5;
        background: var(--surface);
        transform: translateX(100%);
        transition: transform .22s ease;
    }
    .inbox.is-chat-open .chat-pane { transform: translateX(0); }
    .chat-back { display: inline-flex; }
    .window-badge { display: none; }
    .chat-body { padding: 14px 12px 18px; }
    .bubble { max-width: 84%; }
    .chat-header { padding: 9px 12px; }
    .composer { padding: 9px 10px; }
    .settings-side { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .field-row .field { margin-bottom: 16px; }
    .field-row .field:last-child { margin-bottom: 0; }
    .field-row + .field-row, .field-row + .field { margin-top: 0; }
}

@media (max-width: 620px) {
    :root { --topbar-h: 62px; }
    .topbar { height: 62px; padding: 0 12px; gap: 9px; }
    .topbar-title h1 { font-size: 16px; }
    .topbar-title p { display: none; }
    .topbar-user-name { display: none; }
    .topbar-user { padding: 4px; }
    .content { padding: 16px 12px 36px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 22px; }
    .page-head { margin-bottom: 16px; }
    .page-head-actions { margin-left: 0; width: 100%; }
    .page-head-actions .btn { flex: 1; }
    .card-head { padding: 14px 15px; }
    .card-body { padding: 15px; }
    .modal-backdrop { padding: 0; align-items: flex-end; }
    .modal { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; }
    .modal-body { padding: 16px; }
    .modal-head { padding: 16px; }
    .modal-foot { padding: 12px 16px; }
    .template-grid { grid-template-columns: 1fr; }
    .action-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 22px; border-radius: 16px; }
    .install-checks { grid-template-columns: 1fr; }
    .toast-stack { left: 12px; right: 12px; bottom: 12px; max-width: none; }
    .tpl-var-grid { grid-template-columns: 1fr; }
    .webhook-label { width: 72px; }
    .auth-foot { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
    .stat-grid { grid-template-columns: 1fr; }
    .composer-btn.template-btn span { display: none; }
}

/* ---------------- Campaign responsive ---------------- */

@media (max-width: 1180px) {
    .stat-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .campaign-columns { grid-template-columns: 1fr; }
    .review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .stat-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: 1fr; }
    .mapping-grid { grid-template-columns: 1fr; }
    .campaign-toolbar-meta { width: 100%; margin-left: 0; }
}

@media (max-width: 620px) {
    .stat-grid-5 { grid-template-columns: 1fr 1fr; }
    .schedule-grid { grid-template-columns: 1fr; }
    .review-grid { grid-template-columns: 1fr 1fr; }
    .wizard-step { flex: 1; justify-content: center; font-size: 10.5px; padding: 7px 8px; }
    .wizard-foot .btn { flex: 1; }
    .campaign-toolbar-actions { width: 100%; }
    .campaign-toolbar-actions .btn { flex: 1; }
    .runner-strip { font-size: 11px; }
}
