/* ==========================================================================
   官网后台管理样式
   ========================================================================== */
:root {
    --a-bg: #f2f7fa;
    --a-surface: #ffffff;
    --a-surface-2: #f8fcfe;
    --a-ink: #0e2432;
    --a-ink-2: #1d3a4b;
    --a-muted: #5b7483;
    --a-muted-2: #7e95a3;
    --a-line: #dbe8ef;
    --a-line-strong: #c8dae4;
    --a-brand: #0a5279;
    --a-brand-2: #0e8fba;
    --a-brand-soft: #e0f2f8;
    --a-side: #07202f;
    --a-side-2: #0a2b3d;
    --a-lime: #a7eadf;
    --a-danger: #c94b3b;
    --a-warn: #a3701d;
    --a-radius: 14px;
    --a-shadow: 0 12px 36px rgba(10, 40, 60, .07);
    --a-font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.admin-body { margin: 0; background: var(--a-bg); color: var(--a-ink); font-family: var(--a-font); font-size: 13px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin-top: 0; line-height: 1.25; letter-spacing: -.025em; }
p { margin-top: 0; }
svg { width: 16px; height: 16px; flex: none; }
::selection { background: var(--a-lime); color: #19320d; }
:focus-visible { outline: 3px solid rgba(23, 160, 107, .3); outline-offset: 2px; }
.inline-form { display: inline-flex; margin: 0; }
.muted { color: var(--a-muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.text-danger { color: var(--a-danger); }

/* Sidebar */
.admin-shell { min-height: 100vh; }
.admin-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 238px; background: var(--a-side); color: #fff; z-index: 50; display: flex; flex-direction: column; transition: transform .25s ease; }
.admin-sidebar::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 20% 0, rgba(200, 242, 126, .08), transparent 34%); }
.admin-brand { height: 70px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); position: relative; z-index: 1; flex: none; }
.admin-brand__mark { width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(145deg, #1fbf82, #0a5279); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 8px 20px rgba(31, 191, 130, .22); flex: none; }
.admin-brand strong { display: block; font-size: 13px; letter-spacing: -.02em; }
.admin-brand small { display: block; font-size: 7.5px; letter-spacing: .1em; color: rgba(255, 255, 255, .34); margin-top: 2px; }
.sidebar-close { display: none; margin-left: auto; border: 0; background: none; color: rgba(255, 255, 255, .5); font-size: 22px; cursor: pointer; }
.admin-side-scroll { flex: 1; overflow-y: auto; padding: 12px 10px 16px; position: relative; z-index: 1; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.side-label { font-size: 8px; letter-spacing: .14em; color: rgba(255, 255, 255, .25); padding: 14px 12px 6px; font-weight: 700; }
.side-nav { display: flex; flex-direction: column; gap: 1px; }
.side-nav a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 7px 11px; border-radius: 8px; color: rgba(255, 255, 255, .55); font-size: 11.5px; transition: background .18s ease, color .18s ease; }
.side-nav a svg { width: 15px; height: 15px; opacity: .7; }
.side-nav a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.side-nav a.is-active { color: #d9ff9a; background: rgba(200, 242, 126, .1); font-weight: 700; }
.side-nav a.is-active svg { opacity: 1; }
.side-nav a em { margin-left: auto; font-style: normal; font-size: 8px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--a-lime); color: #24380f; display: inline-grid; place-items: center; font-weight: 800; }
.admin-side-foot { padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .08); position: relative; z-index: 1; flex: none; }
.side-user { display: flex; align-items: center; gap: 9px; }
.side-avatar { width: 30px; height: 30px; border-radius: 8px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; color: #d9ff9a; font-size: 11px; font-weight: 700; flex: none; }
.side-user div { flex: 1; min-width: 0; }
.side-user strong { display: block; font-size: 10px; color: rgba(255, 255, 255, .82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { display: block; font-size: 8px; color: rgba(255, 255, 255, .32); }
.side-user a { color: rgba(255, 255, 255, .35); }
.side-user a:hover { color: var(--a-lime); }
.side-user a svg { width: 14px; height: 14px; }
.admin-sidebar-mask { display: none; }

/* Main / topbar */
.admin-main { margin-left: 238px; min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { height: 64px; background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--a-line); display: flex; align-items: center; gap: 14px; padding: 0 26px; position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px); }
.sidebar-toggle { display: none; width: 34px; height: 34px; border: 1px solid var(--a-line); border-radius: 8px; background: #fff; color: var(--a-ink); cursor: pointer; align-items: center; justify-content: center; }
.admin-crumb { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--a-muted-2); }
.admin-crumb b { color: var(--a-ink-2); font-weight: 650; }
.admin-top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top-link { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--a-muted); padding: 7px 9px; border-radius: 7px; }
.top-link:hover { color: var(--a-brand); background: var(--a-brand-soft); }
.top-link svg { width: 13px; height: 13px; }
.top-icon { width: 33px; height: 33px; border: 1px solid var(--a-line); border-radius: 8px; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--a-muted); cursor: pointer; position: relative; }
.top-icon:hover { color: var(--a-brand); border-color: var(--a-brand); }
.top-icon svg { width: 15px; height: 15px; }
.top-icon i { position: absolute; right: 6px; top: 5px; width: 5px; height: 5px; border-radius: 50%; background: #df6b4f; }
.top-user { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 8px; }
.top-user:hover { background: var(--a-surface-2); }
.top-user span { width: 27px; height: 27px; border-radius: 50%; background: linear-gradient(135deg, var(--a-brand), var(--a-brand-2)); color: #fff; display: grid; place-items: center; font-size: 9px; font-weight: 700; }
.admin-content { flex: 1; padding: 24px 26px 34px; max-width: 1500px; width: 100%; margin: 0 auto; }
.admin-foot { border-top: 1px solid var(--a-line); padding: 14px 26px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--a-muted-2); font-size: 9px; }
.admin-foot a { color: var(--a-brand); }

/* Page head */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.page-head h1 { font-size: 23px; margin-bottom: 5px; letter-spacing: -.035em; }
.page-head p { margin: 0; font-size: 10.5px; color: var(--a-muted); }
.page-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 35px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--a-line-strong); background: #fff; color: var(--a-ink-2); font-size: 10.5px; font-weight: 650; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; white-space: nowrap; }
.btn svg { width: 14px; height: 14px; }
.btn:hover { border-color: var(--a-brand); color: var(--a-brand); }
.btn-primary { background: var(--a-brand); border-color: var(--a-brand); color: #fff; }
.btn-primary:hover { background: #095a43; border-color: #095a43; color: #fff; }
.btn-ghost { background: var(--a-surface-2); }
.btn-danger { background: #fff5f3; border-color: #f0cfc8; color: var(--a-danger); }
.btn-danger:hover { background: var(--a-danger); border-color: var(--a-danger); color: #fff; }
.btn-sm { min-height: 29px; padding: 0 9px; font-size: 9px; border-radius: 7px; }
.btn-lg { min-height: 44px; padding: 0 18px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Alerts / toast */
.admin-alert { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-radius: 9px; margin-bottom: 14px; font-size: 10.5px; position: relative; }
.admin-alert svg { width: 15px; height: 15px; }
.admin-alert button { margin-left: auto; border: 0; background: none; color: currentColor; font-size: 18px; line-height: 1; cursor: pointer; opacity: .6; }
.admin-alert--success { background: #eaf8f0; border: 1px solid #ceecdb; color: #0a5279; }
.admin-alert--error { background: #fff2ef; border: 1px solid #f1d3cc; color: #a53f2f; }
.admin-toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 12px); background: rgba(9, 28, 19, .95); color: #fff; font-size: 11px; padding: 9px 16px; border-radius: 99px; opacity: 0; pointer-events: none; z-index: 300; transition: all .2s ease; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.admin-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.admin-toast[data-type="error"] { background: #8e3226; }
.admin-hint { display: flex; gap: 9px; margin-top: 16px; padding: 13px; border: 1px dashed var(--a-line-strong); border-radius: 10px; background: var(--a-surface-2); color: var(--a-muted); font-size: 10px; }
.admin-hint svg { width: 16px; height: 16px; color: var(--a-brand); flex: none; margin-top: 1px; }
.admin-hint p { margin: 0; }
.admin-hint a { color: var(--a-brand); }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi-card { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: 16px 17px; position: relative; overflow: hidden; }
.kpi-card::after { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; right: -36px; top: -44px; background: var(--a-brand-soft); opacity: .75; }
.kpi-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 9.5px; color: var(--a-muted); position: relative; z-index: 1; }
.kpi-card__head span { display: inline-flex; align-items: center; gap: 6px; }
.kpi-card__head svg { width: 14px; height: 14px; color: var(--a-brand); }
.kpi-card__head em { font-style: normal; font-size: 8px; padding: 2px 6px; border-radius: 99px; }
.kpi-card__head em.up { background: #eaf8f0; color: #0a8a56; }
.kpi-card__head em.warn { background: #fff5df; color: var(--a-warn); }
.kpi-card > strong { display: block; font-size: 27px; letter-spacing: -.055em; line-height: 1; margin: 14px 0 10px; position: relative; z-index: 1; }
.kpi-card > strong small { font-size: 10px; font-weight: 500; color: var(--a-muted); margin-left: 3px; letter-spacing: 0; }
.kpi-card__foot { display: flex; justify-content: space-between; gap: 8px; font-size: 8.5px; color: var(--a-muted-2); border-top: 1px solid #f0f4f1; padding-top: 8px; }
.kpi-card__foot a { color: var(--a-brand); font-weight: 650; }

/* Panels */
.grid-2 { display: grid; grid-template-columns: 1.45fr .85fr; gap: 12px; margin-bottom: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.panel { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-radius); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border-bottom: 1px solid #f0f4f1; min-height: 50px; }
.panel-head h2 { font-size: 12px; margin: 0 0 2px; }
.panel-head span { font-size: 8.5px; color: var(--a-muted-2); }
.panel-head .btn { flex: none; }
.panel-link { font-size: 9px; color: var(--a-brand); font-weight: 650; flex: none; }
.panel-body { padding: 15px 16px; }
.chart-legend { display: flex; align-items: center; gap: 11px; font-size: 8.5px; color: var(--a-muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 4px; }
.chart-legend i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.admin-chart { width: 100%; min-height: 220px; }
.admin-chart svg { width: 100%; height: auto; display: block; }
.chart-empty { display: grid; place-items: center; min-height: 200px; color: var(--a-muted-2); font-size: 10px; background: var(--a-surface-2); border-radius: 9px; }
.chart-axis-note { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #f1f5f2; padding-top: 9px; margin-top: 4px; font-size: 8.5px; color: var(--a-muted-2); }
.chart-axis-note a { color: var(--a-brand); display: inline-flex; align-items: center; gap: 4px; }
.chart-axis-note svg { width: 12px; height: 12px; }
.source-donut-wrap { display: flex; align-items: center; gap: 18px; padding: 3px 0; }
.source-donut { width: 124px; height: 124px; border-radius: 50%; position: relative; flex: none; }
.source-donut::after { content: ""; position: absolute; inset: 24px; border-radius: 50%; background: #fff; }
.source-donut > div { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.source-donut strong { font-size: 19px; letter-spacing: -.04em; }
.source-donut span { font-size: 8px; color: var(--a-muted); }
.source-legend { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.source-legend > div { display: flex; align-items: center; gap: 6px; font-size: 9px; color: var(--a-muted); }
.source-legend i { width: 6px; height: 6px; border-radius: 2px; flex: none; }
.source-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-legend em { margin-left: auto; font-style: normal; color: var(--a-ink-2); font-weight: 700; }
.mini-note { display: flex; gap: 6px; align-items: flex-start; border-top: 1px solid #f0f4f1; margin-top: 10px; padding-top: 9px; font-size: 8.5px; color: var(--a-muted-2); }
.mini-note svg { width: 13px; height: 13px; color: var(--a-brand); margin-top: 1px; }

/* Tables */
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.admin-table th { text-align: left; font-size: 8.5px; color: var(--a-muted-2); font-weight: 600; background: #f8fbf9; border-bottom: 1px solid #edf3ef; padding: 9px 12px; white-space: nowrap; }
.admin-table td { font-size: 10px; color: var(--a-muted); border-bottom: 1px solid #f1f5f2; padding: 10px 12px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #fbfdfb; }
.admin-table .table-main { display: block; color: var(--a-ink); font-weight: 650; font-size: 10.5px; }
.admin-table .table-main:hover { color: var(--a-brand); }
.admin-table td small { display: block; font-size: 8px; color: var(--a-muted-2); margin-top: 2px; line-height: 1.45; }
.admin-table .mono { color: var(--a-muted-2); }
.table-link { display: inline-flex; align-items: center; gap: 4px; color: var(--a-brand); font-size: 9px; }
.table-link svg { width: 11px; height: 11px; }
.table-thumb { width: 54px; height: 34px; object-fit: cover; border-radius: 5px; border: 1px solid var(--a-line); }
.status-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 8px; font-weight: 650; padding: 3px 7px; border-radius: 99px; background: #eef3f0; color: var(--a-muted); white-space: nowrap; }
.status-tag::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status-new, .status-pending { background: #fff5df; color: var(--a-warn); }
.status-contacted, .status-running { background: #eaf3fb; color: #2d6e9c; }
.status-quoted, .status-info { background: #eef5ea; color: #4a7425; }
.status-won, .status-done { background: #eaf8f0; color: #0a8a56; }
.status-lost, .status-failed { background: #fff2ef; color: #a53f2f; }
.status-switch { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; font-size: 8.5px; color: var(--a-muted); cursor: pointer; padding: 0; }
.status-switch span { width: 24px; height: 14px; border-radius: 99px; background: #dce6df; position: relative; transition: background .18s ease; }
.status-switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #fff; transition: transform .18s ease; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.status-switch.is-on { color: var(--a-brand); }
.status-switch.is-on span { background: var(--a-brand); }
.status-switch.is-on span::after { transform: translateX(10px); }
.bool-tag { font-size: 8px; padding: 2px 7px; border-radius: 99px; background: #f1f4f2; color: var(--a-muted); }
.bool-tag.is-on { background: #eaf8f0; color: #0a8a56; }
.map-tag { font-size: 8px; background: #f1f6f3; color: var(--a-muted); padding: 2px 7px; border-radius: 5px; }
.row-actions { display: flex; align-items: center; gap: 3px; }
.row-btn { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--a-line); background: #fff; border-radius: 5px; padding: 3px 7px; font-size: 8px; color: var(--a-muted); cursor: pointer; white-space: nowrap; }
.row-btn:hover { border-color: var(--a-brand); color: var(--a-brand); }
.row-btn svg { width: 11px; height: 11px; }
.row-btn--danger { color: #b05043; }
.row-btn--danger:hover { border-color: var(--a-danger); background: #fff5f3; color: var(--a-danger); }
.empty-cell { text-align: center; padding: 34px 16px !important; color: var(--a-muted-2) !important; }
.empty-inline { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: left; }
.empty-inline > svg { width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--a-brand-soft); color: var(--a-brand); }
.empty-inline strong { display: block; font-size: 11px; color: var(--a-ink-2); }
.empty-inline span { display: block; font-size: 9px; color: var(--a-muted-2); margin-top: 2px; }
.list-panel { margin-top: 12px; }
.list-table { min-width: 760px; }
.col-actions { width: 160px; }
.list-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 15px; border-top: 1px solid #f0f4f1; font-size: 8.5px; color: var(--a-muted-2); }
.pager { display: flex; gap: 3px; }
.pager a, .pager span { min-width: 25px; height: 25px; border: 1px solid var(--a-line); border-radius: 6px; display: inline-grid; place-items: center; font-size: 9px; background: #fff; }
.pager a:hover { border-color: var(--a-brand); color: var(--a-brand); }
.pager .is-current { background: var(--a-brand); border-color: var(--a-brand); color: #fff; }

/* Filter */
.filter-bar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; background: #fff; border: 1px solid var(--a-line); border-radius: 11px; padding: 10px 11px; margin-bottom: 12px; }
.filter-search { display: flex; align-items: center; gap: 6px; border: 1px solid var(--a-line-strong); background: var(--a-surface-2); border-radius: 7px; padding: 0 9px; height: 33px; min-width: 230px; flex: 0 1 300px; }
.filter-search svg { width: 13px; height: 13px; color: var(--a-muted-2); }
.filter-search input { border: 0; background: none; outline: 0; font-size: 10px; min-width: 0; width: 100%; }
.filter-bar select, .filter-bar input[type="date"] { height: 33px; border: 1px solid var(--a-line-strong); border-radius: 7px; background: #fff; font-size: 9.5px; color: var(--a-ink-2); padding: 0 9px; outline: 0; }
.filter-bar label { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: var(--a-muted); }
.filter-spacer { flex: 1; }
.filter-count { font-size: 8.5px; color: var(--a-muted-2); }
.analytics-filter { margin-bottom: 14px; }

/* Dashboard widgets */
.page-bars { display: flex; flex-direction: column; gap: 10px; }
.page-bar { display: flex; align-items: center; gap: 8px; font-size: 8.5px; color: var(--a-muted); }
.page-bar__path { width: 105px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, monospace; }
.page-bar > div { flex: 1; height: 5px; background: #eff4f0; border-radius: 99px; overflow: hidden; }
.page-bar > div i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--a-brand), #9bd4ae); }
.page-bar em { font-style: normal; font-size: 8px; color: var(--a-ink-2); width: 34px; text-align: right; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.quick-grid a { display: grid; grid-template-columns: 27px 1fr; gap: 1px 8px; padding: 8px; border-radius: 8px; }
.quick-grid a:hover { background: var(--a-surface-2); }
.quick-grid a svg { grid-row: span 2; width: 27px; height: 27px; padding: 6px; border-radius: 7px; background: var(--a-brand-soft); color: var(--a-brand); }
.quick-grid strong, .quick-grid span { font-size: 9.5px; }
.quick-grid small { font-size: 8px; color: var(--a-muted-2); }
.event-list { display: flex; flex-direction: column; gap: 7px; }
.event-list > div { display: flex; align-items: center; gap: 8px; font-size: 9px; border-bottom: 1px dashed #edf3ef; padding-bottom: 7px; }
.event-list > div:last-child { border: 0; }
.event-list span { flex: 1; color: var(--a-muted); }
.event-list strong { font-size: 11px; }
.event-list em { font-style: normal; font-size: 8px; color: var(--a-muted-2); }
.health-list { display: flex; flex-direction: column; gap: 9px; }
.health-list > div { display: flex; gap: 8px; align-items: flex-start; }
.health-list > div > span { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 9px; font-weight: 800; flex: none; }
.health-ok { background: #eaf8f0; color: #0a8a56; }
.health-warn { background: #fff5df; color: var(--a-warn); }
.health-off { background: #f0f3f1; color: var(--a-muted-2); }
.health-list strong { display: block; font-size: 9.5px; }
.health-list small { display: block; font-size: 8px; color: var(--a-muted-2); }

/* Forms */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 276px; gap: 14px; align-items: start; }
.form-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.form-panel .panel-body { padding: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { min-width: 0; display: flex; flex-direction: column; }
.field--half { grid-column: span 1; }
.field:not(.field--half) { grid-column: 1 / -1; }
.field__label { font-size: 9.5px; font-weight: 700; color: var(--a-ink-2); margin-bottom: 6px; display: flex; align-items: center; gap: 3px; }
.field__label em { color: var(--a-danger); font-style: normal; }
.field input[type="text"], .field input[type="email"], .field input[type="url"], .field input[type="number"], .field input[type="password"], .field input[type="datetime-local"], .field input[type="time"], .field input[type="date"], .field select, .field textarea, .full-select {
    width: 100%; border: 1px solid var(--a-line-strong); background: #fbfdfb; border-radius: 8px; padding: 9px 11px; font-size: 10.5px; color: var(--a-ink); outline: 0; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field textarea { resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus, .full-select:focus { border-color: var(--a-brand); background: #fff; box-shadow: 0 0 0 3px rgba(23, 160, 107, .1); }
.field__tip { display: block; font-size: 8px; color: var(--a-muted-2); margin-top: 5px; line-height: 1.55; }
.field__error { display: block; font-size: 8.5px; color: var(--a-danger); margin-top: 4px; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #dc887b; background: #fff8f6; }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; font-size: 9.5px !important; line-height: 1.7 !important; background: #0f2119 !important; color: #d8f5e4 !important; border-color: #17372a !important; }
.switch-row { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 32px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { width: 31px; height: 18px; border-radius: 99px; background: #d9e4dc; position: relative; transition: background .2s ease; flex: none; }
.switch-ui::after { content: ""; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: transform .2s ease; }
.switch-row input:checked + .switch-ui { background: var(--a-brand); }
.switch-row input:checked + .switch-ui::after { transform: translateX(13px); }
.switch-text { font-size: 9px; color: var(--a-muted); }
.switch-row--plain { min-height: 33px; }
.checks-row { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 2px; }
.check-pill { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--a-line-strong); background: #fbfdfb; border-radius: 7px; padding: 5px 8px; font-size: 9px; cursor: pointer; }
.check-pill input { accent-color: var(--a-brand); width: 12px; height: 12px; }
.check-pill:has(input:checked) { border-color: var(--a-brand); background: var(--a-brand-soft); color: var(--a-brand); }
.richtext-field { border: 1px solid var(--a-line-strong); border-radius: 9px; overflow: hidden; background: #fff; }
.rich-toolbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 6px; background: #f7faf8; border-bottom: 1px solid var(--a-line); }
.rich-toolbar button { border: 0; background: none; border-radius: 4px; padding: 4px 7px; font-size: 9px; color: var(--a-muted); cursor: pointer; }
.rich-toolbar button:hover { background: #fff; color: var(--a-brand); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.rich-toolbar__spacer { flex: 1; }
.rich-toolbar__hint { font-size: 8px; color: var(--a-muted-2); padding-right: 4px; }
.rich-editor { min-height: 260px; max-height: 680px; overflow: auto; padding: 14px 16px; font-size: 11px; line-height: 1.8; color: var(--a-ink-2); outline: 0; }
.rich-editor:empty::before { content: "在这里撰写正文，支持标题、列表、链接等格式…"; color: var(--a-muted-2); pointer-events: none; }
.rich-editor h2 { font-size: 17px; margin: 1.2em 0 .5em; }
.rich-editor h3 { font-size: 14px; margin: 1.1em 0 .4em; }
.rich-editor p { margin-bottom: .7em; }
.rich-editor ul, .rich-editor ol { padding-left: 1.4em; }
.rich-editor blockquote { border-left: 3px solid var(--a-brand); margin: 1em 0; padding: 6px 10px; background: var(--a-surface-2); color: var(--a-muted); }
.rich-editor a { color: var(--a-brand); text-decoration: underline; }
.image-field { display: grid; grid-template-columns: 116px 1fr; gap: 10px; border: 1px dashed var(--a-line-strong); padding: 9px; border-radius: 9px; background: var(--a-surface-2); }
.image-field__preview { width: 116px; height: 76px; border-radius: 6px; border: 1px solid var(--a-line); background: #fff; overflow: hidden; display: grid; place-items: center; }
.image-field__preview img { width: 100%; height: 100%; object-fit: cover; }
.image-field__preview span { font-size: 8px; color: var(--a-muted-2); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.image-field__preview svg { width: 18px; height: 18px; }
.image-field__body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.image-field__body input { font-size: 9px !important; padding: 7px 9px !important; }
.image-field__actions { display: flex; gap: 5px; }
.icon-field { display: flex; align-items: center; gap: 8px; }
.icon-field__preview { width: 36px; height: 36px; border-radius: 8px; background: var(--a-brand-soft); color: var(--a-brand); display: grid; place-items: center; flex: none; }
.icon-field__preview svg { width: 18px; height: 18px; }
.icon-field select { flex: 1; }
.form-actions { display: flex; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--a-line); }
.form-aside { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 80px; }
.form-side-head { padding: 12px 15px; border-bottom: 1px solid #f0f4f1; }
.form-side-head h2 { font-size: 11px; margin: 0; }
.form-side-body { padding: 14px 15px; }
.form-side-body p { font-size: 9px; color: var(--a-muted); line-height: 1.7; }
.side-status { display: flex; align-items: center; gap: 6px; background: var(--a-surface-2); border-radius: 7px; padding: 7px 9px; font-size: 9px; color: var(--a-muted); margin-bottom: 10px; }
.side-status span { width: 6px; height: 6px; border-radius: 50%; background: var(--a-muted-2); }
.side-status.is-on { background: #eaf8f0; color: #0a8a56; }
.side-status.is-on span { background: #0a8a56; }
.side-tips p { margin-bottom: 9px; padding-bottom: 9px; border-bottom: 1px dashed #edf3ef; }
.side-tips p:last-child { border: 0; }
.side-tips strong { display: block; color: var(--a-ink-2); margin-bottom: 2px; }
.serp-preview { border: 1px solid var(--a-line); border-radius: 9px; padding: 12px 14px; margin-top: 16px; background: #fff; }
.serp-preview > span { font-size: 8px; color: var(--a-muted-2); display: block; margin-bottom: 6px; }
.serp-preview strong { display: block; color: #1a4fa0; font-size: 14px; font-weight: 500; line-height: 1.4; }
.serp-preview small { display: block; color: #3b7d3b; font-size: 9px; margin: 2px 0 4px; }
.serp-preview p { margin: 0; font-size: 9.5px; color: #53625a; line-height: 1.6; }

/* Settings */
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: start; }
.settings-tabs { background: #fff; border: 1px solid var(--a-line); border-radius: 11px; padding: 7px; position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; }
.settings-tabs a { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 7px; font-size: 10px; color: var(--a-muted); }
.settings-tabs a:hover { background: var(--a-surface-2); color: var(--a-ink); }
.settings-tabs a.is-active { background: var(--a-brand-soft); color: var(--a-brand); font-weight: 700; }
.settings-tabs small { font-size: 7.5px; color: var(--a-muted-2); }
.settings-tabs a.is-active small { color: var(--a-brand); }
.settings-grid { gap: 16px 18px; }
.settings-panel .panel-body { padding: 18px; }
.settings-save-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--a-line); padding-top: 14px; margin-top: 18px; font-size: 8.5px; color: var(--a-muted-2); }
.settings-tip-box { display: flex; gap: 10px; border: 1px solid var(--a-line); background: var(--a-surface-2); border-radius: 9px; padding: 12px; margin-top: 16px; }
.settings-tip-box > span { width: 28px; height: 28px; border-radius: 7px; background: var(--a-brand-soft); color: var(--a-brand); display: grid; place-items: center; flex: none; }
.settings-tip-box > span svg { width: 14px; height: 14px; }
.settings-tip-box strong { display: block; font-size: 9.5px; margin-bottom: 3px; }
.settings-tip-box p { margin: 0 0 5px; font-size: 8.5px; color: var(--a-muted); line-height: 1.65; }
.settings-tip-box code, .cron-box code { display: block; font-family: ui-monospace, monospace; font-size: 8.5px; background: #0f2119; color: #d8f5e4; padding: 7px 9px; border-radius: 6px; word-break: break-all; line-height: 1.6; }
.settings-tip-box code { margin-top: 4px; }

/* Analytics */
.device-bar { display: flex; align-items: center; gap: 8px; font-size: 9px; color: var(--a-muted); padding: 7px 0; border-bottom: 1px dashed #edf3ef; }
.device-bar:last-child { border: 0; }
.device-bar > span { width: 36px; }
.device-bar > div { flex: 1; height: 6px; border-radius: 99px; background: #eff4f0; overflow: hidden; }
.device-bar > div i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--a-brand), #9bd4ae); }
.device-bar em { font-style: normal; font-size: 8px; color: var(--a-brand); font-weight: 700; width: 27px; text-align: right; }
.event-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--a-brand-2); display: inline-block; margin-right: 6px; }
.hour-bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 8px; }
.hour-bar { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; }
.hour-bar > span { width: 100%; background: linear-gradient(180deg, #1fa771, #b9dca8); border-radius: 2px 2px 0 0; min-height: 3px; }
.hour-bar em { font-style: normal; font-size: 6.5px; color: var(--a-muted-2); }
.realtime-list { display: flex; flex-direction: column; gap: 8px; }
.realtime-list > div { display: flex; gap: 7px; align-items: flex-start; }
.rt-dot { width: 6px; height: 6px; border-radius: 50%; background: #16b978; margin-top: 5px; box-shadow: 0 0 0 3px rgba(22,185,120,.1); flex: none; }
.realtime-list strong { display: block; font-size: 9px; font-family: ui-monospace, monospace; color: var(--a-ink-2); }
.realtime-list small { display: block; font-size: 8px; color: var(--a-muted-2); }
.live-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 8px; color: #0a8a56; background: #eaf8f0; padding: 3px 7px; border-radius: 99px; }
.live-tag i { width: 5px; height: 5px; border-radius: 50%; background: #0a8a56; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 2px rgba(10,138,86,.08); } 50% { box-shadow: 0 0 0 5px rgba(10,138,86,.02); } }

/* Leads */
.lead-status-tabs { display: flex; gap: 3px; margin-bottom: 12px; background: #fff; border: 1px solid var(--a-line); border-radius: 9px; padding: 4px; width: fit-content; max-width: 100%; overflow-x: auto; }
.lead-status-tabs a { font-size: 9px; padding: 6px 10px; border-radius: 6px; color: var(--a-muted); white-space: nowrap; }
.lead-status-tabs a span { font-size: 7.5px; background: #f0f4f1; padding: 1px 4px; border-radius: 99px; }
.lead-status-tabs a.is-active { background: var(--a-brand); color: #fff; }
.lead-status-tabs a.is-active span { background: rgba(255,255,255,.2); }
.lead-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
.lead-profile { display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--a-line); padding-bottom: 14px; margin-bottom: 14px; }
.lead-avatar { width: 46px; height: 46px; border-radius: 12px; background: var(--a-brand-soft); color: var(--a-brand); display: grid; place-items: center; font-size: 18px; font-weight: 800; }
.lead-profile h2 { font-size: 16px; margin: 0 0 2px; }
.lead-profile p { margin: 0; font-size: 9px; color: var(--a-muted); }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.detail-list > div { border-bottom: 1px dashed #edf3ef; padding-bottom: 8px; }
.detail-list span { display: block; font-size: 8px; color: var(--a-muted-2); margin-bottom: 2px; }
.detail-list strong { display: block; font-size: 10px; color: var(--a-ink-2); font-weight: 550; word-break: break-all; }
.detail-list .ua { font-size: 8px; color: var(--a-muted); font-weight: 400; }
.lead-message { margin-top: 16px; background: var(--a-surface-2); border-radius: 9px; padding: 12px 14px; }
.lead-message > span { font-size: 8px; color: var(--a-muted-2); display: block; margin-bottom: 5px; }
.lead-message p { margin: 0; font-size: 10.5px; line-height: 1.8; color: var(--a-ink-2); }
.lead-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 80px; }
.lead-side textarea { width: 100%; border: 1px solid var(--a-line-strong); border-radius: 8px; padding: 9px 11px; font-size: 10px; resize: vertical; }
.danger-panel { border-color: #f2d8d2; }
.danger-panel .field__tip { text-align: center; margin-top: 6px; }

/* AI */
.ai-status { display: flex; align-items: center; gap: 12px; border-radius: 11px; padding: 13px 15px; margin-bottom: 14px; border: 1px solid var(--a-line); background: #fff; }
.ai-status > span { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.ai-status.is-ok > span { background: #eaf8f0; color: #0a8a56; }
.ai-status.is-warn > span { background: #fff5df; color: var(--a-warn); }
.ai-status > span svg { width: 19px; height: 19px; }
.ai-status div { flex: 1; }
.ai-status strong { display: block; font-size: 11px; }
.ai-status p { margin: 2px 0 0; font-size: 8.5px; color: var(--a-muted); }
.ai-badge { font-size: 8px; background: var(--a-brand-soft); color: var(--a-brand); padding: 3px 7px; border-radius: 99px; }
.ai-form label { display: block; }
.ai-form input[type="text"], .ai-form input[type="datetime-local"], .ai-form select { width: 100%; height: 34px; border: 1px solid var(--a-line-strong); border-radius: 7px; padding: 0 10px; font-size: 10px; background: #fbfdfb; margin-bottom: 10px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cron-box { display: flex; align-items: center; gap: 10px; background: var(--a-surface-2); border: 1px solid var(--a-line); border-radius: 8px; padding: 9px; }
.cron-box > div { flex: 1; min-width: 0; }
.cron-box strong { display: block; font-size: 8px; color: var(--a-muted-2); margin-bottom: 3px; }
.cron-box code { background: none; color: var(--a-ink-2); padding: 0; font-size: 8.5px; word-break: break-all; }
.ai-article-list { display: flex; flex-direction: column; gap: 4px; }
.ai-article-list a { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 7px; }
.ai-article-list a:hover { background: var(--a-surface-2); }
.ai-article-icon { width: 27px; height: 27px; border-radius: 7px; background: var(--a-brand-soft); color: var(--a-brand); display: grid; place-items: center; flex: none; }
.ai-article-icon svg { width: 13px; height: 13px; }
.ai-article-list a > div { flex: 1; min-width: 0; }
.ai-article-list strong { display: block; font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-article-list small { display: block; font-size: 8px; color: var(--a-muted-2); }
.ai-article-list a > svg { width: 12px; height: 12px; color: var(--a-muted-2); }

/* Media */
.media-top { align-items: stretch; }
.upload-form { display: flex; flex-direction: column; gap: 9px; }
.upload-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px dashed var(--a-line-strong); border-radius: 10px; padding: 24px 14px; background: var(--a-surface-2); text-align: center; cursor: pointer; }
.upload-drop:hover { border-color: var(--a-brand); background: #fff; }
.upload-drop svg { width: 26px; height: 26px; color: var(--a-brand); margin-bottom: 3px; }
.upload-drop strong { font-size: 10px; }
.upload-drop span { font-size: 8px; color: var(--a-muted-2); }
.upload-drop input { display: none; }
.media-tips { display: flex; flex-direction: column; gap: 10px; }
.media-tips > div { display: flex; gap: 8px; align-items: flex-start; }
.media-tips svg { width: 16px; height: 16px; color: var(--a-brand); margin-top: 2px; }
.media-tips p { margin: 0; font-size: 9px; color: var(--a-muted); line-height: 1.65; }
.media-tips strong { color: var(--a-ink-2); }
.media-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.media-item { margin: 0; border: 1px solid var(--a-line); border-radius: 9px; overflow: hidden; background: #fff; }
.media-item > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--a-surface-2); }
.media-item figcaption { padding: 8px; }
.media-item figcaption strong { display: block; font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-item figcaption > span { display: block; font-size: 7.5px; color: var(--a-muted-2); margin: 1px 0 5px; }
.media-item figcaption > div { display: flex; gap: 3px; }

/* Users */
.user-cell { display: flex; align-items: center; gap: 8px; }
.user-cell > span { width: 30px; height: 30px; border-radius: 8px; background: var(--a-brand-soft); color: var(--a-brand); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.user-cell strong { display: block; font-size: 10px; color: var(--a-ink); }
.user-cell small { display: block; font-size: 8px; color: var(--a-muted-2); }
.role-tag { font-size: 8px; padding: 2px 7px; border-radius: 5px; background: #f1f6f3; color: var(--a-muted); }
.role-super { background: #f1f7e6; color: #4c6c1f; }
.role-admin { background: #eaf3fb; color: #2d6e9c; }
.role-editor { background: #f1f6f3; color: var(--a-muted); }
.narrow-form { max-width: 760px; }
.narrow-form .panel-body { padding: 22px; }
.account-grid { grid-template-columns: 1.1fr .9fr; }
.security-list { display: flex; flex-direction: column; gap: 12px; }
.security-list > div { display: flex; gap: 9px; align-items: flex-start; }
.security-list svg { width: 17px; height: 17px; color: var(--a-brand); margin-top: 2px; }
.security-list p { margin: 0; }
.security-list strong { display: block; font-size: 9.5px; }
.security-list span { display: block; font-size: 8.5px; color: var(--a-muted); line-height: 1.6; }

/* Tools */
.export-stat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.export-stat > div { background: var(--a-surface-2); border-radius: 8px; padding: 10px; text-align: center; }
.export-stat strong { display: block; font-size: 20px; letter-spacing: -.04em; color: var(--a-brand); }
.export-stat span { font-size: 8px; color: var(--a-muted); }
.maintenance-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.maintenance-grid > div { border: 1px solid var(--a-line); border-radius: 9px; padding: 13px; }
.maintenance-grid > div > svg { width: 18px; height: 18px; color: var(--a-brand); }
.maintenance-grid h3 { font-size: 10px; margin: 7px 0 4px; }
.maintenance-grid p { font-size: 8.5px; color: var(--a-muted); line-height: 1.6; margin-bottom: 9px; }
.maintenance-links { display: flex; gap: 8px; flex-wrap: wrap; }
.maintenance-links a { font-size: 8.5px; color: var(--a-brand); text-decoration: underline; }

/* Empty / 404 */
.admin-empty { text-align: center; padding: 90px 20px; background: #fff; border: 1px solid var(--a-line); border-radius: var(--a-radius); }
.admin-empty__code { font-size: 80px; font-weight: 800; color: var(--a-brand); opacity: .14; line-height: 1; display: block; }
.admin-empty h1 { font-size: 22px; margin: 10px 0 6px; }
.admin-empty p { color: var(--a-muted); font-size: 10px; margin-bottom: 16px; }

/* Login */
.login-body { margin: 0; min-height: 100vh; background: #f2f7fa; font-family: var(--a-font); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-art { position: relative; background: radial-gradient(circle at 80% 20%, #155940, #071c14 62%); color: #fff; padding: 34px 46px; display: flex; flex-direction: column; overflow: hidden; }
.login-art::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 52px 52px; mask-image: radial-gradient(circle at 70% 40%, #000, transparent 80%); }
.login-art::after { content: ""; position: absolute; width: 500px; height: 500px; border-radius: 50%; right: -180px; bottom: -240px; border: 1px solid rgba(200, 242, 126, .16); box-shadow: 0 0 0 90px rgba(200, 242, 126, .02); }
.login-art__grid { position: absolute; width: 320px; height: 320px; right: 5%; top: 18%; border: 1px dashed rgba(200,242,126,.13); border-radius: 50%; }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color: #fff; }
.login-brand strong { display: block; font-size: 14px; }
.login-brand small { display: block; font-size: 8px; color: rgba(255,255,255,.35); margin-top: 1px; }
.login-art__copy { position: relative; z-index: 1; margin: auto 0; max-width: 520px; }
.login-eyebrow { font-size: 8px; letter-spacing: .18em; color: var(--a-lime); font-weight: 700; display: block; margin-bottom: 16px; }
.login-art__copy h1 { font-size: clamp(34px, 3.6vw, 54px); letter-spacing: -.05em; line-height: 1.16; margin-bottom: 18px; }
.login-art__copy p { font-size: 12px; color: rgba(255,255,255,.45); }
.login-art__stats { position: relative; z-index: 1; display: flex; gap: 34px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; }
.login-art__stats strong { display: block; font-size: 16px; color: var(--a-lime); }
.login-art__stats span { font-size: 8px; color: rgba(255,255,255,.35); }
.login-art__foot { position: relative; z-index: 1; margin-top: 26px; font-size: 8px; color: rgba(255,255,255,.28); }
.login-panel { display: grid; place-items: center; padding: 30px; background: #f7faf7; }
.login-panel__inner { width: min(100%, 370px); }
.login-mobile-brand { display: none; }
.login-panel h2 { font-size: 27px; letter-spacing: -.04em; margin: 0 0 7px; }
.login-desc { font-size: 10px; color: var(--a-muted); margin-bottom: 22px; }
.login-form { display: flex; flex-direction: column; gap: 13px; }
.login-form label { display: flex; flex-direction: column; gap: 5px; font-size: 9px; font-weight: 700; color: var(--a-ink-2); }
.login-form input { height: 42px; border: 1px solid var(--a-line-strong); border-radius: 8px; background: #fff; padding: 0 12px; font-size: 11px; outline: 0; }
.login-form input:focus { border-color: var(--a-brand); box-shadow: 0 0 0 3px rgba(23,160,107,.1); }
.login-form .btn { margin-top: 5px; }
.login-help { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--a-line); font-size: 8px; color: var(--a-muted-2); }
.login-help span { display: inline-flex; align-items: center; gap: 4px; }
.login-help svg { width: 12px; height: 12px; color: var(--a-brand); }
.login-help a { color: var(--a-brand); }

.settings-test-panel { margin-top: 14px; border-color: #cfe8db; }
.settings-test-badge { font-size: 9px; background: var(--a-brand-soft); color: var(--a-brand); padding: 3px 8px; border-radius: 99px; }
.settings-test-body { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.settings-test-body strong { display: block; font-size: 11px; margin-bottom: 3px; }
.settings-test-body p { margin: 0; font-size: 9.5px; color: var(--a-muted); line-height: 1.7; max-width: 760px; }

/* Readability: larger admin text */
body.admin-body { font-size: 14px; }
@media (min-width: 981px) {
    .side-nav a { font-size: 12.5px; min-height: 38px; }
    .side-label { font-size: 8.5px; }
    .admin-crumb { font-size: 11px; }
    .top-link, .top-user { font-size: 11px; }
    .page-head h1 { font-size: 25px; }
    .page-head p { font-size: 11.5px; }
    .panel-head h2 { font-size: 13px; }
    .panel-head span { font-size: 9.5px; }
    .btn { font-size: 11.5px; min-height: 37px; }
    .btn-sm { font-size: 10px; min-height: 31px; }
    .kpi-card__head { font-size: 10.5px; }
    .kpi-card > strong { font-size: 30px; }
    .kpi-card > strong small { font-size: 11px; }
    .kpi-card__foot { font-size: 9.5px; }
    .admin-table th { font-size: 10px; padding: 10px 12px; }
    .admin-table td { font-size: 11.5px; padding: 11px 12px; }
    .admin-table .table-main { font-size: 11.5px; }
    .admin-table td small { font-size: 9px; }
    .row-btn { font-size: 9.5px; padding: 4px 8px; }
    .filter-search input, .filter-bar select, .filter-bar input[type="date"] { font-size: 10.5px; }
    .field__label { font-size: 11px; }
    .field input[type="text"], .field input[type="email"], .field input[type="url"], .field input[type="number"], .field input[type="password"], .field input[type="datetime-local"], .field input[type="time"], .field input[type="date"], .field select, .field textarea, .full-select { font-size: 12px; padding: 10px 12px; }
    .field__tip { font-size: 9px; }
    .rich-editor { font-size: 12px; }
    .settings-tabs a { font-size: 11px; }
    .settings-tabs small { font-size: 8.5px; }
    .source-legend > div { font-size: 10px; }
    .page-bar, .device-bar, .event-list > div, .realtime-list strong { font-size: 10px; }
    .lead-status-tabs a { font-size: 10px; }
    .detail-list strong { font-size: 11px; }
}

/* Responsive */
@media (max-width: 1200px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .form-layout { grid-template-columns: 1fr 250px; }
    .media-grid { grid-template-columns: repeat(4, 1fr); }
    .detail-list { grid-template-columns: 1fr; }
    .lead-detail-grid { grid-template-columns: 1fr; }
    .lead-side { position: static; }
}
@media (max-width: 980px) {
    .admin-sidebar { transform: translateX(-100%); box-shadow: 20px 0 60px rgba(0,0,0,.2); }
    .admin-sidebar.is-open { transform: translateX(0); }
    .sidebar-close { display: block; }
    .admin-sidebar-mask { display: block; position: fixed; inset: 0; background: rgba(5, 18, 12, .45); z-index: 45; opacity: 0; visibility: hidden; transition: all .2s ease; }
    .admin-sidebar-mask.is-visible { opacity: 1; visibility: visible; }
    .admin-main { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .admin-content { padding: 20px; }
    .admin-topbar { padding: 0 18px; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-tabs { position: static; flex-direction: row; overflow-x: auto; }
    .settings-tabs a { white-space: nowrap; flex-direction: column; align-items: flex-start; gap: 1px; }
    .form-layout { grid-template-columns: 1fr; }
    .form-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; }
    .login-shell { grid-template-columns: 1fr; }
    .login-art { display: none; }
    .login-panel { min-height: 100vh; }
    .login-mobile-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 34px; }
    .login-mobile-brand strong { font-size: 14px; }
    .media-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
    .admin-content { padding: 16px 13px 28px; }
    .admin-topbar { height: 58px; padding: 0 12px; }
    .admin-crumb { display: none; }
    .top-link { display: none; }
    .top-user { font-size: 0; padding: 0; }
    .top-user span { width: 30px; height: 30px; font-size: 10px; }
    .page-head { flex-direction: column; gap: 12px; }
    .page-head h1 { font-size: 20px; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .kpi-card { padding: 12px; }
    .kpi-card > strong { font-size: 23px; margin: 10px 0 7px; }
    .kpi-card__head { font-size: 8px; }
    .kpi-card__head em { display: none; }
    .kpi-card__foot { font-size: 7.5px; }
    .grid-3 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .field--half { grid-column: auto; }
    .form-aside { grid-template-columns: 1fr; }
    .image-field { grid-template-columns: 90px 1fr; }
    .image-field__preview { width: 90px; height: 62px; }
    .filter-search { flex: 1 1 100%; min-width: 0; }
    .filter-bar { gap: 5px; }
    .filter-spacer { display: none; }
    .filter-count { width: 100%; text-align: right; }
    .admin-table { min-width: 660px; }
    .list-table { min-width: 740px; }
    .media-grid { grid-template-columns: repeat(2, 1fr); }
    .maintenance-grid { grid-template-columns: 1fr; }
    .source-donut-wrap { flex-direction: column; align-items: flex-start; }
    .source-legend { width: 100%; }
    .export-stat { grid-template-columns: 1fr 1fr; }
    .detail-list { grid-template-columns: 1fr; }
    .lead-status-tabs { width: 100%; }
    .form-row-2 { grid-template-columns: 1fr; }
    .settings-save-bar { flex-direction: column; align-items: stretch; }
    .settings-save-bar .btn { width: 100%; }
    .settings-test-body { flex-direction: column; align-items: stretch; }
    .settings-test-body .btn { width: 100%; }
    .panel-head { flex-wrap: wrap; }
    .login-panel { padding: 22px; }
    .login-panel h2 { font-size: 24px; }
}
