/*
 * Developed by Zovanta Software Co.
 * Site: https://zovanta.dev
 * Support: sales@zovanta.deb
 * Copyright © 2026 Zovanta Software Co. All rights reserved.
 */

/* ZoForm admin — self-contained, no external fonts or frameworks. */

:root {
    --zf-bg: #f4f6fb;
    --zf-panel: #ffffff;
    --zf-ink: #0f172a;
    --zf-ink-2: #334155;
    --zf-muted: #64748b;
    --zf-soft: #94a3b8;
    --zf-line: #e6ebf3;
    --zf-line-2: #eef2f8;
    --zf-side: #0b1220;
    --zf-side-2: #121a2b;
    --zf-accent: #22c7a9;
    --zf-radius: 14px;
    --zf-shadow: 0 18px 40px -32px rgba(15, 23, 42, .45);
}

* { box-sizing: border-box; }

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

body.zf-admin {
    margin: 0;
    background: var(--zf-bg);
    color: var(--zf-ink);
    font: 14px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
a { color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: #eef2f8; padding: 1px 5px; border-radius: 5px; }
img { max-width: 100%; }

/* ============================ Shell ============================ */

.zf-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 236px;
    background: linear-gradient(180deg, var(--zf-side), #0d1526 60%, #0a1120);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    padding: 18px 14px 16px;
    gap: 18px;
    z-index: 30;
}

.zf-side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 14px;
    text-decoration: none;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.zf-side-name { font-weight: 650; letter-spacing: -.01em; font-size: 15px; }

.zf-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(140deg, var(--zf-accent), #0f766e);
    color: #04130f;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: -.5px;
    flex: 0 0 auto;
}
.zf-mark--lg { width: 44px; height: 44px; border-radius: 13px; font-size: 17px; }

.zf-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }

.zf-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 9px;
    text-decoration: none;
    color: #a9b6ca;
    font-size: 13.5px;
    font-weight: 500;
    transition: background .14s ease, color .14s ease;
}
.zf-nav-item:hover { background: rgba(255, 255, 255, .055); color: #f1f5f9; }
.zf-nav-item.is-active {
    background: rgba(34, 199, 169, .13);
    color: #fff;
    box-shadow: inset 2px 0 0 var(--zf-accent);
}
.zf-nav-glyph { width: 18px; text-align: center; opacity: .85; font-size: 13px; }
.zf-nav-label { flex: 1; }
.zf-nav-badge {
    min-width: 20px;
    height: 19px;
    padding: 0 6px;
    border-radius: 20px;
    background: var(--zf-accent);
    color: #06251f;
    font-size: 11px;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.zf-side-foot { display: flex; flex-direction: column; gap: 10px; }
.zf-side-link { font-size: 12px; color: #8494ac; text-decoration: none; padding: 0 6px; }
.zf-side-link:hover { color: #fff; }

.zf-side-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 8px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .045);
}
.zf-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(34, 199, 169, .2);
    color: #9df0dd;
    font-weight: 700;
    font-size: 12px;
    flex: 0 0 auto;
}
.zf-side-user-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.zf-side-user-txt strong { font-size: 12px; color: #e2e8f0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zf-side-user-txt em { font-style: normal; font-size: 10.5px; color: #7b8ba3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zf-signout { color: #7b8ba3; text-decoration: none; font-size: 14px; padding: 2px 4px; }
.zf-signout:hover { color: #fff; }

.zf-main { margin-left: 236px; min-height: 100vh; display: flex; flex-direction: column; }

.zf-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 28px;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--zf-line);
    position: sticky;
    top: 0;
    z-index: 20;
}
.zf-topbar h1 { font-size: 17px; letter-spacing: -.02em; font-weight: 650; }
.zf-topbar-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.zf-content { padding: 24px 28px 60px; display: flex; flex-direction: column; gap: 18px; flex: 1; }

/* ============================ Buttons ============================ */

.zf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border-radius: 9px;
    border: 1px solid var(--zf-line);
    background: var(--zf-panel);
    color: var(--zf-ink-2);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .14s ease, border-color .14s ease, transform .1s ease;
}
.zf-btn:hover { border-color: #cfd8e6; background: #fbfcfe; }
.zf-btn:active { transform: translateY(1px); }
.zf-btn--primary {
    background: var(--zf-ink);
    border-color: var(--zf-ink);
    color: #fff;
}
.zf-btn--primary:hover { background: #1c2740; border-color: #1c2740; }
.zf-btn--ghost { background: transparent; }
.zf-btn--danger { color: #b91c1c; border-color: #f3c9c9; background: #fff7f7; }
.zf-btn--danger:hover { background: #fdecec; border-color: #e9a8a8; }
.zf-btn--sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.zf-btn--block { width: 100%; }
.zf-btn[disabled] { opacity: .55; cursor: not-allowed; }

.zf-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--zf-muted);
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
}
.zf-icon-btn:hover { background: #f1f5f9; color: var(--zf-ink); border-color: var(--zf-line); }

.zf-link { color: #0f766e; text-decoration: none; font-size: 12.5px; font-weight: 600; }
.zf-link:hover { text-decoration: underline; }
.zf-strong-link { color: var(--zf-ink); font-weight: 600; text-decoration: none; }
.zf-strong-link:hover { color: #0f766e; }
.zf-muted { color: var(--zf-muted); }
.zf-sub { display: block; color: var(--zf-soft); font-size: 11.5px; }
.zf-empty { color: var(--zf-muted); text-align: center; padding: 18px 8px; font-size: 13px; }
.zf-empty a { color: #0f766e; }
.zf-eyebrow { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--zf-soft); font-weight: 650; }
.zf-hint { font-size: 12px; color: var(--zf-muted); margin-top: 10px; }
.zf-h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--zf-muted); margin: 20px 0 10px; }

/* ============================ Cards ============================ */

.zf-card {
    background: var(--zf-panel);
    border: 1px solid var(--zf-line);
    border-radius: var(--zf-radius);
    box-shadow: var(--zf-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.zf-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.zf-card-head h2 { font-size: 14.5px; letter-spacing: -.01em; font-weight: 650; }
.zf-card-head p { font-size: 12.5px; color: var(--zf-muted); margin-top: 3px; }

.zf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.zf-grid-2--wide { grid-template-columns: 1.35fr 1fr; }
.zf-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.zf-stack { display: flex; flex-direction: column; gap: 18px; }

.zf-flash {
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13px;
    border: 1px solid #d7f0e5;
    background: #f0fdf8;
    color: #0b6b52;
}
.zf-flash--error { border-color: #f6cfcf; background: #fef5f5; color: #a11d1d; }

.zf-pill {
    display: inline-flex;
    align-items: center;
    height: 21px;
    padding: 0 8px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: .02em;
    white-space: nowrap;
    background: #eef2f8;
    color: #4b5a70;
}
.zf-pill--ok { background: #e6f8f0; color: #0a6b51; }
.zf-pill--warn { background: #fff7e6; color: #94620a; }
.zf-pill--error { background: #fdeeee; color: #a11d1d; }
.zf-pill--muted { background: #f1f4f9; color: #7b8798; }

.zf-tag {
    display: inline-flex;
    align-items: center;
    height: 19px;
    padding: 0 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: #eef2f8;
    color: #5b6b82;
}
.zf-tag--ok { background: #e6f8f0; color: #0a6b51; }
.zf-tag--warn { background: #fff5e0; color: #8d5c07; }
.zf-tag--error { background: #fdeaea; color: #a11d1d; }

/* ============================ Forms ============================ */

.zf-field { display: flex; flex-direction: column; gap: 6px; }
.zf-field > span { font-size: 12px; font-weight: 600; color: var(--zf-ink-2); }
.zf-field-hint { font-style: normal; font-size: 11.5px; color: var(--zf-soft); line-height: 1.45; }

.zf-input {
    width: 100%;
    height: 38px;
    padding: 0 11px;
    border: 1px solid #dbe3ef;
    border-radius: 9px;
    background: #fbfcfe;
    color: var(--zf-ink);
    font: inherit;
    font-size: 13px;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
textarea.zf-input { height: auto; padding: 9px 11px; line-height: 1.55; resize: vertical; }
select.zf-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
.zf-input:focus { outline: none; border-color: var(--zf-accent); box-shadow: 0 0 0 3px rgba(34, 199, 169, .16); background: #fff; }
.zf-input--sm { height: 32px; font-size: 12.5px; }
.zf-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: #f8fafc; }

.zf-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.zf-switch {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    color: var(--zf-ink-2);
    cursor: pointer;
    padding: 3px 0;
}
.zf-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.zf-switch span {
    width: 34px;
    height: 20px;
    border-radius: 20px;
    background: #dbe3ef;
    position: relative;
    transition: background .16s ease;
    flex: 0 0 auto;
}
.zf-switch span::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
    transition: transform .16s ease;
}
.zf-switch input:checked + span { background: var(--zf-accent); }
.zf-switch input:checked + span::after { transform: translateX(14px); }
.zf-switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(34, 199, 169, .22); }
.zf-switch-row { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 4px; }

.zf-form-stack { display: flex; flex-direction: column; gap: 12px; }
.zf-form-actions { display: flex; gap: 9px; padding-top: 4px; }
.zf-inline-form { display: inline-flex; gap: 8px; align-items: center; }

.zf-note-box {
    border: 1px dashed var(--zf-line);
    background: #f9fbfe;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12px;
    color: var(--zf-muted);
}
.zf-note-box strong { display: block; color: var(--zf-ink-2); font-size: 12px; margin-bottom: 4px; }

.zf-savebar {
    position: sticky;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(6px);
    border: 1px solid var(--zf-line);
    border-radius: 12px;
    box-shadow: 0 12px 30px -24px rgba(15, 23, 42, .5);
    font-size: 12px;
}
.zf-savebar--inline { position: static; padding: 0; border: 0; box-shadow: none; background: transparent; justify-content: flex-start; }
.zf-settings-form { display: flex; flex-direction: column; gap: 18px; }

/* ============================ Tabs ============================ */

.zf-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--zf-line);
    overflow-x: auto;
    scrollbar-width: none;
}
.zf-tabs::-webkit-scrollbar { display: none; }
.zf-tab {
    padding: 9px 13px;
    font-size: 13px;
    font-weight: 550;
    color: var(--zf-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    margin-bottom: -1px;
}
.zf-tab:hover { color: var(--zf-ink); }
.zf-tab.is-active { color: var(--zf-ink); border-bottom-color: var(--zf-accent); font-weight: 650; }
.zf-tab--right { margin-left: auto; }
.zf-tabs--settings { background: var(--zf-panel); padding: 0 10px; border-radius: 12px 12px 0 0; border: 1px solid var(--zf-line); border-bottom: 0; }

/* ============================ Dashboard ============================ */

.zf-hello {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 2px;
}
.zf-hello h2 { font-size: 18px; letter-spacing: -.02em; font-weight: 650; }
.zf-hello p { color: var(--zf-muted); font-size: 12.5px; margin-top: 3px; }

.zf-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.zf-kpi-grid--tight { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.zf-kpi {
    background: var(--zf-panel);
    border: 1px solid var(--zf-line);
    border-radius: 12px;
    padding: 14px 15px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
    overflow: hidden;
}
.zf-kpi::after {
    content: "";
    position: absolute;
    inset: auto -20px -30px auto;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 199, 169, .1), transparent 70%);
}
.zf-kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--zf-soft); font-weight: 650; }
.zf-kpi-value { font-size: 22px; letter-spacing: -.03em; font-weight: 700; color: var(--zf-ink); line-height: 1.2; }
.zf-kpi-hint { font-size: 11px; color: var(--zf-muted); }
.zf-kpi--ok .zf-kpi-value { color: #0b7a5c; }

.zf-chart-wrap { width: 100%; }
.zf-chart { width: 100%; height: 150px; display: block; }
.zf-chart-wrap--tall .zf-chart { height: 200px; }
.zf-chart-foot { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--zf-soft); }
.zf-legend { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--zf-muted); }
.zf-legend .zf-dot { margin-left: 8px; }
.zf-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #cbd5e1; }
.zf-dot--views { background: #c7d2e4; }
.zf-dot--subs { background: #0f9e86; }
.zf-dot--muted { background: #e2e8f0; }

.zf-health { list-style: none; padding: 0; display: flex; flex-direction: column; }
.zf-health li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--zf-line-2); font-size: 12.5px; }
.zf-health li:last-child { border-bottom: 0; }
.zf-health-label { color: var(--zf-muted); }
.zf-health-value a { color: #0f766e; text-decoration: none; font-size: 12.5px; }

.zf-feed { list-style: none; padding: 0; display: flex; flex-direction: column; }
.zf-feed li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--zf-line-2); }
.zf-feed li:last-child { border-bottom: 0; }
.zf-feed-dot { width: 7px; height: 7px; border-radius: 50%; background: #dbe3ef; flex: 0 0 auto; }
.zf-feed-dot.is-new { background: var(--zf-accent); box-shadow: 0 0 0 3px rgba(34, 199, 169, .18); }
.zf-feed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zf-feed-main strong { font-size: 12.5px; font-weight: 600; }
.zf-feed-main span { font-size: 11px; color: var(--zf-soft); }
.zf-feed-time { font-size: 11px; color: var(--zf-soft); white-space: nowrap; }

.zf-log { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.zf-log li { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.zf-log-msg { flex: 1; color: var(--zf-ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zf-log-time { color: var(--zf-soft); font-size: 10.5px; white-space: nowrap; }

/* ============================ Tables ============================ */

.zf-table-wrap { overflow-x: auto; margin: 0 -4px; }
.zf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.zf-table th {
    text-align: left;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--zf-soft);
    font-weight: 650;
    padding: 8px 10px;
    border-bottom: 1px solid var(--zf-line);
    white-space: nowrap;
}
.zf-table td { padding: 10px; border-bottom: 1px solid var(--zf-line-2); vertical-align: middle; }
.zf-table tr:last-child td { border-bottom: 0; }
.zf-table tbody tr:hover { background: #fafcff; }
.zf-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.zf-table .is-actions { text-align: right; white-space: nowrap; }

/* ============================ Forms list ============================ */

.zf-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.zf-form-card {
    background: var(--zf-panel);
    border: 1px solid var(--zf-line);
    border-radius: var(--zf-radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    box-shadow: var(--zf-shadow);
}
.zf-form-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.zf-form-card-slug { font-size: 11px; color: var(--zf-soft); font-family: ui-monospace, monospace; }
.zf-form-card h3 { font-size: 15px; letter-spacing: -.01em; }
.zf-form-card h3 a { text-decoration: none; color: var(--zf-ink); }
.zf-form-card h3 a:hover { color: #0f766e; }
.zf-form-card-intro { font-size: 12px; color: var(--zf-muted); min-height: 34px; }
.zf-form-card-swatch { display: flex; gap: 4px; }
.zf-form-card-swatch span { height: 8px; flex: 1; border-radius: 3px; border: 1px solid rgba(15, 23, 42, .06); }
.zf-form-card-stats { display: flex; gap: 12px; font-size: 11.5px; color: var(--zf-muted); align-items: center; flex-wrap: wrap; }
.zf-form-card-stats strong { color: var(--zf-ink); }
.zf-new-dot { color: #0b7a5c; font-weight: 650; background: #e6f8f0; padding: 1px 7px; border-radius: 20px; font-size: 10.5px; }
.zf-form-card-foot { display: flex; align-items: center; gap: 7px; padding-top: 4px; border-top: 1px solid var(--zf-line-2); margin-top: 2px; }

.zf-empty-state { text-align: center; align-items: center; padding: 46px 24px; }
.zf-empty-glyph { font-size: 30px; color: var(--zf-accent); }
.zf-empty-state h2 { font-size: 17px; }
.zf-empty-state p { color: var(--zf-muted); max-width: 420px; }
.zf-empty-state form { margin-top: 6px; }

/* ============================ Menu ============================ */

.zf-menu { position: relative; margin-left: auto; }
.zf-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 186px;
    background: var(--zf-panel);
    border: 1px solid var(--zf-line);
    border-radius: 11px;
    box-shadow: 0 20px 40px -22px rgba(15, 23, 42, .4);
    padding: 5px;
    display: none;
    z-index: 25;
}
.zf-menu.is-open .zf-menu-panel { display: block; }
.zf-menu-panel a,
.zf-menu-panel button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 7px 10px;
    border-radius: 7px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 12.5px;
    color: var(--zf-ink-2);
    text-decoration: none;
    cursor: pointer;
}
.zf-menu-panel a:hover,
.zf-menu-panel button:hover { background: #f3f6fb; color: var(--zf-ink); }
.zf-menu-panel button.is-danger { color: #b91c1c; }
.zf-menu-panel form { margin: 0; }

/* ============================ Filters ============================ */

.zf-filterbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.zf-filter-count { margin-left: auto; font-size: 12px; color: var(--zf-muted); }
.zf-segmented { display: inline-flex; background: #eaeff7; border-radius: 9px; padding: 3px; gap: 2px; }
.zf-seg {
    padding: 5px 11px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--zf-muted);
    text-decoration: none;
}
.zf-seg:hover { color: var(--zf-ink); }
.zf-seg.is-active { background: var(--zf-panel); color: var(--zf-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }

/* ============================ Inbox ============================ */

.zf-inbox { display: grid; grid-template-columns: minmax(300px, .9fr) 1.1fr; gap: 16px; align-items: start; }
.zf-inbox-list { background: var(--zf-panel); border: 1px solid var(--zf-line); border-radius: var(--zf-radius); overflow: hidden; }
.zf-inbox-item {
    display: flex;
    gap: 10px;
    padding: 12px 13px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--zf-line-2);
    align-items: flex-start;
    position: relative;
}
.zf-inbox-item:last-child { border-bottom: 0; }
.zf-inbox-item:hover { background: #fafcff; }
.zf-inbox-item.is-active { background: #f2fbf8; box-shadow: inset 2px 0 0 var(--zf-accent); }
.zf-inbox-item.is-unread .zf-inbox-top strong { font-weight: 700; }
.zf-inbox-item.is-unread::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 18px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--zf-accent);
}
.zf-inbox-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eef2f8;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    color: #5b6b82;
    flex: 0 0 auto;
}
.zf-inbox-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.zf-inbox-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.zf-inbox-top strong { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zf-inbox-top em { font-style: normal; font-size: 10.5px; color: var(--zf-soft); white-space: nowrap; }
.zf-inbox-sub { font-size: 10.5px; color: var(--zf-soft); text-transform: uppercase; letter-spacing: .05em; }
.zf-inbox-preview { font-size: 11.5px; color: var(--zf-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.zf-inbox-detail {
    background: var(--zf-panel);
    border: 1px solid var(--zf-line);
    border-radius: var(--zf-radius);
    padding: 20px;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 84px;
    box-shadow: var(--zf-shadow);
}
.zf-detail-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--zf-soft); font-size: 12.5px; }
.zf-detail-empty span { font-size: 26px; }
.zf-detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.zf-detail-head h2 { font-size: 16px; margin: 3px 0; letter-spacing: -.01em; }
.zf-detail-head p { font-size: 11.5px; }
.zf-detail-fields { display: flex; flex-direction: column; gap: 0; }
.zf-detail-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--zf-line-2); font-size: 12.5px; }
.zf-detail-row:last-child { border-bottom: 0; }
.zf-detail-row dt { color: var(--zf-muted); font-weight: 500; }
.zf-detail-row dd { margin: 0; color: var(--zf-ink); word-break: break-word; }
.zf-detail-block h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--zf-soft); margin-bottom: 7px; }
.zf-detail-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; border-top: 1px solid var(--zf-line); padding-top: 14px; margin-top: auto; }
.zf-detail-actions form { display: flex; gap: 7px; flex-wrap: wrap; }
.zf-attach {
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--zf-line);
    border-radius: 9px;
    text-decoration: none;
    color: var(--zf-ink);
    font-size: 12px;
    margin-bottom: 6px;
}
.zf-attach strong { display: block; font-weight: 600; }
.zf-attach em { font-style: normal; font-size: 10.5px; color: var(--zf-soft); }
.zf-notes { margin: 0; padding-left: 16px; font-size: 12px; color: var(--zf-muted); }
.zf-notes li { margin-bottom: 3px; }
.zf-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border-top: 1px solid var(--zf-line); font-size: 12px; }
.zf-pagination a { color: #0f766e; text-decoration: none; font-weight: 600; }

.zf-meta-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0; }
.zf-meta-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--zf-line-2); font-size: 12px; }
.zf-meta-list li:last-child { border-bottom: 0; }
.zf-meta-list span { color: var(--zf-muted); }
.zf-meta-list strong { font-weight: 600; color: var(--zf-ink); }
.zf-meta-list a { color: #0f766e; text-decoration: none; }

/* ============================ Analytics extras ============================ */

.zf-bars { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.zf-bars li { display: grid; grid-template-columns: minmax(96px, 1fr) 2fr auto; gap: 10px; align-items: center; font-size: 12px; }
.zf-bar-label { color: var(--zf-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zf-bar-track { height: 7px; background: #eef2f8; border-radius: 6px; overflow: hidden; }
.zf-bar-track span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--zf-accent), #14b8a6); }
.zf-bar-value { color: var(--zf-muted); font-variant-numeric: tabular-nums; }

.zf-donut { display: flex; align-items: center; gap: 22px; }
.zf-donut-ring { width: 104px; height: 104px; border-radius: 50%; position: relative; flex: 0 0 auto; }
.zf-donut-ring::after { content: ""; position: absolute; inset: 17px; background: var(--zf-panel); border-radius: 50%; }
.zf-donut-legend { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: var(--zf-muted); }
.zf-donut-legend li { display: flex; align-items: center; gap: 7px; }
.zf-donut-legend strong { margin-left: auto; color: var(--zf-ink); }
.zf-chip-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.zf-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 20px; background: #f1f5fa; font-size: 11.5px; color: var(--zf-ink-2); font-weight: 600; }
.zf-chip strong { color: var(--zf-muted); font-weight: 600; }

/* ============================ Ads & packs ============================ */

.zf-ad-list { display: flex; flex-direction: column; gap: 10px; }
.zf-ad-item { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--zf-line); border-radius: 11px; align-items: flex-start; }
.zf-ad-thumb { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; background: #eef2f8; flex: 0 0 auto; }
.zf-ad-thumb--html { display: grid; place-items: center; color: #8b9bb2; font-size: 12px; font-family: ui-monospace, monospace; }
.zf-ad-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.zf-ad-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; }
.zf-ad-title strong { font-weight: 650; }
.zf-ad-body p { font-size: 11.5px; }
.zf-ad-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.zf-ad-actions form { display: inline-flex; }
.zf-ad-preview { max-height: 90px; border-radius: 8px; border: 1px solid var(--zf-line); align-self: flex-start; }
.zf-pack-glyph { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #eef2f8; color: #5b6b82; font-size: 14px; flex: 0 0 auto; }
.zf-export-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--zf-line); border-radius: 10px; text-decoration: none; color: inherit; }
.zf-export-row:hover { background: #fafcff; }
.zf-export-row strong { display: block; font-size: 12.5px; }
.zf-export-row em { font-style: normal; font-size: 11px; color: var(--zf-soft); }

.zf-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 26px 18px;
    border: 1.5px dashed #d7e0ed;
    border-radius: 11px;
    background: #f9fbfe;
    cursor: pointer;
    text-align: center;
    position: relative;
}
.zf-dropzone:hover { border-color: var(--zf-accent); background: #f5fdfa; }
.zf-dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.zf-dropzone-icon { font-size: 20px; color: #8b9bb2; }
.zf-dropzone strong { font-size: 12.5px; }
.zf-dropzone em { font-style: normal; font-size: 11px; color: var(--zf-soft); }

/* ============================ Settings extras ============================ */

.zf-provider-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.zf-provider {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px;
    border: 1px solid var(--zf-line);
    border-radius: 11px;
    cursor: pointer;
    background: #fbfcfe;
    position: relative;
}
.zf-provider input { position: absolute; opacity: 0; }
.zf-provider-name { font-size: 12.5px; font-weight: 650; color: var(--zf-ink); }
.zf-provider-state { font-size: 10.5px; color: var(--zf-soft); }
.zf-provider.is-selected { border-color: var(--zf-accent); background: #f2fbf8; box-shadow: 0 0 0 2px rgba(34, 199, 169, .12); }
.zf-provider.is-selected .zf-provider-state { color: #0b7a5c; }

.zf-color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zf-color-field { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--zf-line); border-radius: 9px; background: #fbfcfe; }
.zf-color-field input[type="color"] { width: 30px; height: 30px; padding: 0; border: 1px solid var(--zf-line); border-radius: 7px; background: none; cursor: pointer; flex: 0 0 auto; }
.zf-color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.zf-color-field input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.zf-color-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.zf-color-meta span { font-size: 11px; color: var(--zf-ink-2); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zf-color-meta input { border: 0; background: none; font: inherit; font-size: 10.5px; color: var(--zf-soft); text-transform: uppercase; padding: 0; width: 100%; }
.zf-color-meta input:focus { outline: none; color: var(--zf-ink); }

.zf-range-field { display: flex; flex-direction: column; gap: 6px; padding: 7px 9px; border: 1px solid var(--zf-line); border-radius: 9px; background: #fbfcfe; }
.zf-range-field > span { display: flex; justify-content: space-between; font-size: 11px; color: var(--zf-ink-2); font-weight: 550; }
.zf-range-field em { font-style: normal; color: var(--zf-soft); font-variant-numeric: tabular-nums; }
.zf-range-field input[type="range"] { width: 100%; accent-color: var(--zf-accent); }

.zf-color-inline { display: flex; gap: 8px; align-items: center; }
.zf-color-inline input[type="color"] { width: 40px; height: 38px; border: 1px solid var(--zf-line); border-radius: 9px; padding: 2px; background: #fff; }
.zf-color-inline .zf-input { flex: 1; }

.zf-brand-row { display: flex; gap: 16px; align-items: flex-start; }
.zf-brand-preview {
    width: 132px;
    height: 92px;
    border: 1px dashed var(--zf-line);
    border-radius: 11px;
    background: #f9fbfe;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: 0 0 auto;
    padding: 8px;
}
.zf-brand-controls { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.zf-asset { display: flex; flex-direction: column; gap: 6px; }
.zf-asset-label { font-size: 11px; font-weight: 600; color: var(--zf-ink-2); }
.zf-asset-preview { height: 54px; border: 1px dashed var(--zf-line); border-radius: 9px; display: grid; place-items: center; background: #f9fbfe; color: var(--zf-soft); font-size: 12px; overflow: hidden; }
.zf-asset-preview img { max-height: 46px; }
.zf-asset-preview--wide img { max-height: 48px; max-width: 100%; }

.zf-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.zf-preset {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border: 1px solid var(--zf-line);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    color: var(--zf-ink-2);
    cursor: pointer;
    align-items: center;
}
.zf-preset:hover { border-color: var(--zf-accent); }
.zf-preset span { width: 100%; height: 12px; border-radius: 4px; border: 1px solid rgba(15, 23, 42, .07); }

.zf-key-box { border: 1px solid var(--zf-line); border-radius: 10px; padding: 11px 13px; background: #f9fbfe; display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.zf-key-box code { word-break: break-all; background: none; padding: 0; font-size: 12px; color: var(--zf-ink); }
.zf-link-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.zf-copy-row { display: flex; gap: 8px; align-items: center; }
.zf-copy-row .zf-input { flex: 1; }
.zf-copy-row--stack { align-items: stretch; flex-direction: column; }

/* ============================ Builder ============================ */

.zf-editor { display: flex; flex-direction: column; gap: 0; margin: -24px -28px -60px; }

.zf-editor-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 28px;
    background: var(--zf-panel);
    border-bottom: 1px solid var(--zf-line);
}
.zf-editor-bar-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.zf-title-input {
    border: 0;
    background: none;
    font: inherit;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -.02em;
    color: var(--zf-ink);
    padding: 2px 0;
    width: 100%;
}
.zf-title-input:focus { outline: none; box-shadow: 0 1px 0 var(--zf-accent); }
.zf-editor-bar-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--zf-soft); flex-wrap: wrap; }
.zf-url-prefix { font-family: ui-monospace, monospace; font-size: 11px; }
.zf-slug-input {
    border: 0;
    background: #f3f6fb;
    border-radius: 6px;
    font: inherit;
    font-size: 11.5px;
    padding: 3px 7px;
    color: var(--zf-ink-2);
    width: 150px;
    font-family: ui-monospace, monospace;
}
.zf-slug-input:focus { outline: 1px solid var(--zf-accent); }
.zf-status-select { border: 1px solid var(--zf-line); border-radius: 6px; font: inherit; font-size: 10.5px; padding: 3px 5px; background: #fff; color: var(--zf-ink-2); }
.zf-editor-bar-right { display: flex; align-items: center; gap: 10px; }
.zf-save-hint { font-size: 11px; color: var(--zf-soft); }
.zf-save-hint.is-dirty { color: #b45309; }

.zf-editor > .zf-tabs { padding: 0 28px; background: var(--zf-panel); }
.zf-editor > .zf-tabs .zf-tab { padding: 10px 12px; }

.zf-builder { display: grid; grid-template-columns: 214px minmax(0, 1fr) 306px; gap: 0; align-items: stretch; min-height: calc(100vh - 180px); }

.zf-palette { padding: 18px 14px 30px; border-right: 1px solid var(--zf-line); background: var(--zf-panel); display: flex; flex-direction: column; gap: 14px; overflow-y: auto; max-height: calc(100vh - 150px); position: sticky; top: 62px; }
.zf-palette h3 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--zf-soft); }
.zf-palette-group { display: flex; flex-direction: column; gap: 3px; }
.zf-palette-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #a7b3c4; font-weight: 650; padding: 4px 4px 2px; }
.zf-palette-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    font: inherit;
    font-size: 12px;
    color: var(--zf-ink-2);
    text-align: left;
    cursor: pointer;
}
.zf-palette-btn:hover { background: #f3f8f6; border-color: #d9efe7; color: var(--zf-ink); }
.zf-palette-glyph { width: 20px; height: 20px; border-radius: 5px; background: #eef2f8; display: grid; place-items: center; font-size: 10px; color: #64748b; flex: 0 0 auto; }
.zf-palette-plus { margin-left: auto; color: #b6c2d2; font-size: 12px; }
.zf-palette-btn:hover .zf-palette-plus { color: var(--zf-accent); }

.zf-canvas { padding: 18px 20px 40px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.zf-canvas-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.zf-canvas-head h2 { font-size: 14px; }
.zf-canvas-head p { font-size: 11.5px; color: var(--zf-muted); }
.zf-canvas-tools { display: flex; gap: 6px; }
.zf-builder-list { display: flex; flex-direction: column; gap: 8px; }

.zf-fcard {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    background: var(--zf-panel);
    border: 1px solid var(--zf-line);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.zf-fcard:hover { border-color: #cbd8ea; }
.zf-fcard.is-selected { border-color: var(--zf-accent); box-shadow: 0 0 0 2px rgba(34, 199, 169, .12); }
.zf-fcard.is-dragging { opacity: .5; }
.zf-fcard-glyph { width: 26px; height: 26px; border-radius: 7px; background: #f1f5fa; display: grid; place-items: center; font-size: 11px; color: #64748b; flex: 0 0 auto; }
.zf-fcard-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.zf-fcard-main strong { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zf-fcard-main span { font-size: 10.5px; color: var(--zf-soft); font-family: ui-monospace, monospace; }
.zf-fcard-tools { display: flex; gap: 1px; align-items: center; }
.zf-fcard-tools button {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 11px;
    display: grid;
    place-items: center;
}
.zf-fcard-tools button:hover { background: #eef2f8; color: var(--zf-ink); }
.zf-fcard-tools button[data-del]:hover { background: #fdeeee; color: #b91c1c; }
.zf-fcard-badge { font-size: 9.5px; padding: 1px 5px; border-radius: 4px; background: #f1f5fa; color: #7b8798; font-weight: 650; }
.zf-fcard-badge--req { background: #fff5e0; color: #8d5c07; }
.zf-canvas-empty { text-align: center; font-size: 12.5px; color: var(--zf-soft); padding: 34px 10px; border: 1px dashed var(--zf-line); border-radius: 11px; }

.zf-inspector { border-left: 1px solid var(--zf-line); background: var(--zf-panel); padding: 18px 16px 40px; overflow-y: auto; max-height: calc(100vh - 150px); position: sticky; top: 62px; }
.zf-inspector-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--zf-soft); text-align: center; padding: 40px 10px; font-size: 12px; }
.zf-inspector-empty span { font-size: 22px; color: #cbd5e1; }
.zf-inspector-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.zf-inspector-title strong { font-size: 12.5px; }
.zf-inspector-title span { font-size: 10px; color: var(--zf-soft); text-transform: uppercase; letter-spacing: .08em; }
.zf-inspector .zf-field { margin-bottom: 10px; }
.zf-inspector .zf-field > span { font-size: 11px; }
.zf-inspector .zf-input { height: 34px; font-size: 12px; }
.zf-inspector textarea.zf-input { height: auto; }
.zf-inspector-sep { border: 0; border-top: 1px solid var(--zf-line-2); margin: 12px 0; }
.zf-inspector-note { font-size: 10.5px; color: var(--zf-soft); line-height: 1.5; }

.zf-preview-panel { margin: 0 28px 30px; border: 1px solid var(--zf-line); border-radius: 12px; background: var(--zf-panel); padding: 16px; }
.zf-preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.zf-preview-head h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--zf-muted); }
.zf-preview-body { border-radius: 10px; padding: 14px; background: #f8fafc; }
.zf-preview-body .zfp-mini-field { margin-bottom: 10px; }
.zf-preview-body label { display: block; font-size: 11px; font-weight: 600; margin-bottom: 4px; color: #475569; }
.zf-preview-body input { width: 100%; height: 34px; border: 1px solid #dbe3ef; border-radius: 7px; background: #fff; padding: 0 9px; font-size: 12px; }
.zf-preview-body button { margin-top: 4px; height: 34px; padding: 0 16px; border: 0; border-radius: 8px; background: #0f172a; color: #fff; font-size: 12px; font-weight: 600; }

/* Design tab */

.zf-design { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; padding: 20px 28px 50px; align-items: start; }
.zf-design-controls { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.zf-design-preview { position: sticky; top: 84px; }
.zf-preview-sticky { background: var(--zf-panel); border: 1px solid var(--zf-line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }

#zf-theme-preview {
    --zfp-font: var(--zf-font, system-ui);
    background: var(--zf-page-bg, #f2f5fb);
    border-radius: 12px;
    padding: 16px;
}
.zfp-card {
    background: var(--zf-card-bg, #fff);
    border: 1px solid var(--zf-card-border, #e2e8f2);
    border-radius: var(--zf-radius, 18px);
    box-shadow: var(--zf-card-shadow, 0 18px 45px -28px rgba(15,23,42,.35));
    padding: min(var(--zf-pad, 32px), 22px);
    font-family: var(--zf-font, system-ui);
    font-size: calc(var(--zf-font-size, 16px) * .82);
    color: var(--zf-text, #1f2937);
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.zfp-card h4 { margin: 0 0 2px; font-size: 1.08em; color: var(--zf-heading, #111827); }
.zfp-intro { margin: 0 0 8px; font-size: .85em; color: var(--zf-muted, #6b7280); }
.zfp-label { font-size: .8em; font-weight: 600; color: var(--zf-label, #374151); margin-top: 4px; }
.zfp-input {
    border: 1px solid var(--zf-input-border, #d6deea);
    background: var(--zf-input-bg, #fbfcfe);
    color: var(--zf-input-text, #111827);
    min-height: 34px;
    border-radius: min(var(--zf-input-radius, 10px), 12px);
    display: flex;
    align-items: center;
    padding: 0 11px;
    font-size: .9em;
    color: var(--zf-input-placeholder, #9aa4b2);
}
.zfp-input--focus { border-color: var(--zf-focus, #22c7a9); box-shadow: 0 0 0 3px rgba(34, 199, 169, .16); background: var(--zf-card-bg, #fff); }
.zfp-input--area { min-height: 48px; align-items: flex-start; padding-top: 9px; }
.zfp-error { font-size: .74em; color: var(--zf-error, #dc2626); margin-top: 2px; }
.zfp-btn {
    margin-top: 9px;
    text-align: center;
    color: var(--zf-btn-text, #fff);
    background: var(--zf-btn-bg, #0f766e);
    border-radius: min(var(--zf-btn-radius, 10px), 12px);
    padding: 9px;
    font-weight: 650;
    font-size: .86em;
}
.zfp-ad {
    margin-top: 8px;
    padding: 7px;
    border: 1px dashed var(--zf-ad-border, #e5eaf2);
    border-radius: 8px;
    background: var(--zf-ad-bg, #f8fafc);
    color: var(--zf-ad-text, #64748b);
    font-size: .7em;
    text-align: center;
}

/* Share tab */

.zf-share { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px 28px 50px; align-items: start; }

/* ============================ Auth ============================ */

body.zf-auth { margin: 0; background: #f4f6fb; min-height: 100vh; font: 14px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }

.zf-auth-shell { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }

.zf-auth-art {
    position: relative;
    background: radial-gradient(120% 100% at 10% 0%, #123042 0%, #0b1220 55%, #080d16 100%);
    color: #e2e8f0;
    padding: 60px 56px;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.zf-auth-art-inner { position: relative; z-index: 2; max-width: 420px; }
.zf-auth-badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 20px;
    background: rgba(34, 199, 169, .14);
    color: #7ce9d3;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .04em;
}
.zf-auth-art h1 { margin: 22px 0 14px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.035em; font-weight: 700; }
.zf-auth-art p { color: #a9b6ca; font-size: 14px; line-height: 1.7; margin: 0 0 24px; }
.zf-auth-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: #cbd5e1; }
.zf-auth-list li { display: flex; gap: 9px; align-items: center; }
.zf-auth-list li::before { content: "✓"; color: #22c7a9; font-weight: 700; }
.zf-auth-glow {
    position: absolute;
    width: 460px;
    height: 460px;
    right: -160px;
    bottom: -180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 199, 169, .28), transparent 65%);
    filter: blur(10px);
}

.zf-auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.zf-auth-box { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 4px; }
.zf-auth-logo { max-height: 44px; width: auto; align-self: flex-start; margin-bottom: 12px; }
.zf-auth-box .zf-mark { margin-bottom: 14px; }
.zf-auth-box h2 { font-size: 21px; letter-spacing: -.025em; margin: 0 0 4px; color: #0f172a; }
.zf-auth-sub { color: #64748b; font-size: 13px; margin-bottom: 18px; }
.zf-auth-box .zf-field { margin-bottom: 12px; }
.zf-auth-box .zf-field > span { font-size: 11.5px; font-weight: 600; color: #334155; }
.zf-auth-box .zf-input { height: 42px; font-size: 13.5px; }
.zf-auth-note { font-size: 11.5px; color: #94a3b8; margin-top: 16px; line-height: 1.6; }

/* ============================ Responsive ============================ */

@media (max-width: 1180px) {
    .zf-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .zf-builder { grid-template-columns: 190px minmax(0, 1fr) 280px; }
    .zf-grid-3 { grid-template-columns: 1fr 1fr; }
    .zf-provider-grid { grid-template-columns: 1fr 1fr; }
    .zf-design { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 980px) {
    .zf-side { position: static; width: 100%; flex-direction: row; align-items: center; gap: 10px; padding: 10px 14px; overflow-x: auto; }
    .zf-side-brand { border: 0; padding: 0 10px 0 0; }
    .zf-nav { flex-direction: row; gap: 2px; flex: 0 0 auto; }
    .zf-nav-item { padding: 7px 10px; }
    .zf-nav-label { font-size: 12px; }
    .zf-side-foot { flex-direction: row; align-items: center; gap: 8px; margin-left: auto; }
    .zf-side-user { background: none; padding: 0; }
    .zf-side-user-txt { display: none; }
    .zf-side-link { display: none; }
    .zf-main { margin-left: 0; }
    .zf-content { padding: 18px 16px 50px; }
    .zf-topbar { padding: 14px 16px; }
    .zf-editor { margin: -18px -16px -50px; }
    .zf-editor-bar, .zf-editor > .zf-tabs { padding-left: 16px; padding-right: 16px; }
    .zf-builder { grid-template-columns: 1fr; }
    .zf-palette, .zf-inspector { position: static; max-height: none; border: 0; border-bottom: 1px solid var(--zf-line); }
    .zf-palette { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .zf-palette h3 { width: 100%; }
    .zf-palette-group { flex: 1 1 150px; }
    .zf-canvas { padding: 16px; }
    .zf-design { grid-template-columns: 1fr; padding: 16px; }
    .zf-design-preview { position: static; }
    .zf-share { grid-template-columns: 1fr; padding: 16px; }
    .zf-grid-2, .zf-grid-2--wide { grid-template-columns: 1fr; }
    .zf-inbox { grid-template-columns: 1fr; }
    .zf-inbox-detail { position: static; }
    .zf-auth-shell { grid-template-columns: 1fr; }
    .zf-auth-art { display: none; }
    .zf-auth-panel { min-height: 100vh; }
    .zf-color-grid { grid-template-columns: 1fr; }
    .zf-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .zf-kpi-grid { grid-template-columns: 1fr 1fr; }
    .zf-kpi-grid--tight { grid-template-columns: 1fr; }
    .zf-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .zf-field-grid { grid-template-columns: 1fr; }
    .zf-kpi-grid { grid-template-columns: 1fr 1fr; }
    .zf-provider-grid { grid-template-columns: 1fr; }
    .zf-form-card-foot { flex-wrap: wrap; }
    .zf-detail-row { grid-template-columns: 1fr; gap: 3px; }
    .zf-brand-row { flex-direction: column; }
    .zf-donut { flex-direction: column; align-items: flex-start; }
}

/* ============================ Colour mode ============================ */

.zf-mode-btn {
    display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
    border: 1px solid var(--zf-line); border-radius: 10px; background: var(--zf-panel);
    color: var(--zf-ink-2); cursor: pointer; line-height: 0;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.zf-mode-btn:hover { background: #f4f7fc; color: var(--zf-ink); }
.zf-mode-btn:focus-visible { outline: 2px solid var(--zf-accent); outline-offset: 2px; }
.zf-mode-btn--float { position: fixed; top: 18px; right: 18px; z-index: 60; box-shadow: var(--zf-shadow); }
.zf-mode-glyph { display: none; }
html[data-zf-mode="dark"] .zf-mode-glyph--sun { display: block; }
html[data-zf-mode="light"] .zf-mode-glyph--moon { display: block; }
html:not([data-zf-mode]) .zf-mode-glyph--moon { display: block; }

html[data-zf-mode="dark"] {
    --zf-bg: #0a0f19; --zf-panel: #111a2a; --zf-ink: #eef3fb; --zf-ink-2: #c6d3e4;
    --zf-muted: #93a2b8; --zf-soft: #7f8fa6; --zf-line: #243149; --zf-line-2: #1b2537;
    --zf-side: #070c14; --zf-side-2: #0c1421;
    --zf-shadow: 0 22px 50px -30px rgba(0, 0, 0, .9);
    color-scheme: dark;
}
html[data-zf-mode="dark"] body.zf-admin { background: var(--zf-bg); }
html[data-zf-mode="dark"] .zf-topbar { background: rgba(10, 15, 25, .86); border-bottom-color: var(--zf-line); }
html[data-zf-mode="dark"] .zf-mode-btn { background: #162033; border-color: #2a3a53; color: #dbe6f5; }
html[data-zf-mode="dark"] .zf-mode-btn:hover { background: #1c2841; }
html[data-zf-mode="dark"] code { background: #1a2740; color: #cfe0f5; }
html[data-zf-mode="dark"] .zf-btn { background: #162033; border-color: #2a3a53; color: #e6eefb; }
html[data-zf-mode="dark"] .zf-btn:hover { background: #1c2841; border-color: #3a4d6b; }
html[data-zf-mode="dark"] .zf-btn--primary { background: var(--zf-accent); border-color: transparent; color: #04130f; }
html[data-zf-mode="dark"] .zf-btn--danger { background: #2a1519; border-color: #5d2a31; color: #ffb4b4; }
html[data-zf-mode="dark"] .zf-btn--danger:hover { background: #341a1f; border-color: #743540; }
html[data-zf-mode="dark"] .zf-icon-btn:hover { background: #1a2438; }
html[data-zf-mode="dark"] .zf-flash { background: #0d2a22; border-color: #1c5445; color: #a9f0d8; }
html[data-zf-mode="dark"] .zf-flash--error { background: #2a1519; border-color: #5d2a31; color: #ffc2c2; }
html[data-zf-mode="dark"] .zf-flash--warn { background: #2a2213; border-color: #5c4a1e; color: #ffd89a; }
html[data-zf-mode="dark"] .zf-pill--ok, html[data-zf-mode="dark"] .zf-tag--ok { background: #0d2a22; color: #7fe6c4; }
html[data-zf-mode="dark"] .zf-pill--warn, html[data-zf-mode="dark"] .zf-tag--warn { background: #2a2213; color: #ffd89a; }
html[data-zf-mode="dark"] .zf-pill--error, html[data-zf-mode="dark"] .zf-tag--error { background: #2a1519; color: #ffc2c2; }
html[data-zf-mode="dark"] .zf-pill--muted, html[data-zf-mode="dark"] .zf-tag { background: #1a2740; color: #a9b8cc; }
html[data-zf-mode="dark"] .zf-pill--neutral { background: #1a2740; color: #a9b8cc; }
html[data-zf-mode="dark"] .zf-input,
html[data-zf-mode="dark"] .zf-select,
html[data-zf-mode="dark"] .zf-textarea,
html[data-zf-mode="dark"] .zf-field input,
html[data-zf-mode="dark"] .zf-field select,
html[data-zf-mode="dark"] .zf-field textarea { background: #0d1624; border-color: #2a3a53; color: #e8eef7; }
html[data-zf-mode="dark"] .zf-input:focus,
html[data-zf-mode="dark"] .zf-select:focus,
html[data-zf-mode="dark"] .zf-textarea:focus { background: #0f1a2b; border-color: var(--zf-accent); }
/* Native dropdown lists render in a browser popup: without explicit option
   colours they stay white while the option text inherits the light colour. */
html[data-zf-mode="dark"] select { color-scheme: dark; }
html[data-zf-mode="dark"] select option,
html[data-zf-mode="dark"] select optgroup,
html[data-zf-mode="dark"] datalist option { background-color: #0d1624; color: #e8eef7; }
html[data-zf-mode="dark"] select option:checked,
html[data-zf-mode="dark"] select option:hover { background-color: #1c2b45; color: #ffffff; }
html[data-zf-mode="dark"] .zf-status-select { color-scheme: dark; }
html[data-zf-mode="dark"] .zf-table thead th { background: #0f1828; color: #9fb0c7; border-color: var(--zf-line); }
html[data-zf-mode="dark"] .zf-table td { border-color: #1d283b; }
html[data-zf-mode="dark"] .zf-table tbody tr:hover { background: #141f33; }
html[data-zf-mode="dark"] .zf-menu-panel { background: #111a2a; border-color: #2a3a53; }
html[data-zf-mode="dark"] .zf-savebar { background: rgba(10, 15, 25, .92); border-top-color: var(--zf-line); }
.zf-auth-links { margin: 10px 0 0; font-size: 13px; text-align: center; }
.zf-auth-links a { color: var(--zf-accent); text-decoration: none; font-weight: 600; }
.zf-auth-links a:hover { text-decoration: underline; }
.zf-auth-remember { margin: 2px 0; font-size: 13px; color: var(--zf-muted); }
html[data-zf-mode="dark"] .zf-auth { background: #080d16; }
html[data-zf-mode="dark"] .zf-auth-box { background: #111a2a; border-color: #223049; }
html[data-zf-mode="dark"] .zf-auth-panel { background: #080d16; }
html[data-zf-mode="dark"] .zf-kpi { background: var(--zf-panel); border-color: var(--zf-line); }
html[data-zf-mode="dark"] .zf-dropzone { background: #0d1624; border-color: #2a3a53; }
html[data-zf-mode="dark"] .zf-seg { background: #0d1624; }
html[data-zf-mode="dark"] .zf-seg.is-active { background: #1c2841; color: #eef3fb; }
html[data-zf-mode="dark"] .zf-inbox-item:hover { background: #141f33; }

/* Dark mode: remaining light surfaces (cards, notes, editors, auth) */

html[data-zf-mode="dark"] .zf-segmented { background: #101a2a; }
html[data-zf-mode="dark"] .zf-seg { color: #93a2b8; }
html[data-zf-mode="dark"] .zf-seg:hover { color: #eef3fb; }
html[data-zf-mode="dark"] .zf-seg.is-active { background: #1c2841; color: #eef3fb; }
html[data-zf-mode="dark"] .zf-topbar .zf-btn { border-color: transparent; }
html[data-zf-mode="dark"] .zf-note-box { background: #0d1624; border-color: #2a3a53; color: #a9b8cc; }
html[data-zf-mode="dark"] .zf-note-box strong { color: #e6eefb; }
html[data-zf-mode="dark"] .zf-note-box code { background: #1a2740; color: #cfe0f5; }
html[data-zf-mode="dark"] .zf-provider { background: #0d1624; border-color: #2a3a53; }
html[data-zf-mode="dark"] .zf-provider.is-selected { background: #10312a; border-color: var(--zf-accent); box-shadow: 0 0 0 2px rgba(34, 199, 169, .18); }
html[data-zf-mode="dark"] .zf-provider-name { color: #eef3fb; }
html[data-zf-mode="dark"] .zf-provider-state { color: #93a2b8; }
html[data-zf-mode="dark"] .zf-provider.is-selected .zf-provider-state { color: #7fe6c4; }
html[data-zf-mode="dark"] .zf-color-field,
html[data-zf-mode="dark"] .zf-range-field { background: #0d1624; border-color: #2a3a53; }
html[data-zf-mode="dark"] .zf-color-field input[type="color"],
html[data-zf-mode="dark"] .zf-color-inline input[type="color"] { background: #162033; border-color: #2a3a53; }
html[data-zf-mode="dark"] .zf-color-meta span,
html[data-zf-mode="dark"] .zf-range-field > span,
html[data-zf-mode="dark"] .zf-asset-label { color: #c6d3e4; }
html[data-zf-mode="dark"] .zf-brand-preview,
html[data-zf-mode="dark"] .zf-asset-preview { background: #0d1624; border-color: #2a3a53; color: #7f8fa6; }
html[data-zf-mode="dark"] .zf-preset { background: #162033; border-color: #2a3a53; color: #c6d3e4; }
html[data-zf-mode="dark"] .zf-key-box { background: #0d1624; border-color: #2a3a53; }
html[data-zf-mode="dark"] .zf-key-box code { color: #e8eef7; }
html[data-zf-mode="dark"] .zf-chip { background: #162033; color: #c6d3e4; }
html[data-zf-mode="dark"] .zf-ad-thumb,
html[data-zf-mode="dark"] .zf-pack-glyph,
html[data-zf-mode="dark"] .zf-fcard-glyph,
html[data-zf-mode="dark"] .zf-palette-glyph,
html[data-zf-mode="dark"] .zf-inbox-avatar { background: #162033; color: #a9b8cc; }
html[data-zf-mode="dark"] .zf-bar-track { background: #1b2537; }
html[data-zf-mode="dark"] .zf-dot--muted { background: #33425c; }
html[data-zf-mode="dark"] .zf-switch span { background: #33425c; }
html[data-zf-mode="dark"] .zf-switch span::after { background: #e8eef7; }
html[data-zf-mode="dark"] .zf-slug-input { background: #162033; color: #dbe6f5; }
html[data-zf-mode="dark"] .zf-status-select { background: #162033; border-color: #2a3a53; color: #dbe6f5; }
html[data-zf-mode="dark"] .zf-preview-body { background: #0d1624; }
html[data-zf-mode="dark"] .zf-preview-body label { color: #c6d3e4; }
html[data-zf-mode="dark"] .zf-preview-body input { background: #162033; border-color: #2a3a53; color: #e8eef7; }
html[data-zf-mode="dark"] .zf-dropzone:hover { background: #122033; }
html[data-zf-mode="dark"] .zf-input::placeholder,
html[data-zf-mode="dark"] .zf-field input::placeholder,
html[data-zf-mode="dark"] .zf-field textarea::placeholder { color: #6c7c92; }

/* Dark mode: sign-in screen */
html[data-zf-mode="dark"] .zf-auth-panel { background: #070c15; }
html[data-zf-mode="dark"] .zf-auth-box { background: #111a2a; border: 1px solid #243149; border-radius: 14px; padding: 26px 24px; box-shadow: 0 22px 50px -30px rgba(0, 0, 0, .9); }
html[data-zf-mode="dark"] .zf-auth-box h2 { color: #eef3fb; }
html[data-zf-mode="dark"] .zf-auth-sub { color: #93a2b8; }
html[data-zf-mode="dark"] .zf-auth-box .zf-field > span { color: #c6d3e4; }
html[data-zf-mode="dark"] .zf-auth-note { color: #7f8fa6; }
