/* =========================================================================
   默笙音频 · 调音师工具箱
   Admin console
   ========================================================================= */

:root {
    color-scheme: dark;
    --bg: #05090e;
    --panel: #0b131c;
    --panel-2: #0e1925;
    --panel-3: #111f2d;
    --text: #eef6fa;
    --text-soft: #c4d6e1;
    --muted: #8ba3b4;
    --dim: #607787;
    --line: rgba(143, 177, 201, 0.12);
    --line-strong: rgba(143, 177, 201, 0.21);
    --accent: #5eead4;
    --accent-2: #38bdf8;
    --danger: #fb7185;
    --warn: #fbbf24;
    --success: #34d399;
    --font: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
    --mono: "Cascadia Code", "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
    --radius: 16px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

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

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; border: 0; background: none; cursor: pointer; }
img { max-width: 100%; display: block; }
.icon { width: 1.15em; height: 1.15em; flex: 0 0 auto; vertical-align: -0.18em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #05090e; }
::-webkit-scrollbar-thumb { background: #1c2c39; border-radius: 99px; border: 2px solid #05090e; }
::-webkit-scrollbar-thumb:hover { background: #2b4354; }

.admin-aurora,
.admin-grid,
.login-aurora,
.login-grid,
.page-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.admin-aurora,
.login-aurora {
    background:
        radial-gradient(900px 650px at 8% -4%, rgba(56, 189, 248, 0.1), transparent 62%),
        radial-gradient(850px 620px at 96% 100%, rgba(94, 234, 212, 0.075), transparent 60%),
        linear-gradient(145deg, #070d14, #04080d 70%);
}

.admin-grid,
.login-grid {
    background-image:
        linear-gradient(rgba(143, 177, 201, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(143, 177, 201, 0.026) 1px, transparent 1px);
    background-size: 68px 68px;
    mask-image: radial-gradient(circle at 30% 15%, #000, transparent 75%);
}

/* -------------------------------------------------------------------------
   Shell
   ---------------------------------------------------------------------- */

.admin-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    width: min(100%, 1640px);
    min-height: 100vh;
    margin: 0 auto;
    background: rgba(5, 9, 14, 0.48);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 14px 17px;
    border-right: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(10, 17, 25, 0.96), rgba(6, 11, 17, 0.95)),
        radial-gradient(400px 300px at 50% 0%, rgba(94, 234, 212, 0.06), transparent 70%);
    backdrop-filter: blur(20px);
    overflow-y: auto;
    z-index: 40;
}

.admin-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
}

.admin-brand,
.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background:
        radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.38), transparent 35%),
        linear-gradient(135deg, var(--accent), var(--accent-2) 60%, #6366f1);
    color: #041015;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -2px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 11px 27px -14px rgba(56, 189, 248, 0.72);
}

.admin-brand-type {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
    min-width: 0;
}

.admin-brand-type strong {
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.admin-brand-type small {
    color: var(--dim);
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: 0.16em;
    white-space: nowrap;
}

.admin-side-close {
    display: none;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    place-items: center;
}

.admin-root-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 11px;
    margin: 20px 6px 18px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.022);
    color: var(--text-soft);
    font-size: 10px;
}

.admin-root-pill em {
    margin-left: auto;
    color: var(--dim);
    font-family: var(--mono);
    font-size: 8px;
    font-style: normal;
}

.server-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.08), 0 0 10px var(--accent);
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-nav-label {
    margin: 0 12px 7px;
    color: #4a5e6c;
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.admin-nav-label-gap {
    margin-top: 19px;
}

.admin-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 39px;
    padding: 0 11px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 12px;
    transition: color 0.2s, background 0.2s;
}

.admin-nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.035);
}

.admin-nav-link.is-active {
    color: var(--text);
    background: linear-gradient(90deg, rgba(94, 234, 212, 0.12), rgba(94, 234, 212, 0.02) 80%, transparent);
    box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.08);
}

.admin-nav-link.is-active::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 50%;
    width: 3px;
    height: 18px;
    border-radius: 0 4px 4px 0;
    background: var(--accent);
    transform: translateY(-50%);
    box-shadow: 0 0 14px var(--accent);
}

.admin-nav-icon {
    width: 17px;
    display: grid;
    place-items: center;
    color: #5c7383;
}

.admin-nav-link.is-active .admin-nav-icon {
    color: var(--accent);
}

.admin-nav-link > span:nth-child(2) {
    flex: 1;
}

.admin-nav-link em {
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--dim);
    font-family: var(--mono);
    font-size: 8px;
    font-style: normal;
}

.admin-nav-link.is-active em {
    color: var(--accent);
    background: rgba(94, 234, 212, 0.08);
}

.admin-sidebar-note {
    margin-top: 26px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
}

.admin-side-action {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    color: #657c8b;
    font-size: 10px;
    border-radius: 7px;
    transition: color 0.2s, background 0.2s;
}

.admin-side-action:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.03);
}

.admin-side-action .icon {
    width: 13px;
    height: 13px;
}

.admin-sidebar-foot {
    margin-top: auto;
    padding-top: 24px;
}

.admin-user-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}

.admin-avatar {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 9px;
    color: #041015;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 11px;
    font-weight: 800;
}

.admin-user-mini div {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.admin-user-mini strong {
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-mini small {
    color: var(--dim);
    font-size: 8px;
}

.admin-user-mini > a {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: #5e7585;
}

.admin-user-mini > a:hover {
    color: var(--danger);
    background: rgba(251, 113, 133, 0.07);
}

.admin-copyright {
    margin: 11px 0 0;
    color: #3f5361;
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: 0.06em;
    text-align: center;
}

.admin-scrim {
    display: none;
}

/* -------------------------------------------------------------------------
   Main / topbar
   ---------------------------------------------------------------------- */

.admin-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 30px;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 11, 17, 0.76);
    backdrop-filter: blur(20px);
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.admin-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    place-items: center;
}

.admin-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.03em;
}

.admin-breadcrumb span { color: #4d6270; }
.admin-breadcrumb i { color: #334651; font-style: normal; }
.admin-breadcrumb strong { color: var(--text-soft); font-weight: 500; }

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
}

.admin-clock {
    color: var(--text-soft);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.04em;
}

.admin-date {
    color: #506574;
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.05em;
}

.admin-view-site {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: #7891a1;
    font-size: 9px;
    transition: color 0.2s, border-color 0.2s;
}

.admin-view-site:hover {
    color: var(--accent);
    border-color: rgba(94, 234, 212, 0.3);
}

.admin-view-site .icon {
    width: 12px;
    height: 12px;
}

.admin-avatar-top {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 10px;
}

.admin-content {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 27px 30px 48px;
}

.admin-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.admin-eyebrow {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #637b8b;
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.admin-page-head h1 {
    margin: 5px 0 0;
    font-size: 27px;
    font-weight: 650;
    letter-spacing: -0.045em;
    line-height: 1.2;
}

.page-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

/* -------------------------------------------------------------------------
   Flash / toast
   ---------------------------------------------------------------------- */

.admin-flash {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 10.5px;
    line-height: 1.65;
    background: rgba(255, 255, 255, 0.028);
    color: var(--text-soft);
}

.admin-flash .icon {
    width: 14px;
    height: 14px;
    margin-top: 1px;
}

.admin-flash > span {
    flex: 1;
}

.admin-flash > button {
    color: var(--dim);
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
}

.admin-flash-success {
    border-color: rgba(52, 211, 153, 0.19);
    background: rgba(52, 211, 153, 0.05);
    color: #9ee8d4;
}

.admin-flash-error {
    border-color: rgba(251, 113, 133, 0.19);
    background: rgba(251, 113, 133, 0.05);
    color: #fda4b0;
}

.admin-flash-warning {
    border-color: rgba(251, 191, 36, 0.2);
    background: rgba(251, 191, 36, 0.045);
    color: #f5d68b;
}

.admin-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 100;
    padding: 10px 15px;
    border: 1px solid rgba(94, 234, 212, 0.25);
    border-radius: 8px;
    background: rgba(8, 20, 23, 0.96);
    color: var(--accent);
    font-size: 10px;
    box-shadow: 0 15px 40px -15px #000;
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition: opacity 0.22s, transform 0.22s;
    backdrop-filter: blur(10px);
}

.admin-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

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

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 35px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.admin-btn .icon {
    width: 13px;
    height: 13px;
}

.admin-btn:hover {
    transform: translateY(-1px);
}

.admin-btn-primary {
    color: #031015;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 26px -16px rgba(94, 234, 212, 0.7);
}

.admin-btn-primary:hover {
    filter: brightness(1.04);
}

.admin-btn-ghost {
    color: var(--text-soft);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.03);
}

.admin-btn-ghost:hover {
    border-color: rgba(94, 234, 212, 0.28);
    color: var(--text);
}

.admin-btn-subtle {
    color: var(--muted);
    border-color: var(--line);
    background: transparent;
}

.admin-btn-subtle:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.admin-btn-danger {
    color: #fda4b0;
    border-color: rgba(251, 113, 133, 0.2);
    background: rgba(251, 113, 133, 0.055);
}

.admin-btn-danger:hover {
    background: rgba(251, 113, 133, 0.1);
}

.admin-btn-block {
    width: 100%;
    min-height: 42px;
}

.admin-btn-sm {
    min-height: 28px;
    padding: 0 8px;
    font-size: 9px;
    border-radius: 6px;
}

.admin-btn-sm .icon {
    width: 11px;
    height: 11px;
}

.admin-icon-btn {
    width: 29px;
    height: 29px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.admin-icon-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
    border-color: var(--line-strong);
}

.admin-icon-btn .icon {
    width: 13px;
    height: 13px;
}

/* -------------------------------------------------------------------------
   Cards / dashboard
   ---------------------------------------------------------------------- */

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.metric-card {
    position: relative;
    padding: 17px 17px 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(280px 150px at 100% 0%, rgba(94, 234, 212, 0.05), transparent 65%),
        linear-gradient(155deg, rgba(14, 24, 35, 0.88), rgba(9, 15, 23, 0.94));
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.28), transparent);
    opacity: 0.7;
}

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.metric-label {
    color: var(--muted);
    font-size: 9.5px;
    letter-spacing: 0.03em;
}

.metric-icon {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--accent);
    background: rgba(94, 234, 212, 0.065);
    border: 1px solid rgba(94, 234, 212, 0.1);
}

.metric-icon .icon {
    width: 14px;
    height: 14px;
}

.metric-value {
    display: flex;
    align-items: baseline;
    gap: 5px;
    line-height: 1;
}

.metric-value strong {
    font-family: var(--mono);
    font-size: 27px;
    font-weight: 500;
    letter-spacing: -0.04em;
}

.metric-value em {
    color: var(--dim);
    font-style: normal;
    font-family: var(--mono);
    font-size: 8px;
}

.metric-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 11px;
    color: var(--dim);
    font-size: 8.5px;
}

.metric-foot .up {
    color: var(--accent);
}

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: 13px;
    margin-bottom: 14px;
}

.dash-grid-even {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(160deg, rgba(14, 24, 35, 0.86), rgba(9, 15, 23, 0.94));
    overflow: hidden;
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 19px 13px;
}

.card-head h2,
.card-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card-head p {
    margin: 3px 0 0;
    color: var(--dim);
    font-size: 8.5px;
}

.card-head a {
    color: var(--accent);
    font-size: 9px;
    white-space: nowrap;
}

.card-body {
    padding: 0 19px 19px;
}

.chart-summary {
    display: flex;
    gap: 18px;
    margin-bottom: 12px;
}

.chart-summary div {
    display: flex;
    flex-direction: column;
}

.chart-summary strong {
    font-family: var(--mono);
    font-size: 17px;
    font-weight: 500;
    color: var(--text-soft);
}

.chart-summary span {
    color: var(--dim);
    font-size: 8px;
}

.chart-wrap {
    position: relative;
    height: 158px;
    display: flex;
    align-items: flex-end;
    gap: 7px;
    padding-top: 8px;
    border-bottom: 1px solid var(--line);
    background-image: linear-gradient(rgba(143, 177, 201, 0.05) 1px, transparent 1px);
    background-size: 100% 33.333%;
}

.chart-col {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.chart-bar-stack {
    width: 100%;
    max-width: 26px;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
}

.chart-bar {
    width: 8px;
    min-height: 2px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, var(--accent-2), rgba(56, 189, 248, 0.09));
    transition: height 0.5s var(--ease);
}

.chart-bar.is-visits {
    background: linear-gradient(180deg, var(--accent), rgba(94, 234, 212, 0.08));
}

.chart-col-label {
    color: #506573;
    font-family: var(--mono);
    font-size: 7px;
    white-space: nowrap;
}

.chart-legend {
    display: flex;
    gap: 13px;
    margin-top: 10px;
    color: var(--dim);
    font-size: 8px;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.chart-legend i {
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--accent);
}

.chart-legend span:last-child i {
    background: var(--accent-2);
}

.top-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.top-item:last-child {
    border-bottom: 0;
}

.top-rank {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 5px;
    color: var(--dim);
    background: rgba(255, 255, 255, 0.035);
    font-family: var(--mono);
    font-size: 8px;
}

.top-item:first-child .top-rank {
    color: #041015;
    background: var(--accent);
}

.top-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.top-main strong {
    font-size: 10px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-main span {
    color: var(--dim);
    font-size: 8px;
}

.top-value {
    color: var(--text-soft);
    font-family: var(--mono);
    font-size: 9px;
}

.quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.quick-card {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.022);
    transition: border-color 0.2s, background 0.2s;
}

.quick-card:hover {
    border-color: rgba(94, 234, 212, 0.25);
    background: rgba(94, 234, 212, 0.035);
}

.quick-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: var(--accent);
    background: rgba(94, 234, 212, 0.06);
}

.quick-icon .icon {
    width: 13px;
    height: 13px;
}

.quick-card div {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.quick-card strong {
    font-size: 9px;
    font-weight: 500;
}

.quick-card small {
    color: var(--dim);
    font-size: 7.5px;
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.alert-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid rgba(251, 191, 36, 0.14);
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.035);
    color: #cbb37a;
    font-size: 9px;
    line-height: 1.65;
}

.alert-row .icon {
    width: 13px;
    height: 13px;
    margin-top: 1px;
    color: var(--warn);
}

.alert-row a {
    color: #fcd34d;
    border-bottom: 1px solid rgba(252, 211, 77, 0.25);
}

/* -------------------------------------------------------------------------
   Tables
   ---------------------------------------------------------------------- */

.table-card {
    overflow: hidden;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.table-toolbar-left,
.table-toolbar-right {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.admin-search {
    position: relative;
    display: flex;
    align-items: center;
    height: 33px;
    width: 220px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--dim);
}

.admin-search .icon {
    width: 13px;
    height: 13px;
    margin-left: 9px;
}

.admin-search input {
    width: 100%;
    height: 100%;
    padding: 0 8px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 10px;
}

.admin-search input::placeholder {
    color: #526977;
}

.admin-select {
    height: 33px;
    padding: 0 26px 0 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    outline: 0;
    appearance: none;
    background-color: rgba(255, 255, 255, 0.025);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b93a3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    color: var(--muted);
    font-size: 9px;
    cursor: pointer;
}

.admin-select option {
    background: #0c151f;
    color: var(--text);
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.admin-table th {
    padding: 9px 13px;
    border-bottom: 1px solid var(--line);
    color: #5a7080;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.016);
}

.admin-table td {
    padding: 11px 13px;
    border-bottom: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 10px;
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.018);
}

.admin-table .cell-tool {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 190px;
}

.admin-table .tool-thumb {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--c1, #5eead4), var(--c2, #38bdf8));
    color: #041015;
    font-size: 15px;
    overflow: hidden;
}

.admin-table .tool-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-table .tool-thumb span {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.admin-table .cell-tool div {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
    min-width: 0;
}

.admin-table .cell-tool strong {
    font-size: 10px;
    font-weight: 550;
    color: var(--text);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-table .cell-tool small {
    color: var(--dim);
    font-size: 8px;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 19px;
    padding: 0 7px;
    border-radius: 99px;
    font-size: 8px;
    white-space: nowrap;
}

.status-pill::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
}

.status-pill.is-on {
    color: #82ded0;
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.12);
}

.status-pill.is-off {
    color: #8198a6;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--line);
}

.category-pill {
    display: inline-flex;
    align-items: center;
    min-height: 19px;
    padding: 0 6px;
    border-radius: 4px;
    color: #8ba3b3;
    background: rgba(255, 255, 255, 0.035);
    font-size: 8px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.table-actions form {
    display: inline-flex;
}

.table-empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--muted);
}

.table-empty .empty-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin: 0 auto 11px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--accent);
    background: rgba(94, 234, 212, 0.04);
}

.table-empty h3 {
    margin: 0 0 4px;
    font-size: 14px;
    color: var(--text-soft);
}

.table-empty p {
    margin: 0;
    font-size: 9px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-family: var(--mono);
    font-size: 8px;
}

.page-links {
    display: flex;
    gap: 4px;
}

.page-link {
    min-width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 8px;
}

.page-link:hover {
    border-color: var(--line-strong);
    color: var(--text);
}

.page-link.is-active {
    color: #041015;
    border-color: transparent;
    background: var(--accent);
}

.page-link.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

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

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.form-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(14, 24, 35, 0.86), rgba(9, 15, 23, 0.94));
    overflow: hidden;
}

.form-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 19px 12px;
    border-bottom: 1px solid var(--line);
}

.form-card-head h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.form-card-head p {
    margin: 3px 0 0;
    color: var(--dim);
    font-size: 8.5px;
    line-height: 1.6;
}

.form-card-body {
    padding: 17px 19px 19px;
}

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

.form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-grid .span-2 {
    grid-column: span 2;
}

.form-grid .span-3 {
    grid-column: span 3;
}

.admin-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.admin-field > span,
.field-label {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.01em;
}

.admin-field > span em {
    color: var(--danger);
    font-style: normal;
}

.admin-field input[type="text"],
.admin-field input[type="password"],
.admin-field input[type="url"],
.admin-field input[type="number"],
.admin-field input[type="color"],
.admin-field select,
.admin-field textarea {
    width: 100%;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    outline: 0;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text);
    font-size: 10.5px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
    border-color: rgba(94, 234, 212, 0.45);
    box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.05);
}

.admin-field input::placeholder,
.admin-field textarea::placeholder {
    color: #4f6473;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px #0d1722 inset;
    caret-color: var(--text);
    transition: background-color 9999s ease-out 0s;
}

.admin-field textarea {
    resize: vertical;
    min-height: 88px;
    line-height: 1.7;
}

.admin-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b93a3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    padding-right: 27px;
    cursor: pointer;
}

.admin-field select option {
    background: #0c151f;
}

.admin-field input[type="color"] {
    padding: 3px;
    min-height: 36px;
    cursor: pointer;
}

.admin-field input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.admin-field input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 4px;
}

.field-help {
    margin: 0;
    color: #526977;
    font-size: 8px;
    line-height: 1.65;
}

.field-help code {
    padding: 1px 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    color: #9db7c4;
    font-family: var(--mono);
    font-size: 0.95em;
}

.field-row-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-input-icon > .icon {
    position: absolute;
    left: 11px;
    width: 14px;
    height: 14px;
    color: var(--dim);
    pointer-events: none;
}

.admin-input-icon input {
    padding-left: 32px !important;
    padding-right: 37px !important;
    min-height: 39px !important;
}

.admin-password-eye {
    position: absolute;
    right: 5px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    color: var(--dim);
}

.admin-password-eye:hover,
.admin-password-eye.is-on {
    color: var(--accent);
}

.admin-password-eye .icon {
    width: 14px;
    height: 14px;
}

.switch-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.018);
    cursor: pointer;
}

.switch-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-ui {
    position: relative;
    width: 30px;
    height: 17px;
    flex: 0 0 auto;
    margin-top: 1px;
    border-radius: 99px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.2s, border-color 0.2s;
}

.switch-ui::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #778d9a;
    transition: transform 0.2s, background 0.2s;
}

.switch-row input:checked + .switch-ui {
    background: rgba(94, 234, 212, 0.16);
    border-color: rgba(94, 234, 212, 0.35);
}

.switch-row input:checked + .switch-ui::after {
    transform: translateX(13px);
    background: var(--accent);
    box-shadow: 0 0 7px rgba(94, 234, 212, 0.6);
}

.switch-row div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.5;
}

.switch-row strong {
    color: var(--text-soft);
    font-size: 9.5px;
    font-weight: 500;
}

.switch-row small {
    color: var(--dim);
    font-size: 8px;
    line-height: 1.65;
}

.check-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--muted);
    font-size: 9px;
}

.check-inline input {
    accent-color: var(--accent);
    width: 12px;
    height: 12px;
}

.upload-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px;
    border: 1px dashed var(--line-strong);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.018);
}

.upload-preview {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent);
    overflow: hidden;
    font-size: 20px;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upload-info strong {
    color: var(--text-soft);
    font-size: 9px;
    font-weight: 500;
}

.upload-info small {
    color: var(--dim);
    font-size: 7.5px;
    line-height: 1.5;
}

.upload-input {
    position: relative;
    overflow: hidden;
    display: inline-flex;
}

.upload-input input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 13px 19px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.014);
}

.sticky-actions {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #0a1017;
    box-shadow: 0 20px 50px -30px #000;
}

.form-side {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.side-info {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.018);
    color: var(--muted);
    font-size: 9px;
    line-height: 1.75;
}

.side-info h3 {
    margin: 0 0 5px;
    font-size: 11px;
    color: var(--text-soft);
}

.side-info p {
    margin: 0;
}

.side-info code {
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    font-family: var(--mono);
    font-size: 0.9em;
}

/* -------------------------------------------------------------------------
   Link editor
   ---------------------------------------------------------------------- */

.link-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.link-editor-row {
    display: grid;
    grid-template-columns: 24px minmax(120px, 1.1fr) 98px minmax(190px, 2.1fr) 68px 104px 62px 30px;
    gap: 7px;
    align-items: start;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.018);
}

.link-drag {
    width: 24px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #4e6473;
    cursor: grab;
    user-select: none;
}

.link-drag:active {
    cursor: grabbing;
}

.link-drag span {
    font-size: 13px;
    line-height: 1;
    letter-spacing: -2px;
}

.link-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.link-field label {
    color: #5d7484;
    font-size: 7.5px;
    letter-spacing: 0.02em;
}

.link-field input,
.link-field select {
    width: 100%;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    outline: 0;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text);
    font-size: 9.5px;
}

.link-field input:focus,
.link-field select:focus {
    border-color: rgba(94, 234, 212, 0.45);
}

.link-field input::placeholder {
    color: #4b606f;
}

.link-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%237b93a3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 7px center;
    padding-right: 22px;
}

.link-field select option {
    background: #0c151f;
}

.link-remove {
    width: 28px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #6e8492;
    margin-top: 11px;
}

.link-remove:hover {
    color: var(--danger);
    border-color: rgba(251, 113, 133, 0.25);
    background: rgba(251, 113, 133, 0.05);
}

.link-remove .icon {
    width: 12px;
    height: 12px;
}

.link-editor-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 3px;
}

.link-editor-foot p {
    margin: 0;
    color: var(--dim);
    font-size: 8px;
}

.link-empty {
    padding: 18px;
    text-align: center;
    border: 1px dashed var(--line-strong);
    border-radius: 9px;
    color: var(--dim);
    font-size: 9px;
}

/* -------------------------------------------------------------------------
   Settings tabs
   ---------------------------------------------------------------------- */

.tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 13px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.018);
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
}

.tab-btn {
    min-height: 29px;
    padding: 0 12px;
    border-radius: 6px;
    color: var(--dim);
    font-size: 9.5px;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-soft);
}

.tab-btn.is-active {
    color: var(--text);
    background: rgba(94, 234, 212, 0.1);
    box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.1);
}

.tab-panel[hidden] {
    display: none;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 13px;
    align-items: start;
}

.settings-main {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.settings-side {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

/* -------------------------------------------------------------------------
   Stats
   ---------------------------------------------------------------------- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 13px;
}

.stat-tile {
    padding: 15px 17px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(155deg, rgba(14, 24, 35, 0.86), rgba(9, 15, 23, 0.94));
}

.stat-tile span {
    display: block;
    color: var(--dim);
    font-size: 8px;
    letter-spacing: 0.04em;
}

.stat-tile strong {
    display: block;
    margin-top: 5px;
    font-family: var(--mono);
    font-size: 23px;
    font-weight: 500;
    letter-spacing: -0.04em;
}

.trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 190px;
    padding-top: 10px;
    border-bottom: 1px solid var(--line);
}

.trend-col {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}

.trend-bars {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
}

.trend-bars i {
    display: block;
    width: 45%;
    max-width: 8px;
    min-height: 2px;
    border-radius: 2px 2px 0 0;
    background: linear-gradient(180deg, var(--accent), rgba(94, 234, 212, 0.12));
}

.trend-bars i + i {
    background: linear-gradient(180deg, var(--accent-2), rgba(56, 189, 248, 0.12));
}

.trend-col span {
    color: #4e6270;
    font-family: var(--mono);
    font-size: 6.5px;
    white-space: nowrap;
}

.stats-table {
    min-width: 800px;
}

.ua-cell {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--dim);
    font-size: 8px;
}

/* -------------------------------------------------------------------------
   Empty / backups
   ---------------------------------------------------------------------- */

.admin-empty {
    padding: 60px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    text-align: center;
    background: rgba(255, 255, 255, 0.012);
}

.admin-empty .empty-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    border-radius: 50%;
    color: var(--accent);
    background: rgba(94, 234, 212, 0.05);
    border: 1px solid rgba(94, 234, 212, 0.14);
}

.admin-empty h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.admin-empty p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 10px;
}

/* -------------------------------------------------------------------------
   Login
   ---------------------------------------------------------------------- */

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    overflow-x: hidden;
    background: #05090e;
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    min-height: 670px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.95fr);
    border: 1px solid rgba(143, 177, 201, 0.17);
    border-radius: 26px;
    overflow: hidden;
    background: rgba(6, 11, 17, 0.76);
    box-shadow: 0 50px 130px -55px rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(16px);
}

.login-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 34px 38px 27px;
    border-right: 1px solid var(--line);
    background:
        radial-gradient(650px 500px at 0% 0%, rgba(56, 189, 248, 0.13), transparent 62%),
        radial-gradient(500px 500px at 100% 100%, rgba(94, 234, 212, 0.08), transparent 60%),
        linear-gradient(150deg, #0d1a26, #071018 72%);
    overflow: hidden;
}

.login-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(143, 177, 201, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(143, 177, 201, 0.035) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: radial-gradient(circle at 25% 20%, #000, transparent 80%);
}

.login-copy {
    position: relative;
    z-index: 2;
    margin-top: auto;
    margin-bottom: 60px;
    padding-top: 60px;
}

.login-copy h1 {
    margin: 16px 0 18px;
    font-size: clamp(38px, 4vw, 50px);
    line-height: 1.17;
    letter-spacing: -0.06em;
    font-weight: 650;
}

.login-copy h1 span {
    color: var(--accent);
    position: relative;
}

.login-copy h1 span::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 3px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.login-copy > p:last-child {
    max-width: 340px;
    margin: 0;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.95;
}

.login-visual-art {
    position: absolute;
    right: -90px;
    top: 50%;
    width: 380px;
    height: 380px;
    transform: translateY(-48%);
    pointer-events: none;
    opacity: 0.8;
}

.login-ring {
    position: absolute;
    border: 1px solid rgba(94, 234, 212, 0.12);
    border-radius: 50%;
}

.ring-a { inset: 10px; border-style: dashed; animation: admin-spin 70s linear infinite; }
.ring-b { inset: 60px; border-color: rgba(56, 189, 248, 0.12); }
.ring-c { inset: 112px; border-color: rgba(143, 177, 201, 0.1); }

.login-wave {
    position: absolute;
    inset: 165px 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto;
}

.login-wave i {
    width: 2px;
    height: 20px;
    background: var(--accent);
    opacity: 0.5;
    animation: admin-wave 2.2s ease-in-out infinite;
}

.login-wave i:nth-child(2) { animation-delay: .1s; }
.login-wave i:nth-child(3) { animation-delay: .25s; }
.login-wave i:nth-child(4) { animation-delay: .05s; }
.login-wave i:nth-child(5) { animation-delay: .35s; }
.login-wave i:nth-child(6) { animation-delay: .15s; }
.login-wave i:nth-child(7) { animation-delay: .3s; }
.login-wave i:nth-child(8) { animation-delay: .2s; }
.login-wave i:nth-child(9) { animation-delay: .4s; }
.login-wave i:nth-child(10) { animation-delay: .08s; }
.login-wave i:nth-child(11) { animation-delay: .32s; }
.login-wave i:nth-child(12) { animation-delay: .18s; }

.login-art-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: rgba(94, 234, 212, 0.18);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.3em;
}

.login-visual-foot {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    color: #405563;
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: 0.06em;
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 38px 44px;
    background:
        radial-gradient(430px 300px at 100% 0%, rgba(94, 234, 212, 0.045), transparent 65%),
        linear-gradient(160deg, rgba(13, 22, 33, 0.92), rgba(8, 14, 21, 0.96));
}

.login-card {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.login-card-head {
    margin-bottom: 24px;
}

.login-lock {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 12px;
    color: var(--accent);
    border: 1px solid rgba(94, 234, 212, 0.18);
    background: rgba(94, 234, 212, 0.055);
    box-shadow: 0 0 30px -12px rgba(94, 234, 212, 0.4);
}

.login-lock .icon {
    width: 18px;
    height: 18px;
}

.login-card-head h2 {
    margin: 8px 0 4px;
    font-size: 26px;
    letter-spacing: -0.045em;
}

.login-card-head > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 10.5px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-form .admin-field > span {
    font-size: 9px;
}

.login-form .admin-btn-block {
    margin-top: 4px;
}

.login-error {
    margin-bottom: 15px;
}

.login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    color: #59707f;
    font-size: 8px;
}

.login-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.login-meta .icon {
    width: 11px;
    height: 11px;
}

.login-meta a {
    color: #7d95a4;
    border-bottom: 1px solid rgba(143, 177, 201, 0.18);
}

.login-hint {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 19px;
    padding: 9px 10px;
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: 7px;
    background: rgba(251, 191, 36, 0.035);
    color: #bda66e;
    font-size: 8px;
    line-height: 1.65;
}

.login-hint .icon {
    width: 12px;
    height: 12px;
    margin-top: 1px;
    color: var(--warn);
}

.login-panel-foot {
    margin: 25px auto 0;
    color: #435762;
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: 0.07em;
    text-align: center;
}

@keyframes admin-wave {
    0%, 100% { transform: scaleY(.5); opacity: .3; }
    50% { transform: scaleY(1.7); opacity: .8; }
}

@keyframes admin-spin {
    to { transform: rotate(360deg); }
}

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

@media (max-width: 1220px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-grid {
        grid-template-columns: minmax(0, 1fr) 250px;
    }

    .link-editor-row {
        grid-template-columns: 22px minmax(110px, 1fr) 92px minmax(165px, 1.8fr) 62px 86px 58px 28px;
    }
}

@media (max-width: 1040px) {
    .admin-shell {
        grid-template-columns: 236px minmax(0, 1fr);
    }

    .admin-content {
        padding: 23px 22px 42px;
    }

    .admin-topbar {
        padding: 0 22px;
    }

    .dash-grid {
        grid-template-columns: 1fr;
    }

    .dash-grid-even {
        grid-template-columns: 1fr 1fr;
    }

    .login-shell {
        grid-template-columns: 1fr;
        max-width: 540px;
        min-height: 0;
    }

    .login-visual {
        min-height: 260px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .login-copy {
        margin: 50px 0 10px;
        padding-top: 0;
    }

    .login-copy h1 {
        font-size: 36px;
        margin: 12px 0 12px;
    }

    .login-copy > p:last-child {
        font-size: 10px;
    }

    .login-visual-art {
        width: 260px;
        height: 260px;
        right: -100px;
        opacity: 0.45;
    }

    .login-wave {
        inset: 112px 82px;
    }

    .login-visual-foot {
        display: none;
    }

    .login-panel {
        padding: 30px 34px 34px;
    }
}

@media (max-width: 900px) {
    .admin-shell {
        display: block;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 272px;
        transform: translateX(-102%);
        transition: transform 0.35s var(--ease);
        background: #080e15;
        box-shadow: 30px 0 80px rgba(0, 0, 0, 0.55);
    }

    body.admin-sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-side-close {
        display: grid;
    }

    .admin-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(2, 6, 10, 0.68);
        backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
    }

    body.admin-sidebar-open .admin-scrim {
        opacity: 1;
        visibility: visible;
    }

    .admin-menu-btn {
        display: grid;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .link-editor-row {
        grid-template-columns: 22px 1fr 96px minmax(150px, 1.6fr) 70px 30px;
    }

    .link-drag {
        grid-row: 1 / span 2;
    }

    .link-field-label {
        grid-column: 2;
        grid-row: 1;
    }

    .link-field-kind {
        grid-column: 3;
        grid-row: 1;
    }

    .link-field-url {
        grid-column: 4;
        grid-row: 1;
    }

    .link-field-code {
        grid-column: 5;
        grid-row: 1;
    }

    .link-field-note {
        grid-column: 2 / span 3;
        grid-row: 2;
    }

    .link-field-status {
        grid-column: 5;
        grid-row: 2;
    }

    .link-remove {
        grid-column: 6;
        grid-row: 1;
    }
}

@media (max-width: 720px) {
    .admin-topbar {
        min-height: 62px;
        padding: 0 15px;
    }

    .admin-breadcrumb span,
    .admin-breadcrumb i {
        display: none;
    }

    .admin-date,
    .admin-view-site {
        display: none;
    }

    .admin-content {
        padding: 19px 15px 34px;
    }

    .admin-page-head {
        margin-bottom: 17px;
    }

    .admin-page-head h1 {
        font-size: 23px;
    }

    .metric-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .metric-card {
        padding: 14px;
    }

    .metric-value strong {
        font-size: 23px;
    }

    .dash-grid-even,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-grid,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .form-grid .span-2,
    .form-grid .span-3 {
        grid-column: span 1;
    }

    .table-toolbar {
        display: block;
    }

    .table-toolbar-right {
        margin-top: 8px;
    }

    .admin-search {
        flex: 1;
        width: auto;
    }

    .admin-table {
        min-width: 680px;
    }

    .card-head {
        padding: 14px 14px 10px;
    }

    .card-body {
        padding: 0 14px 14px;
    }

    .chart-wrap {
        gap: 3px;
        height: 135px;
    }

    .chart-bar {
        width: 5px;
    }

    .chart-col-label {
        font-size: 6px;
    }

    .quick-grid {
        grid-template-columns: 1fr;
    }

    .settings-side {
        grid-template-columns: 1fr;
    }

    .tabs {
        width: 100%;
    }

    .tab-btn {
        flex: 1;
        padding: 0 8px;
    }

    .link-editor-row {
        grid-template-columns: 1fr 1fr 28px;
        padding: 8px;
    }

    .link-drag {
        display: none;
    }

    .link-field-label {
        grid-column: 1 / span 2;
        grid-row: 1;
    }

    .link-field-kind {
        grid-column: 1;
        grid-row: 2;
    }

    .link-field-code {
        grid-column: 2;
        grid-row: 2;
    }

    .link-field-url {
        grid-column: 1 / span 2;
        grid-row: 3;
    }

    .link-field-note {
        grid-column: 1 / span 2;
        grid-row: 4;
    }

    .link-field-status {
        grid-column: 1;
        grid-row: 5;
    }

    .link-remove {
        grid-column: 3;
        grid-row: 1;
    }

    .form-actions {
        padding: 11px 14px;
    }

    .form-actions .admin-btn {
        flex: 1;
    }

    .login-body {
        padding: 0;
    }

    .login-shell {
        border-radius: 0;
        border: 0;
        min-height: 100vh;
    }

    .login-visual {
        min-height: 220px;
        padding: 24px;
    }

    .login-copy {
        margin: 38px 0 0;
    }

    .login-copy h1 {
        font-size: 31px;
    }

    .login-copy > p:last-child {
        display: none;
    }

    .login-visual-art {
        display: none;
    }

    .login-panel {
        padding: 26px 22px 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Studio additions */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--line);
}
.info-grid > div {
    padding: 11px 13px;
    background: var(--panel-2);
}
.info-grid span {
    display: block;
    margin-bottom: 4px;
    color: var(--dim);
    font-size: 8px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.info-grid strong {
    display: block;
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-key {
    cursor: pointer;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 9px;
    border-bottom: 1px dashed rgba(94, 234, 212, .28);
}
.admin-key:hover { color: #fff; }
.deploy-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 23px 25px;
    margin-bottom: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(500px 260px at 100% 0%, rgba(47, 107, 255, .12), transparent 65%),
        linear-gradient(150deg, rgba(14, 24, 35, .95), rgba(8, 14, 21, .96));
}
.deploy-hero h2 {
    margin: 6px 0 5px;
    font-size: 23px;
    letter-spacing: -.04em;
}
.deploy-hero p:last-child {
    max-width: 700px;
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.8;
}
.deploy-stat {
    flex: 0 0 auto;
    text-align: right;
}
.deploy-stat strong {
    display: block;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 30px;
    font-weight: 500;
    line-height: 1;
}
.deploy-stat span {
    color: var(--dim);
    font-size: 8px;
}
.deploy-version {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, .018);
}
.deploy-window {
    width: 220px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(143, 177, 201, .2);
    border-radius: 8px;
    background: #090c12;
    box-shadow: 0 12px 28px -18px #000;
}
.deploy-window-bar {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 17px;
    padding: 0 7px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: #11151d;
}
.deploy-window-bar i {
    width: 3px; height: 3px; border-radius: 50%;
    background: #4e5b6b;
}
.deploy-window-bar span {
    margin-left: auto;
    color: #778398;
    font-size: 4px;
}
.deploy-window-body {
    display: flex;
    height: 70px;
}
.deploy-window-side {
    width: 57px;
    padding: 6px 5px;
    border-right: 1px solid rgba(255, 255, 255, .07);
    background: #0d1118;
}
.deploy-window-side b {
    width: 15px; height: 15px;
    display: grid; place-items: center;
    margin-bottom: 6px;
    border-radius: 5px;
    color: #041015;
    background: linear-gradient(135deg, var(--accent), #38bdf8);
    font-size: 7px;
}
.deploy-window-side span {
    display: block;
    margin-bottom: 4px;
    color: #76889c;
    font-size: 3.5px;
}
.deploy-window-main {
    flex: 1;
    padding: 9px;
    background: #10151d;
}
.deploy-window-main em {
    display: block;
    width: 58px;
    height: 5px;
    margin-bottom: 7px;
    border-radius: 2px;
    background: #dce8f5;
    opacity: .8;
}
.deploy-window-main i {
    display: inline-block;
    width: 28%;
    height: 20px;
    margin: 0 2% 4px 0;
    border: 1px solid rgba(143, 177, 201, .15);
    border-radius: 3px;
    background: #151c26;
}
.deploy-version-meta h3 {
    margin: 6px 0 4px;
    font-size: 14px;
}
.deploy-version-meta p {
    margin: 0;
    color: var(--dim);
    font-size: 8px;
    line-height: 1.7;
}

@media (max-width: 900px) {
    .info-grid { grid-template-columns: 1fr 1fr; }
    .deploy-hero { display: block; }
    .deploy-stat { margin-top: 13px; text-align: left; }
    .deploy-version { align-items: flex-start; }
    .deploy-window { width: 170px; }
    .deploy-version-meta { min-width: 0; }
}
@media (max-width: 620px) {
    .info-grid { grid-template-columns: 1fr; }
    .deploy-version { display: block; }
    .deploy-window { width: 100%; margin-bottom: 12px; }
}


/* Studio additions */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--line);
}
.info-grid > div { padding: 11px 13px; background: var(--panel-2); }
.info-grid span { display: block; margin-bottom: 4px; color: var(--dim); font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }
.info-grid strong { display: block; color: var(--text-soft); font-size: 10px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-key { cursor: pointer; color: var(--accent); font-family: var(--mono); font-size: 9px; border-bottom: 1px dashed rgba(94, 234, 212, .28); }
.admin-key:hover { color: #fff; }
.deploy-hero {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
    padding: 23px 25px; margin-bottom: 13px;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: radial-gradient(500px 260px at 100% 0%, rgba(47, 107, 255, .12), transparent 65%), linear-gradient(150deg, rgba(14, 24, 35, .95), rgba(8, 14, 21, .96));
}
.deploy-hero h2 { margin: 6px 0 5px; font-size: 23px; letter-spacing: -.04em; }
.deploy-hero p:last-child { max-width: 700px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.deploy-stat { flex: 0 0 auto; text-align: right; }
.deploy-stat strong { display: block; color: var(--accent); font-family: var(--mono); font-size: 30px; font-weight: 500; line-height: 1; }
.deploy-stat span { color: var(--dim); font-size: 8px; }
.deploy-version { display: flex; align-items: center; gap: 15px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); }
.deploy-window { width: 220px; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(143,177,201,.2); border-radius: 8px; background: #090c12; box-shadow: 0 12px 28px -18px #000; }
.deploy-window-bar { display: flex; align-items: center; gap: 3px; height: 17px; padding: 0 7px; border-bottom: 1px solid rgba(255,255,255,.08); background: #11151d; }
.deploy-window-bar i { width: 3px; height: 3px; border-radius: 50%; background: #4e5b6b; }
.deploy-window-bar span { margin-left: auto; color: #778398; font-size: 4px; }
.deploy-window-body { display: flex; height: 70px; }
.deploy-window-side { width: 57px; padding: 6px 5px; border-right: 1px solid rgba(255,255,255,.07); background: #0d1118; }
.deploy-window-side b { width: 15px; height: 15px; display: grid; place-items: center; margin-bottom: 6px; border-radius: 5px; color: #041015; background: linear-gradient(135deg, var(--accent), #38bdf8); font-size: 7px; }
.deploy-window-side span { display: block; margin-bottom: 4px; color: #76889c; font-size: 3.5px; }
.deploy-window-main { flex: 1; padding: 9px; background: #10151d; }
.deploy-window-main em { display: block; width: 58px; height: 5px; margin-bottom: 7px; border-radius: 2px; background: #dce8f5; opacity: .8; }
.deploy-window-main i { display: inline-block; width: 28%; height: 20px; margin: 0 2% 4px 0; border: 1px solid rgba(143,177,201,.15); border-radius: 3px; background: #151c26; }
.deploy-version-meta h3 { margin: 6px 0 4px; font-size: 14px; }
.deploy-version-meta p { margin: 0; color: var(--dim); font-size: 8px; line-height: 1.7; }
@media (max-width: 900px) {
    .info-grid { grid-template-columns: 1fr 1fr; }
    .deploy-hero { display: block; }
    .deploy-stat { margin-top: 13px; text-align: left; }
    .deploy-version { align-items: flex-start; }
    .deploy-window { width: 170px; }
    .deploy-version-meta { min-width: 0; }
}
@media (max-width: 620px) {
    .info-grid { grid-template-columns: 1fr; }
    .deploy-version { display: block; }
    .deploy-window { width: 100%; margin-bottom: 12px; }
}

/* 页面编辑弹窗：按钮管理页内编辑，不触发整页滚动 */
.admin-dialog {
    width: min(580px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    padding: 0;
    overflow: auto;
    color: var(--text);
    background: var(--panel);
    border: 1px solid rgba(148, 183, 210, .18);
    border-radius: 16px;
    box-shadow: 0 30px 90px -24px rgba(0, 0, 0, .9);
}
.admin-dialog::backdrop {
    background: rgba(2, 6, 12, .74);
    backdrop-filter: blur(4px);
}
.admin-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 21px 22px 0;
}
.admin-dialog-head .eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: .14em;
}
.admin-dialog-head h2 {
    margin: 0;
    font-size: 19px;
    letter-spacing: -.03em;
}
.admin-dialog-close {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.admin-dialog-close:hover { color: var(--text); border-color: rgba(148, 183, 210, .38); }
.admin-dialog .form-card-body { padding: 18px 22px 4px; }
.admin-dialog .form-actions {
    margin-top: 18px;
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .015);
}

#pages { scroll-margin-top: 84px; }


/* 多工作区标识 */
.admin-workspace-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 9px;
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
    border-radius: 7px;
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    font-size: 9px;
    text-decoration: none;
    white-space: nowrap;
}
.admin-workspace-pill:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* 用户后台模块权限 */
.permission-field {
    gap: 8px;
}
.permission-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}
.permission-toolbar > span {
    flex: 1;
    min-width: 220px;
    color: var(--dim);
    font-size: 8px;
    line-height: 1.6;
}
.permission-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}
.permission-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 35px;
    padding: 0 11px;
    color: var(--text-soft);
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 9px;
    cursor: pointer;
}
.permission-item:hover { border-color: rgba(148, 183, 210, .34); }
.permission-item input { accent-color: var(--accent); }
@media (max-width: 720px) {
    .permission-grid { grid-template-columns: 1fr 1fr; }
}

.login-role-note {
    margin-top: 10px;
    padding: 8px 10px;
    color: var(--muted);
    background: rgba(47, 107, 255, .05);
    border: 1px solid rgba(47, 107, 255, .14);
    border-radius: 7px;
    font-size: 8px;
    line-height: 1.7;
}

/* 卡密注册入口 */
.login-register-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-size: 8px;
}
.login-register-link a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent);
    text-decoration: none;
}
.login-register-link a:hover { color: #fff; }

.register-shell {
    height: auto;
    min-height: 100vh;
    padding: 24px 0;
}
.register-shell .login-card { margin: auto 0; }
.register-card .login-form { gap: 9px; }
#cardCode { letter-spacing: .08em; font-family: var(--mono); }

/* =========================================================================
   Theme styles · black / white / pink / blue
   ========================================================================= */
html[data-theme="pink"] {
    color-scheme: dark;
    --bg: #120711;
    --panel: #1a0c18;
    --panel-2: #21101f;
    --panel-3: #2a1627;
    --text: #fff1f8;
    --text-soft: #f3cfe2;
    --muted: #c79bb3;
    --dim: #8f6a80;
    --line: rgba(255, 143, 196, 0.14);
    --line-strong: rgba(255, 143, 196, 0.24);
    --accent: #ff6fae !important;
    --accent-2: #c084fc !important;
    --danger: #fb7185;
    --warn: #fbbf24;
    --success: #34d399;
}
html[data-theme="blue"] {
    color-scheme: dark;
    --bg: #050b18;
    --panel: #0a1425;
    --panel-2: #0d1a2f;
    --panel-3: #12233c;
    --text: #edf5ff;
    --text-soft: #c8dcf5;
    --muted: #8aa6c4;
    --dim: #5f7c9c;
    --line: rgba(126, 174, 235, 0.14);
    --line-strong: rgba(126, 174, 235, 0.24);
    --accent: #4f8cff !important;
    --accent-2: #38bdf8 !important;
    --danger: #fb7185;
    --warn: #fbbf24;
    --success: #34d399;
}
html[data-theme="white"] {
    color-scheme: light;
    --bg: #f3f6fb;
    --panel: #ffffff;
    --panel-2: #f8faff;
    --panel-3: #edf2fa;
    --text: #172033;
    --text-soft: #334155;
    --muted: #64748b;
    --dim: #94a3b8;
    --line: rgba(15, 23, 42, 0.1);
    --line-strong: rgba(15, 23, 42, 0.18);
    --accent: #2563eb !important;
    --accent-2: #0ea5e9 !important;
    --danger: #dc2626;
    --warn: #d97706;
    --success: #059669;
}
html[data-theme="pink"] .admin-aurora,
html[data-theme="pink"] .login-aurora {
    background:
        radial-gradient(900px 650px at 8% -4%, rgba(255, 111, 174, 0.13), transparent 62%),
        radial-gradient(850px 620px at 96% 100%, rgba(192, 132, 252, 0.09), transparent 60%),
        linear-gradient(145deg, #160914, #0d050b 70%);
}
html[data-theme="blue"] .admin-aurora,
html[data-theme="blue"] .login-aurora {
    background:
        radial-gradient(900px 650px at 8% -4%, rgba(79, 140, 255, 0.13), transparent 62%),
        radial-gradient(850px 620px at 96% 100%, rgba(56, 189, 248, 0.09), transparent 60%),
        linear-gradient(145deg, #071122, #030812 70%);
}
html[data-theme="white"] .admin-aurora,
html[data-theme="white"] .login-aurora {
    background:
        radial-gradient(900px 650px at 8% -4%, rgba(37, 99, 235, 0.09), transparent 62%),
        radial-gradient(850px 620px at 96% 100%, rgba(14, 165, 233, 0.06), transparent 60%),
        linear-gradient(145deg, #f9fbff, #eef3fb 70%);
}
html[data-theme="white"] .admin-grid,
html[data-theme="white"] .login-grid {
    opacity: 0.55;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px);
}
html[data-theme="white"] ::-webkit-scrollbar-track { background: #edf2fa; }
html[data-theme="white"] ::-webkit-scrollbar-thumb { background: #cbd5e1; border-color: #edf2fa; }

.admin-theme-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 6px;
    margin-right: 2px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: color-mix(in srgb, var(--panel) 78%, transparent);
}
.admin-theme-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.admin-theme-dot[data-theme-choice="black"] { background: #151922; }
.admin-theme-dot[data-theme-choice="white"] { background: #f8fafc; border-color: #cbd5e1; }
.admin-theme-dot[data-theme-choice="pink"] { background: #ff6fae; }
.admin-theme-dot[data-theme-choice="blue"] { background: #4f8cff; }
.admin-theme-dot:hover { transform: scale(1.15); }
.admin-theme-dot.is-active {
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--text);
}

html[data-theme="white"] .admin-sidebar {
    background: #ffffff;
    border-right-color: #e2e8f0;
}
html[data-theme="white"] .admin-topbar {
    background: rgba(255, 255, 255, 0.88);
    border-bottom-color: #e2e8f0;
}
html[data-theme="white"] .admin-brand-row { border-bottom-color: #edf2f7; }
html[data-theme="white"] .admin-brand-type strong { color: #111827; }
html[data-theme="white"] .admin-brand-type small { color: #94a3b8; }
html[data-theme="white"] .admin-nav-group-title { color: #94a3b8; }
html[data-theme="white"] .admin-nav a { color: #475569; }
html[data-theme="white"] .admin-nav a:hover { background: #f1f5fb; color: #172033; }
html[data-theme="white"] .admin-nav a.is-active {
    background: rgba(37, 99, 235, 0.09);
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.15);
}
html[data-theme="white"] .admin-workspace-pill,
html[data-theme="white"] .admin-view-site,
html[data-theme="white"] .admin-menu-btn,
html[data-theme="white"] .admin-icon-btn {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}
html[data-theme="white"] .admin-workspace-pill:hover,
html[data-theme="white"] .admin-icon-btn:hover { background: #eef3fb; color: #172033; }
html[data-theme="white"] .admin-card,
html[data-theme="white"] .form-card,
html[data-theme="white"] .side-info,
html[data-theme="white"] .table-empty,
html[data-theme="white"] .admin-table-wrap,
html[data-theme="white"] .settings-side {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}
html[data-theme="white"] .admin-card .card-head,
html[data-theme="white"] .form-card-head { border-bottom-color: #edf2f7; }
html[data-theme="white"] .admin-table th {
    background: #f8fafc;
    color: #64748b;
    border-bottom-color: #e2e8f0;
}
html[data-theme="white"] .admin-table td { border-bottom-color: #eef2f7; color: #334155; }
html[data-theme="white"] .admin-table tbody tr:hover { background: #f8fafc; }
html[data-theme="white"] .admin-field input,
html[data-theme="white"] .admin-field select,
html[data-theme="white"] .admin-field textarea,
html[data-theme="white"] .admin-search,
html[data-theme="white"] .admin-search input,
html[data-theme="white"] .category-pill,
html[data-theme="white"] .status-pill,
html[data-theme="white"] .admin-key {
    background: #f8fafc;
    border-color: #dbe3ee;
    color: #334155;
}
html[data-theme="white"] .admin-btn-subtle,
html[data-theme="white"] .admin-btn-ghost {
    background: #f8fafc;
    border-color: #dbe3ee;
    color: #475569;
}
html[data-theme="white"] .admin-btn-subtle:hover,
html[data-theme="white"] .admin-btn-ghost:hover { background: #eef3fb; color: #172033; }
html[data-theme="white"] .table-toolbar { border-bottom-color: #edf2f7; }
html[data-theme="white"] .admin-scrim { background: rgba(15, 23, 42, 0.35); }
html[data-theme="white"] .login-card {
    background: rgba(255, 255, 255, 0.94);
    border-color: #e2e8f0;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
}
html[data-theme="white"] .login-visual {
    background: linear-gradient(150deg, #f8fbff, #eef4fc);
    border-right-color: #e2e8f0;
}
html[data-theme="white"] .login-copy h1 { color: #172033; }
html[data-theme="white"] .login-copy p { color: #64748b; }
html[data-theme="white"] .login-visual-foot { color: #94a3b8; }
html[data-theme="white"] .login-panel { background: transparent; }
html[data-theme="white"] .login-card-head p { color: #64748b; }
html[data-theme="white"] .login-card-head h2 { color: #172033; }
html[data-theme="white"] .login-meta { color: #94a3b8; border-top-color: #eef2f7; }
html[data-theme="white"] .login-role-note { background: #f1f5fb; color: #475569; border-color: #e2e8f0; }
html[data-theme="white"] .login-panel-foot { color: #94a3b8; }
html[data-theme="white"] .login-register-link { border-top-color: #eef2f7; }
html[data-theme="white"] .admin-theme-dots { background: #f8fafc; }
.admin-flash-info {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.16);
    color: var(--text-soft);
}
html[data-theme="white"] .admin-shell {
    background: rgba(255, 255, 255, 0.55);
}
html[data-theme="white"] .login-body {
    background: var(--bg);
}

html[data-theme="pink"] .login-body,
html[data-theme="blue"] .login-body {
    background: var(--bg);
}
/* 客户端自定义图标 */
.brand-icon-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 8px;
}
.brand-icon-preview {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(135deg, var(--accent), #6d5dfc);
    color: #fff;
    font-weight: 800;
    font-size: 25px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.brand-icon-preview img { width: 100%; height: 100%; object-fit: cover; }
.brand-icon-inputs { min-width: 0; flex: 1; }
.brand-icon-inputs input[type=file],
.brand-icon-url {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: var(--panel-2);
    color: var(--text);
    font-size: 10px;
    outline: none;
}
.brand-icon-url:focus { border-color: var(--accent); }
html[data-theme="white"] .brand-icon-url {
    background: #f8fafc;
    border-color: #dbe3ee;
    color: #334155;
}
.group-rename-toggle {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font-size: 9px;
    cursor: pointer;
}
.group-rename-toggle:hover { text-decoration: underline; }