/* Outbound Suite subscriber shell (Phase L — M1 visual polish).
   Same class contract as before; refined tokens and component styling. */

:root {
    --navy: #0f172a;
    --navy-2: #1e293b;
    --bg: #f4f6f9;
    --card: #ffffff;
    --border: #e4e8ef;
    --border-strong: #d4dae4;
    --text: #0f172a;
    --text-soft: #334155;
    --muted: #64748b;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: #eff4ff;
    --green: #16a34a;
    --green-bg: #e7f6ec;
    --red: #dc2626;
    --red-bg: #fdecec;
    --amber: #b45309;
    --amber-bg: #fdf3e0;
    --blue-bg: #e8effd;
    --gray-bg: #f1f5f9;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 4px 12px rgba(15, 23, 42, 0.08);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body.saas {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app { display: flex; min-height: 100vh; }

/* ---- sidebar (light theme default, like new Cloudflare) ---- */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    color: var(--text-soft);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--border);
    transition: width 0.16s ease;
}
.brand { padding: 22px 18px 16px; border-bottom: 1px solid var(--border); }
.brand .logo { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; }
.brand .logo .logo-chip {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}
.brand .tagline { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* brand logo SVG sizing (paper-plane default + admin-supplied marks) */
.logo-chip svg { width: 18px; height: 18px; display: block; }
.auth-logo svg { width: 20px; height: 20px; display: block; flex-shrink: 0; }
.auth-mobile-brand .auth-logo svg { width: 17px; height: 17px; }

.nav { flex: 1; overflow-y: auto; padding: 12px; }
.nav a.item, .nav summary.item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    list-style: none;
    position: relative;
    transition: background 0.12s ease, color 0.12s ease;
}
.nav-ico { font-size: 17px; width: 21px; text-align: center; flex-shrink: 0; }
.nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-caret {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    color: var(--muted);
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.15s ease;
}
.nav details.submenu[open] > summary .nav-caret { transform: rotate(225deg) translateY(1px); }
.nav a.item:hover, .nav summary.item:hover { background: var(--gray-bg); color: var(--text); }
.nav a.item.active { background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }
.nav a.item.active .nav-ico { color: var(--blue); }
.nav details.submenu summary::-webkit-details-marker { display: none; }
.nav .sub { margin: 4px 0 8px 18px; border-left: 1px solid var(--border); padding-left: 10px; }
.nav .sub a {
    display: block;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    padding: 7px 9px;
    border-radius: 7px;
    transition: background 0.12s ease, color 0.12s ease;
}
.nav .sub a:hover, .nav .sub a.active { color: var(--text); background: var(--gray-bg); }
.badge-soon {
    font-size: 10px;
    background: var(--gray-bg);
    color: var(--muted);
    border-radius: 999px;
    padding: 2px 8px;
    margin-left: auto;
    font-weight: 600;
}

.plan-card {
    margin: 12px;
    background: var(--gray-bg);
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    border: 1px solid var(--border);
}
.plan-card .row { display: flex; justify-content: space-between; align-items: center; }
.plan-card .pname { color: var(--text); font-weight: 600; }
.plan-card .pactive { font-size: 12px; color: var(--green); font-weight: 600; }
.plan-card .usage { color: var(--muted); font-size: 13px; margin: 10px 0 6px; }
.bar { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.btn-plan {
    display: block;
    text-align: center;
    margin-top: 12px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    padding: 9px;
    transition: background 0.12s ease;
}
.btn-plan:hover { background: var(--gray-bg); }
.btn-plan.btn-upgrade {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    font-weight: 600;
    border: none;
}
.btn-plan.btn-upgrade:hover { background: linear-gradient(135deg, #2563eb, #1e40af); }

/* sidebar footer controls (theme + collapse) */
.sidebar-foot { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.sb-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    background: none; border: 1px solid var(--border); border-radius: 8px;
    padding: 8px 6px; cursor: pointer; font-size: 13px; color: var(--muted);
    transition: background 0.12s ease, color 0.12s ease;
}
.sb-btn:hover { background: var(--gray-bg); color: var(--text); }

/* ---- dark theme ---- */
body[data-sb-theme="dark"] .sidebar { background: var(--navy); color: #cbd5e1; border-right-color: transparent; }
body[data-sb-theme="dark"] .brand { border-bottom-color: rgba(148,163,184,0.12); }
body[data-sb-theme="dark"] .brand .logo { color: #fff; }
body[data-sb-theme="dark"] .brand .tagline { color: #94a3b8; }
body[data-sb-theme="dark"] .nav a.item, body[data-sb-theme="dark"] .nav summary.item { color: #94a3b8; }
body[data-sb-theme="dark"] .nav a.item:hover, body[data-sb-theme="dark"] .nav summary.item:hover { background: var(--navy-2); color: #fff; }
body[data-sb-theme="dark"] .nav a.item.active { background: var(--blue); color: #fff; }
body[data-sb-theme="dark"] .nav a.item.active .nav-ico { color: #fff; }
body[data-sb-theme="dark"] .nav .sub { border-left-color: rgba(148,163,184,0.2); }
body[data-sb-theme="dark"] .nav .sub a { color: #94a3b8; }
body[data-sb-theme="dark"] .nav .sub a:hover, body[data-sb-theme="dark"] .nav .sub a.active { color: #fff; background: var(--navy-2); }
body[data-sb-theme="dark"] .badge-soon { background: rgba(148,163,184,0.18); color: #cbd5e1; }
body[data-sb-theme="dark"] .nav-caret { color: #64748b; }
body[data-sb-theme="dark"] .plan-card { background: var(--navy-2); border-color: rgba(148,163,184,0.1); }
body[data-sb-theme="dark"] .plan-card .pname { color: #fff; }
body[data-sb-theme="dark"] .plan-card .pactive { color: #6ee7b7; }
body[data-sb-theme="dark"] .plan-card .usage { color: #94a3b8; }
body[data-sb-theme="dark"] .plan-card .bar { background: rgba(148,163,184,0.2); }
body[data-sb-theme="dark"] .btn-plan { background: rgba(148,163,184,0.16); color: #fff; border-color: transparent; }
body[data-sb-theme="dark"] .btn-plan:hover { background: rgba(148,163,184,0.28); }
body[data-sb-theme="dark"] .sidebar-foot { border-top-color: rgba(148,163,184,0.12); }
body[data-sb-theme="dark"] .sb-btn { border-color: rgba(148,163,184,0.16); color: #94a3b8; }
body[data-sb-theme="dark"] .sb-btn:hover { background: var(--navy-2); color: #fff; }

/* ---- collapsed: icon rail; hovering the sidebar expands it back ---- */
body[data-sb-collapsed="1"] .sidebar:not(:hover) { width: 68px; }
body[data-sb-collapsed="1"] .sidebar:not(:hover) .brand { padding: 20px 0 14px; }
body[data-sb-collapsed="1"] .sidebar:not(:hover) .brand .logo { justify-content: center; }
body[data-sb-collapsed="1"] .sidebar:not(:hover) .brand .nav-label,
body[data-sb-collapsed="1"] .sidebar:not(:hover) .tagline { display: none; }
body[data-sb-collapsed="1"] .sidebar:not(:hover) .nav { padding: 12px 10px; }
body[data-sb-collapsed="1"] .sidebar:not(:hover) .nav a.item,
body[data-sb-collapsed="1"] .sidebar:not(:hover) .nav summary.item { justify-content: center; padding: 11px 8px; }
body[data-sb-collapsed="1"] .sidebar:not(:hover) .nav-label,
body[data-sb-collapsed="1"] .sidebar:not(:hover) .nav-caret { display: none; }
body[data-sb-collapsed="1"] .sidebar:not(:hover) .nav .sub { display: none; }
body[data-sb-collapsed="1"] .sidebar:not(:hover) .plan-card { display: none; }
body[data-sb-collapsed="1"] .sidebar:not(:hover) .sidebar-foot { flex-direction: column; }
body[data-sb-collapsed="1"] .sidebar:not(:hover) .sb-btn { width: 100%; }
body[data-sb-collapsed="1"] .sidebar:not(:hover) .sb-btn .nav-label { display: none; }

/* ---- main + topbar ---- */
.main { flex: 1; min-width: 0; }
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.search { flex: 1; max-width: 480px; display: flex; }
.search input {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.search input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-soft); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.bell { position: relative; font-size: 18px; color: var(--muted); text-decoration: none; }
.bell .dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 9px;
    height: 9px;
    background: var(--red);
    border-radius: 50%;
    border: 2px solid #fff;
}
.logout { text-decoration: none; font-size: 13px; font-weight: 500; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; padding: 7px 14px; white-space: nowrap; }
.logout:hover { color: var(--red); border-color: var(--red); }

/* ---- user dropdown menu ---- */
.usermenu { position: relative; }
.userbox {
    display: flex; align-items: center; gap: 10px;
    background: none; border: none; padding: 0; cursor: pointer;
    font: inherit; color: inherit; text-align: left;
}
.userbox-meta { display: flex; flex-direction: column; line-height: 1.2; }
.avatar {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
.avatar-alert {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 16px;
    height: 16px;
    background: var(--red);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
}
.userbox .uemail { font-size: 13px; font-weight: 600; color: var(--text); }
.userbox .uplan { font-size: 12px; color: var(--muted); }
.userbox .caret { font-size: 11px; color: var(--muted); }
.usermenu .menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
    z-index: 50;
}
.usermenu:hover .menu,
.usermenu:focus-within .menu { opacity: 1; visibility: visible; transform: translateY(0); }
.menu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 8px;
    text-decoration: none; color: var(--text);
}
.menu-item:hover { background: var(--bg); }
.menu-item .menu-ico { font-size: 16px; width: 20px; min-width: 20px; text-align: center; flex-shrink: 0; }
.menu-item b { display: block; font-size: 13px; font-weight: 600; }
.menu-item small { display: block; font-size: 11.5px; color: var(--muted); }
.menu-item-warn { color: var(--amber); }
.menu-item-warn small { color: var(--amber); }
.menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.menu-label {
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
    color: var(--muted); padding: 6px 12px 3px;
}
.menu-item-btn {
    width: 100%; background: none; border: none; cursor: pointer;
    font: inherit; text-align: left; border-radius: 8px;
}
.menu-item-btn:hover { background: var(--bg); }
.menu-item-btn.ws-current { opacity: .65; cursor: default; }
.menu-item-btn.ws-current b::after { content: ' ✓'; color: var(--blue); }

/* ---- content ---- */
.content { padding: 28px; max-width: 1280px; }
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -0.01em; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.range {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 9px 13px;
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.range:hover { border-color: var(--border-strong); }
.range:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }

/* ---- KPI cards ---- */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}
.kpi .top { display: flex; align-items: center; gap: 10px; }
.kpi .icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.kpi .label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .num { font-size: 26px; font-weight: 700; margin: 12px 0 6px; letter-spacing: -0.02em; }
.kpi .delta { font-size: 12px; color: var(--muted); }
.delta.up { color: var(--green); font-weight: 600; }
.delta.down { color: var(--red); font-weight: 600; }
.delta.flat { color: var(--muted); }

/* ---- generic card / table ---- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 14px; font-size: 16px; letter-spacing: -0.01em; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th {
    text-align: left;
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: #fafbfd;
}
table.grid td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.grid tbody tr:hover { background: #fafbfd; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 12px; }
.pill.green { background: var(--green-bg); color: #15803d; }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.blue { background: var(--blue-bg); color: var(--blue-dark); }
.pill.gray { background: var(--gray-bg); color: var(--muted); }
.pill.red { background: var(--red-bg); color: var(--red); }

/* ---- tracking domains ---- */
.td-steps { display: grid; grid-template-columns: 1fr; gap: 18px; }
.td-step { display: flex; gap: 14px; align-items: flex-start; }
.td-step-num {
    width: 28px; height: 28px; flex-shrink: 0;
    border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark);
    font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center;
    margin-top: 1px;
}
.td-step-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.td-step .field-note { margin-bottom: 10px; }

.td-options { display: flex; flex-direction: column; }
.td-option {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 13px 0; border-bottom: 1px solid var(--border);
}
.td-option:last-child { border-bottom: none; padding-bottom: 0; }
.td-option:first-child { padding-top: 0; }
.td-opt-title { font-weight: 600; font-size: 14px; }
.td-opt-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.td-toggle {
    min-width: 74px; text-align: center; font-weight: 600;
    border: 1px solid var(--border);
}
.td-toggle.on { background: var(--green); border-color: var(--green); color: #fff; }
.td-toggle.on:hover { background: #128a3f; border-color: #128a3f; }
.td-toggle.off { background: var(--gray-bg); border-color: var(--border); color: var(--muted); }

/* tracking accordion (help + FAQ): + collapses to × when open */
.td-acc { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.td-acc:last-child { margin-bottom: 0; }
.td-acc summary {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 16px; cursor: pointer; list-style: none;
    font-weight: 600; font-size: 14px; color: var(--text);
    transition: background 0.12s ease;
}
.td-acc summary:hover { background: #fafbfd; }
.td-acc summary::-webkit-details-marker { display: none; }
.td-acc summary::after {
    content: '+'; font-size: 20px; color: var(--blue); font-weight: 500; line-height: 1;
    transition: transform 0.15s ease; flex-shrink: 0;
}
.td-acc[open] summary::after { transform: rotate(45deg); }
.td-acc-body { padding: 0 16px 14px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.td-help { background: var(--blue-soft); border-color: #dbeafe; }
.td-help summary { color: var(--blue-dark); }
.td-help summary::after { color: var(--blue-dark); }
.td-help-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.td-help-steps li { color: var(--text-soft); }

/* ---- notices ---- */
.notice { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; margin: 0 0 16px; border-left: 4px solid transparent; }
.notice.success { background: var(--green-bg); border-left-color: var(--green); color: #166534; }
.notice.error { background: var(--red-bg); border-left-color: var(--red); color: #991b1b; }

/* ---- profile ---- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row .form-group { margin-bottom: 16px; }
.completion { display: flex; align-items: center; gap: 12px; }
.completion-bar { flex: 1; height: 8px; background: var(--gray-bg); border-radius: 999px; overflow: hidden; }
.completion-bar span { display: block; height: 100%; background: var(--green); }
.completion-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.verify-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-left: 4px solid var(--amber); }
.verify-banner p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.verify-banner strong { font-size: 14px; }



/* Email verification code entry */
.verify-code-row { display: flex; align-items: center; gap: 10px; max-width: 320px; }
.verify-code-input {
    flex: 1; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    font-size: 20px; font-weight: 700; letter-spacing: 8px; text-align: center;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.verify-code-input:focus { outline: none; border-color: var(--blue); }
@media (max-width: 720px) {
    .form-row { grid-template-columns: 1fr; }
    .verify-banner { flex-direction: column; align-items: flex-start; }
}
.empty { text-align: center; color: var(--muted); padding: 34px 10px; font-size: 14px; }
.links-row { margin-top: 14px; font-size: 14px; }
.links-row a { color: var(--blue); text-decoration: none; font-weight: 500; }
.links-row a:hover { text-decoration: underline; }
.mini-link { font-size: 13px; color: var(--blue); text-decoration: none; font-weight: 500; }
.mini-link:hover { text-decoration: underline; }

/* ---- phase 5b widgets ---- */
.cols-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.qa-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.qa-row:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.qa-row .icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.qa-row .qat { font-size: 14px; font-weight: 600; }
.qa-row .qas { font-size: 12px; color: var(--muted); }
.qa-row .qago { margin-left: auto; color: var(--muted); font-size: 20px; }
.timeline .trow { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.timeline .trow:last-child { border-bottom: none; }
.timeline .ticon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.timeline .ttext { font-size: 13px; }
.timeline .twhen { font-size: 12px; color: var(--muted); }
.ulabel { font-size: 12px; color: var(--muted); }
.unum { font-size: 18px; font-weight: 700; margin: 4px 0 8px; letter-spacing: -0.01em; }
.bar.light { background: var(--border); }
.plan-row { display: flex; align-items: center; justify-content: space-between; margin: 7px 0; }
.btn-upgrade {
    background: var(--blue);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 7px 16px;
    opacity: 0.55;
    cursor: default;
}

/* ---- forms ---- */
.btn {
    display: inline-block;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    padding: 9px 16px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.btn:hover { border-color: var(--border-strong); background: #fafbfd; }
.btn-primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    font-weight: 600;
}
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-danger { border-color: transparent; color: var(--red); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); }

/* ---- members (invite row) ---- */
.invite-row { display: flex; gap: 10px; max-width: 560px; }
.invite-row input[type="email"] { flex: 1; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
.btn:disabled, .btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    color: var(--muted);
    background: var(--gray-bg);
    border-color: var(--border);
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    background: #fafbfd;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px var(--blue-soft);
}
.field-note {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
}
.tester-box {
    background: #f1f5f9;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px dashed #cbd5e1;
    margin-top: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    white-space: pre-wrap;
}

/* ---- generic dropdown (checkbox / menu) ---- */
.menu { position: relative; display: inline-block; }
.menu .menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}
.menu .menu-trigger:hover { border-color: var(--border-strong); }
.menu .menu-trigger .caret { font-size: 9px; opacity: 0.6; }
.menu .menu-panel {
    position: absolute;
    top: 110%;
    left: 0;
    min-width: 220px;
    max-width: 320px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    z-index: 50;
    display: none;
}
.menu.open .menu-panel { display: block; }
.menu .menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 13px;
    color: var(--text-soft);
    cursor: pointer;
}
.menu .menu-item:hover { background: var(--gray-bg); }
.menu .menu-item input[type="checkbox"] { width: auto; margin: 0; }
.menu .menu-empty { padding: 8px 10px; font-size: 12px; color: var(--muted); }
.editor { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.editor .editor-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
    padding: 6px;
    background: #fafbfd;
    border-bottom: 1px solid var(--border);
}
.editor .editor-bar .ebtn {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 6px;
    color: var(--text-soft);
    font-size: 13px;
    cursor: pointer;
}
.editor .editor-bar .ebtn:hover { background: var(--gray-bg); border-color: var(--border); }
.editor .editor-bar .ebtn.active { background: var(--blue-soft); border-color: #c7d7f5; color: var(--blue-dark); }
.editor .editor-bar .esep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.editor .editor-bar .dd {
    position: relative;
    display: inline-block;
}
.editor .editor-bar .dd .ebtn { min-width: auto; padding: 0 8px 0 10px; gap: 3px; }
.editor .editor-bar .dd .caret { font-size: 8px; opacity: 0.6; }
.editor .editor-bar .dd-menu {
    position: absolute;
    top: 110%;
    left: 0;
    min-width: 150px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 4px;
    z-index: 50;
    display: none;
}
.editor .editor-bar .dd.open .dd-menu { display: block; }
.editor .editor-bar .dd-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-soft);
}
.editor .editor-bar .dd-menu button:hover { background: var(--gray-bg); }
.editor .editor-bar .dd-menu button.active { background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }
.editor .editor-area {
    min-height: 180px;
    max-height: 480px;
    overflow-y: auto;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    outline: none;
}
.editor .editor-area:focus { background: #fff; }
.editor .editor-area:empty::before { content: attr(data-placeholder); color: var(--muted); }
.editor-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
    background: var(--blue-soft);
    border: 1px solid #dbe6fb;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}
.editor-hint code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #fff; padding: 1px 5px; border-radius: 4px; color: var(--blue-dark); }
.html-paste-pop {
    display: none;
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    background: var(--gray-bg);
}
.fu-card {
    border: 1px solid var(--border);
    border-left: 4px solid var(--amber);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 14px;
    background: #fff;
}
.fu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.fu-num { font-weight: 700; font-size: 14px; color: var(--text); }
.fu-remove {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
}
.fu-remove:hover { color: var(--red); background: var(--red-bg); }
.surface {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.surface-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.surface-head h3 { margin: 0; font-size: 15px; }
.surface-head .sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.surface-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
    background: #fafbfd;
}
.leads-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.leads-side { position: sticky; top: 76px; }
.leads-side .side-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
}
.leads-side .side-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    padding: 4px 8px 8px;
}
.leads-side .group-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}
.leads-side .group-link:hover { background: var(--gray-bg); }
.leads-side .group-link.active { background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }
.leads-side .group-link .count { font-size: 11px; color: var(--muted); background: var(--gray-bg); border-radius: 999px; padding: 1px 8px; }

.seg { display: inline-flex; background: var(--gray-bg); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
}
.seg a.active { background: #fff; color: var(--text); box-shadow: var(--shadow); font-weight: 600; }
.seg a:hover:not(.active) { color: var(--text); }

.toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.toolbar .field {
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text);
    background: #fff;
}
.toolbar .field:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.toolbar .field.q { flex: 1; min-width: 160px; }

.quick-add {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: #fafbfd;
}
.quick-add .field { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: #fff; color: var(--text); }
.quick-add .field:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.quick-add .field.email { flex: 1; min-width: 200px; }

.bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--blue-soft);
    border-bottom: 1px solid #c7d7f5;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--blue-dark);
}
.bulk-bar .n { font-weight: 700; }

.row-actions { display: inline-flex; gap: 6px; align-items: center; }
.row-actions .btn { padding: 5px 10px; font-size: 12px; border-radius: 7px; }

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--gray-bg);
    color: var(--text-soft);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 500;
    margin: 1px;
}
.tag-badge button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0; line-height: 1; }
.tag-badge button:hover { color: var(--red); }

.import-split { display: grid; grid-template-columns: 1fr; }
.import-split > div { padding: 24px; }
.import-split > div + div { border-top: 1px solid var(--border); }
.import-split h4 { margin: 0 0 16px; font-size: 15px; }
.import-split .form-group { max-width: 640px; }
.import-divider { display: flex; align-items: center; gap: 12px; margin: 4px 0; color: var(--muted); font-size: 12px; }
.import-divider::before, .import-divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }

@media (max-width: 900px) {
    .leads-layout { grid-template-columns: 1fr; }
    .leads-side { position: static; }
    .import-split { grid-template-columns: 1fr; }
    .import-split > div + div { border-left: none; border-top: 1px solid var(--border); }
}

/* ---- analytics funnel ---- */
.funnel { display: flex; flex-direction: column; gap: 14px; }
.fstep .flabel { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 5px; }
.fstep .flabel .fv { font-weight: 700; }
.fstep .flabel .fpct { color: var(--muted); font-size: 12px; }
.funnel .fbar { height: 26px; background: var(--gray-bg); border-radius: 6px; overflow: hidden; }
.funnel .fbar > span { display: block; height: 100%; border-radius: 6px; transition: width 0.25s ease; }

/* ---- responsive ---- */
@media (max-width: 1200px) {
    .kpis { grid-template-columns: repeat(3, 1fr); }
    .cols-2, .cols-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .sidebar { display: none; }
    .kpis { grid-template-columns: repeat(2, 1fr); }
    .content { padding: 16px; }
    .userbox .uemail { display: none; }
    .userbox .caret { display: none; }
}
@media (max-width: 560px) {
    .kpis { grid-template-columns: 1fr; }
    .search { max-width: none; }
    .userbox-meta { display: none; }
    .logout { font-size: 12px; padding: 6px 10px; }
}

/* ---- support impersonation banner (Phase D follow-up) ---- */
.impersonate-banner {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    background: #7f1d1d; color: #fff; padding: 10px 18px; font-size: 13px;
    border-bottom: 1px solid #991b1b;
}
.impersonate-banner .imp-badge {
    background: #fff; color: #7f1d1d; font-weight: 700; font-size: 11px;
    padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .5px;
    flex-shrink: 0;
}
.impersonate-banner .imp-text { flex: 1; min-width: 220px; }
.impersonate-banner .imp-text strong { color: #fecaca; }
.impersonate-banner .imp-exit {
    background: #fff; color: #7f1d1d; border: none; padding: 7px 14px; border-radius: 6px;
    font-weight: 600; cursor: pointer; font-size: 13px; flex-shrink: 0;
}
.impersonate-banner .imp-exit:hover { background: #fee2e2; }

/* ---- billing (Phase O) ---- */
.upsell-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: var(--blue-soft); border: 1px solid #c7d7f5; border-radius: var(--radius);
    padding: 14px 18px; margin-bottom: 22px;
}
.upsell-text { font-size: 13px; color: var(--text-soft); }
.upsell-text strong { color: var(--blue-dark); }
.upsell-banner .btn { flex-shrink: 0; }
.billing-toggle { display: inline-flex; background: var(--gray-bg); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.billing-toggle a {
    padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
    color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.billing-toggle a:hover { color: var(--text); }
.billing-toggle a.on { background: #fff; color: var(--text); box-shadow: var(--shadow); font-weight: 600; }
.billing-toggle .save { font-size: 11px; font-weight: 700; color: var(--green); background: var(--green-bg); border-radius: 999px; padding: 1px 7px; }

.billing-notice, .billing-success, .billing-expired { border-left: 4px solid var(--green); }
.billing-expired { border-left-color: var(--amber); }
.billing-success { border-left-color: var(--green); background: var(--green-bg); }
.billing-success h3 { margin: 0 0 6px; }

.usage-row { margin-bottom: 14px; }
.usage-row:last-child { margin-bottom: 0; }
.usage-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }

.billing-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.tier {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px; box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column;
}
.tier.popular { border: 2px solid var(--blue); box-shadow: var(--shadow-lg); }
.tier.current { border-color: var(--border-strong); }
.tier-flag {
    position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
    background: var(--blue); color: #fff; font-size: 11px; font-weight: 700;
    padding: 3px 12px; border-radius: 999px; letter-spacing: 0.02em;
}
.tier h3 { margin: 0 0 4px; font-size: 16px; }
.tier-price { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.tier-per { font-size: 13px; font-weight: 500; color: var(--muted); }
.tier-desc { color: var(--muted); font-size: 13px; min-height: 38px; margin: 8px 0 14px; }
.tier-features { list-style: none; margin: 0 0 4px; padding: 0; font-size: 13px; color: var(--text-soft); flex: 1; }
.tier-features li { padding: 5px 0 5px 22px; position: relative; }
.tier-features li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.tier .btn { width: 100%; text-align: center; }

.billing-footnote { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.pay-disabled { margin-top: 8px; font-size: 12px; color: var(--amber); }
.faq-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-item strong { font-size: 14px; }
.faq-item p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 1200px) {
    .billing-tiers { grid-template-columns: 1fr; }
}

/* ---- auth pages (signin / register / forgot / reset) ---- */
.auth-shell {
    min-height: calc(100vh - 57px);
    display: flex;
    background: var(--bg);
}
.auth-bar {
    height: 57px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.auth-bar .auth-bar-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
}
.auth-bar .auth-bar-brand .auth-logo svg { width: 20px; height: 20px; display: block; }
.auth-bar .auth-bar-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}
.auth-bar .auth-bar-link:hover { color: var(--text); }
.auth-panel {
    flex: 1 1 48%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px;
    background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 45%, #1d3f8f 100%);
    position: relative;
    overflow: hidden;
    color: #e2e8f0;
}
.auth-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148,163,184,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148,163,184,0.07) 1px, transparent 1px);
    background-size: 42px 42px;
    pointer-events: none;
}
.auth-panel .auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; }
.auth-panel .auth-logo {
    width: 38px; height: 38px; border-radius: 11px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
    font-size: 18px; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
}
.auth-panel .auth-brandname { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.auth-panel .auth-tagline { position: relative; z-index: 1; font-size: 13px; color: #94a3b8; margin-top: 2px; }
.auth-panel .auth-hero { position: relative; z-index: 1; margin-top: 52px; max-width: 420px; }
.auth-panel .auth-hero h2 {
    font-size: 30px; line-height: 1.25; margin: 0 0 14px; color: #fff; letter-spacing: -0.02em; font-weight: 700;
}
.auth-panel .auth-hero p { margin: 0 0 26px; color: #b6c2d4; font-size: 15px; line-height: 1.6; }
.auth-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-benefits li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: #d7deea; }
.auth-benefits li .b-ico {
    width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
    background: rgba(59,130,246,0.18); color: #93c5fd;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.auth-benefits li strong { color: #fff; }

.auth-main {
    flex: 1 1 52%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 40px 36px;
}
.auth-card h1 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.01em; }
.auth-card .auth-sub { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.auth-card .auth-sub a { color: var(--blue); text-decoration: none; font-weight: 500; }
.auth-card .auth-sub a:hover { text-decoration: underline; }
.auth-card .form-group { margin-bottom: 18px; }
.auth-card .form-group label { display: flex; justify-content: space-between; align-items: center; }
.auth-card .form-group label .auth-meta { font-weight: 500; color: var(--muted); font-size: 12px; }
.auth-field { position: relative; }
.auth-field input {
    width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; color: var(--text); background: #fff; transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.auth-field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.auth-field .auth-eye {
    position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--muted); font-size: 16px; padding: 4px;
}
.auth-eye:hover { color: var(--text); }

.auth-btn {
    width: 100%; padding: 12px; border: none; border-radius: var(--radius-sm);
    background: var(--blue); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background 0.12s ease; margin-top: 4px;
}
.auth-btn:hover { background: var(--blue-dark); }
.auth-btn:active { background: var(--blue-dark); }
.auth-btn:disabled { opacity: 0.6; cursor: default; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.auth-google {
    width: 100%; padding: 11px; border-radius: var(--radius-sm); cursor: pointer;
    background: #fff; border: 1px solid var(--border-strong); color: var(--text);
    font-size: 14px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 10px;
    text-decoration: none; transition: background 0.12s ease, box-shadow 0.12s ease;
}
.auth-google:hover { background: #fafbfd; box-shadow: var(--shadow); }
.auth-google .g {
    width: 20px; height: 20px; flex-shrink: 0;
}

.auth-foot { margin-top: 24px; text-align: center; font-size: 14px; color: var(--muted); }
.auth-foot a { color: var(--blue); text-decoration: none; font-weight: 500; }
.auth-foot a:hover { text-decoration: underline; }
.auth-sep { margin: 0 6px; color: var(--border-strong); }

/* password strength meter (register) */
.auth-strength { margin-top: 8px; display: flex; gap: 5px; }
.auth-strength .s { height: 5px; flex: 1; border-radius: 999px; background: var(--border); transition: background 0.15s ease; }
.auth-strength .s.on-1 { background: var(--red); }
.auth-strength .s.on-2 { background: #f59e0b; }
.auth-strength .s.on-3 { background: #fbbf24; }
.auth-strength .s.on-4 { background: var(--green); }
.auth-strength-label { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* password requirements hint */
.auth-hint {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
    background: var(--blue-soft);
    border: 1px solid #dbe4f5;
    border-radius: var(--radius-sm);
    padding: 9px 12px;
}
.auth-hint strong { color: var(--text-soft); font-weight: 600; }
.auth-hint code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1px 5px;
    color: var(--blue-dark);
}

/* mobile-only brand header (shown only when the side panel is hidden) */
.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 9px;
    justify-content: center;
    margin-bottom: 18px;
}
.auth-mobile-brand .auth-logo {
    width: 32px; height: 32px; border-radius: 9px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
    font-size: 15px; box-shadow: 0 3px 10px rgba(37, 99, 235, 0.45);
}
.auth-mobile-brand .auth-brandname { font-size: 17px; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }

@media (max-width: 900px) {
    .auth-panel { display: none; }
    .auth-mobile-brand { display: flex; }
    .auth-main { flex: 1 1 100%; padding: 32px 16px; }
    .auth-card { padding: 28px 22px; }
}
/* ---- Newsletter ---- */
.nl-field { margin-bottom: 16px; }
.nl-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--text-soft); }

.nl-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.nl-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.nl-switch .track { width: 40px; height: 22px; background: #cbd5e1; border-radius: 999px; position: relative; flex: none; transition: background .15s; }
.nl-switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.nl-switch input:checked + .track { background: var(--green); }
.nl-switch input:checked + .track::after { transform: translateX(18px); }
.nl-switch .lbl { font-size: 13px; font-weight: 600; color: var(--text-soft); }

.design-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 480px; }
.design-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.design-opt:hover { border-color: var(--border-strong); }
.design-opt.on { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.design-opt input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.design-opt .dname { font-size: 13px; font-weight: 600; color: var(--text-soft); }
.design-opt .dsub { font-size: 11px; color: var(--muted); }
.dprev { width: 100%; height: 34px; border-radius: 6px; }
.dprev-simple { background: #fff; border: 1px solid #e2e8f0; }
.dprev-card { background: #f8fafc; border: 1px solid #e2e8f0; box-shadow: 0 2px 6px rgba(2,6,23,.08); }
.dprev-bold { background: linear-gradient(135deg, #1e3a8a, #2563eb); }

.nl-code { background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 12px 14px; margin: 4px 0 12px; overflow-x: auto; }
.nl-code code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; }

.nl-embed-block { border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; margin-bottom: 16px; overflow: hidden; }
.nl-embed-block:last-child { margin-bottom: 0; }
.nl-embed-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: #fafbfd; }
.nl-embed-block .nl-code { margin: 0; border-radius: 0; }

.nl-cf { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.nl-cf-head { display: grid; grid-template-columns: 1fr 120px 90px 36px; gap: 10px; align-items: center; padding: 8px 12px; background: #fafbfd; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.nl-cf-row { display: grid; grid-template-columns: 1fr 120px 90px 36px; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.nl-cf-row:last-child { border-bottom: none; }
.nl-cf-req { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.nl-cf-req input { width: auto; margin: 0; }
.nl-cf-remove { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 4px 8px; border-radius: 6px; }
.nl-cf-remove:hover { color: var(--red); background: var(--red-bg); }
.nl-cf-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--border); background: #fafbfd; flex-wrap: wrap; }
@media (max-width: 640px) {
    .nl-cf-head, .nl-cf-row { grid-template-columns: 1fr 92px 72px 30px; gap: 6px; padding-left: 8px; padding-right: 8px; }
    .nl-cf-head { font-size: 10px; }
}

.nl-seg { display: inline-flex; background: var(--gray-bg); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.nl-seg-opt { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; }
.nl-seg-opt input { display: none; }
.nl-seg-opt.on { background: #fff; box-shadow: var(--shadow); font-weight: 600; color: var(--text); }

/* Support tickets (inbox + conversation) */
.support-head h1 { display: flex; align-items: center; gap: 10px; }

/* New-ticket card: modern support-widget look */
.support-new {
    border: none;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .07), 0 2px 8px rgba(15, 23, 42, .05);
}
.support-new-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: linear-gradient(115deg, #0f2a5f 0%, #1d4ed8 55%, #2563eb 100%);
    color: #fff;
}
.support-new-ico {
    width: 46px; height: 46px; border-radius: 13px; flex: none;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    display: flex; align-items: center; justify-content: center;
    font-size: 21px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.support-new-titles { flex: 1; min-width: 0; }
.support-new-head h3 { margin: 0; font-size: 17px; color: #fff; letter-spacing: .01em; }
.support-new-head p { margin: 3px 0 0; font-size: 13px; color: rgba(255, 255, 255, .85); }
.support-new-badge {
    flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    padding: 5px 11px; border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .24);
    color: #fff;
    white-space: nowrap;
}
.support-new-body { padding: 20px 22px 22px; }
.support-new input,
.support-new select,
.support-new textarea {
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.support-new input:hover,
.support-new select:hover,
.support-new textarea:hover { border-color: #b9c7dd; }
.support-new input:focus,
.support-new select:focus,
.support-new textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-soft);
}
.support-new-submit {
    padding: 10px 22px;
    border: none;
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(29, 78, 216, .28), inset 0 1px 0 rgba(255, 255, 255, .16);
    transition: transform .1s ease, box-shadow .12s ease;
}
.support-new-submit:hover {
    background: linear-gradient(180deg, #1d4ed8, #1e40af);
    box-shadow: 0 6px 16px rgba(29, 78, 216, .34), inset 0 1px 0 rgba(255, 255, 255, .16);
    transform: translateY(-1px);
}

.support-list-head { margin: 20px 0 10px; }
.support-list-head h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }

.support-list { display: flex; flex-direction: column; gap: 10px; }
.support-ticket { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 15px; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.support-ticket:hover { border-color: var(--blue); box-shadow: 0 3px 10px rgba(2,6,23,.06); }
.support-tic-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.support-tic-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.support-tic-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.support-tic-subject { font-weight: 600; font-size: 14px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-tic-excerpt { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-tic-meta { font-size: 12px; color: var(--muted); }
.support-tic-go { color: var(--muted); font-size: 18px; flex: none; }

.support-empty { text-align: center; padding: 40px 20px; }
.support-empty-ico { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.support-empty h3 { margin: 0 0 4px; font-size: 15px; }
.support-empty p { margin: 0; font-size: 13px; color: var(--muted); }

.support-thread { padding: 22px; }
.support-msg { display: flex; gap: 10px; margin-bottom: 16px; }
.support-msg-you { flex-direction: row-reverse; }
.support-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; font-size: 16px; flex: none; }
.support-msg-admin .support-avatar { background: #eef2f7; }
.support-bubble { max-width: 78%; }
.support-msg-you .support-bubble { text-align: right; }
.support-bubble-meta { font-size: 11px; color: var(--muted); margin: 2px 0 4px; }
.support-bubble-body { display: inline-block; text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 14px; border-top-left-radius: 4px; padding: 10px 14px; font-size: 14px; line-height: 1.6; color: var(--text-soft); }
.support-msg-you .support-bubble-body { background: var(--blue); border-color: var(--blue); color: #fff; border-radius: 14px; border-top-right-radius: 4px; }

.support-reply { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.support-actions { margin-top: 10px; }

.form-row-3 { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 720px) { .form-row-3 { grid-template-columns: 1fr; } }
