:root {
    /* 略降奶油感，偏中性纸色，减少「模板仪表盘」味道 */
    --bg: #f2f1ed;
    --ink: #1a1a1a;
    --muted: #5c6169;
    --line: rgba(26, 26, 26, 0.1);
    --card: #fbfbf8;
    --sidebar: #161616;
    --sidebar-ink: #f3f1ea;
    --sidebar-muted: rgba(243, 241, 234, 0.58);
    --sidebar-line: rgba(243, 241, 234, 0.1);
    --yellow: #e6b800;
    --accent: #1a1a1a;
    --accent-2: #000000;
    --danger: #ba1a1a;
    --warn: #b45309;
    --ok: #047857;
    --info: #3a3a3a;
    --hover: #ebeae4;
    --active: #e6b800;
    --radius: 10px;
    --radius-sm: 8px;
    --shadow-card: 0 1px 0 rgba(26, 26, 26, 0.04);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font: 14px/1.6 Inter, "Noto Sans SC", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, .brand, .topbar h1, .summary strong, .login-card h1, .form-card h1 {
    font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
    letter-spacing: -0.02em;
}

a { color: var(--ink); }

h1, h2, p { margin-top: 0; }

code {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.92em;
}

.simple-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 20px;
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(900px 420px at 50% -8%, rgba(245, 196, 0, 0.18), transparent 62%),
        var(--bg);
}

.login-card,
.form-card,
.status-card,
.empty,
.table-wrap {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.login-card,
.form-card {
    width: min(400px, 100%);
    padding: 28px 28px 24px;
    border-top: 3px solid var(--yellow);
}

.login-card h1,
.form-card h1 { margin-bottom: 8px; font-size: 20px; font-weight: 600; }

.login-lead,
.hint,
.field-help,
.muted,
.system-line,
.remark {
    color: var(--muted);
}

.brand-kicker {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
}

.login-lead { margin-bottom: 18px; }

label {
    display: block;
    margin: 14px 0 6px;
    font-size: 13px;
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font: inherit;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(245, 196, 0, 0.45);
    border-color: var(--ink);
}

.check-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
    font-weight: 500;
}

.check-line input { width: auto; }

.btn, button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font: inherit;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover { background: var(--hover); }

.btn.btn-primary,
button.btn.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #f6f3ea;
}

.btn.btn-primary:hover,
button.btn.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }

.btn.btn-yellow,
button.btn.btn-yellow {
    background: var(--yellow);
    border-color: var(--yellow);
    color: #121212;
}

.btn.btn-yellow:hover,
button.btn.btn-yellow:hover { background: #ffd84a; border-color: #ffd84a; }

.btn.btn-danger,
button.btn.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn.btn-danger:hover,
button.btn.btn-danger:hover { background: #74241b; }

.btn.btn-danger-line,
button.btn.btn-danger-line { color: var(--danger); }

.btn.btn-danger-line:hover,
button.btn.btn-danger-line:hover { border-color: var(--danger); background: #ffdad6; }

.login-card .btn { width: 100%; margin-top: 8px; }

.form-actions, .toolbar, .pager, .summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.form-actions { margin-top: 18px; }

.field-help { margin: 6px 0 0; font-size: 13px; }

.alert {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #fff;
}

.alert-success { color: var(--ok); border-color: #b7d4c2; }
.alert-danger { color: var(--danger); border-color: #e4c4bf; }
.alert-warning { color: var(--warn); border-color: #e4d3b0; }
.alert-info { color: var(--info); border-color: #c5d4e6; }

.alert-close {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    padding: 16px 8px 12px 10px;
    background: var(--sidebar);
    border-right: 1px solid var(--sidebar-line);
    color: var(--sidebar-ink);
}

/* 客户 Team 面板：同系黑黄，侧栏偏暖绿点缀，与管理台区分 */
.sidebar--team {
    background:
        linear-gradient(165deg, rgba(200, 240, 106, 0.07), transparent 42%),
        #14160f;
    border-right-color: rgba(200, 240, 106, 0.18);
}

.sidebar--team .brand .mark {
    border-radius: 999px;
    background: #c8f06a;
    color: #12140c;
}

.sidebar--team .side-tagline {
    flex: 0 0 auto;
    margin: -4px 10px 12px;
    color: rgba(232, 240, 210, 0.55);
    font-size: 12px;
    line-height: 1.4;
}

.sidebar--team .side-group__label {
    color: rgba(200, 240, 106, 0.45);
    letter-spacing: 0.08em;
}

.sidebar--team .side-nav a {
    border-radius: 999px;
    padding: 8px 14px;
    line-height: 20px;
}

.sidebar--team .side-nav a:hover {
    background: rgba(200, 240, 106, 0.08);
    color: #f4f7ea;
}

.sidebar--team .side-nav a.active {
    background: rgba(200, 240, 106, 0.14);
    color: #f4f7ea;
    box-shadow: inset 3px 0 0 #c8f06a;
}

.sidebar--team .side-foot-card {
    border-radius: 14px;
    border-color: rgba(200, 240, 106, 0.16);
    background: rgba(200, 240, 106, 0.05);
}

.sidebar--team .side-foot-card:hover,
.sidebar--team .side-foot-card.is-active {
    border-color: rgba(200, 240, 106, 0.35);
    background: rgba(200, 240, 106, 0.1);
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
    margin: 0 6px 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--sidebar-line);
    color: var(--sidebar-ink);
    font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand .mark {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--yellow);
    color: #121212;
    display: grid;
    place-items: center;
    font-size: 10px;
    letter-spacing: 0;
    font-weight: 700;
}

.side-nav {
    display: grid;
    gap: 14px;
    align-content: start;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2px 6px 10px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 196, 0, 0.35) transparent;
}

.side-nav::-webkit-scrollbar {
    width: 5px;
}

.side-nav::-webkit-scrollbar-track {
    background: transparent;
}

.side-nav::-webkit-scrollbar-thumb {
    background: rgba(245, 196, 0, 0.28);
    border-radius: 99px;
}

.side-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 196, 0, 0.5);
}

.sidebar--team .side-nav {
    scrollbar-color: rgba(200, 240, 106, 0.4) transparent;
}

.sidebar--team .side-nav::-webkit-scrollbar-thumb {
    background: rgba(200, 240, 106, 0.32);
}

.sidebar--team .side-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 240, 106, 0.55);
}

.side-group {
    display: grid;
    gap: 2px;
    align-content: start;
    align-items: stretch;
}

.side-group__label {
    padding: 2px 10px 5px;
    color: rgba(255, 255, 255, 0.34);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
}

.side-nav a {
    display: block;
    box-sizing: border-box;
    position: relative;
    min-height: 34px;
    padding: 7px 12px;
    line-height: 20px;
    border-radius: 6px;
    color: var(--sidebar-muted);
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}

.side-nav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--sidebar-ink); }
.side-nav a.active {
    background: rgba(230, 184, 0, 0.16);
    color: #fff8e0;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--yellow);
}

.i18n-block {
    display: grid;
    gap: 8px;
    margin: 8px 0 4px;
    padding: 12px;
    border: 1px solid var(--line, #e6e6e6);
    border-radius: var(--radius-sm, 8px);
    background: rgba(0, 0, 0, 0.02);
}

.i18n-block__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    margin-bottom: 4px;
}

.i18n-tabs {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid var(--line, #e6e6e6);
    border-radius: var(--radius-sm, 8px);
    background: rgba(0, 0, 0, 0.02);
}

.i18n-tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.i18n-tabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line, #e6e6e6);
    border-radius: 999px;
    background: var(--card, #fff);
    color: var(--muted, #666);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.i18n-tabs__tab:hover {
    border-color: rgba(18, 18, 18, 0.28);
    color: var(--ink, #121212);
}

.i18n-tabs__tab.is-active {
    border-color: #121212;
    background: var(--yellow, #f5c400);
    color: #121212;
}

.i18n-tabs__code {
    opacity: 0.55;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.i18n-tabs__tab.is-active .i18n-tabs__code { opacity: 0.75; }

.i18n-tabs__hint { margin: 0 0 12px; }

.i18n-tabs__panel { display: none; }
.i18n-tabs__panel.is-active { display: grid; gap: 8px; }

.contact-link-url-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 8px;
    align-items: center;
}

.contact-link-url-row input { margin: 0; }

.contact-link-url-row .btn,
.contact-link-labels + .btn {
    min-height: 36px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

.contact-labels-title { margin-top: 8px; }

.contact-link-labels {
    display: grid;
    gap: 8px;
}

.contact-link-labels input { margin: 0; }

.input-with-prefix {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.input-with-prefix .input-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line, #e6e6e6);
    border-right: 0;
    border-radius: var(--radius-sm, 8px) 0 0 var(--radius-sm, 8px);
    background: rgba(0, 0, 0, 0.04);
    color: var(--muted, #666);
    font-weight: 600;
}

.input-with-prefix input {
    border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0;
    flex: 1;
}

.form-section-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
}
.nav-badge {
    display: inline-block;
    min-width: 18px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--warn);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    vertical-align: 1px;
}

.side-foot {
    display: grid;
    gap: 10px;
    flex: 0 0 auto;
    margin-top: 0;
    padding: 12px 4px 2px;
    border-top: 1px solid var(--sidebar-line);
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.18) 28%);
}

.side-foot-lang {
    padding: 0 2px 2px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 12px;
}

.lang-switch__item {
    color: var(--sidebar-muted);
    font-weight: 600;
    text-decoration: none;
}

.lang-switch__item:hover,
.lang-switch__item.is-active {
    color: var(--yellow);
}

.workspace .lang-switch__item,
.login-screen .lang-switch__item {
    color: var(--muted);
}

.workspace .lang-switch__item:hover,
.workspace .lang-switch__item.is-active,
.login-screen .lang-switch__item:hover,
.login-screen .lang-switch__item.is-active {
    color: var(--ink);
}

.lang-switch__sep { color: rgba(246, 243, 234, 0.35); }
.workspace .lang-switch__sep,
.login-screen .lang-switch__sep { color: #b0b0a8; }

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.login-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.login-card__top .brand-kicker { margin: 0; }

.side-foot-card {
    display: grid;
    gap: 2px;
    padding: 9px 10px 10px;
    border: 1px solid var(--sidebar-line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--sidebar-ink);
    text-decoration: none;
}

.side-foot-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(243, 240, 232, 0.2);
}

.side-foot-card--support {
    border-color: var(--sidebar-line);
}

.side-foot-card.is-active {
    background: rgba(230, 184, 0, 0.14);
    border-color: rgba(230, 184, 0, 0.35);
    color: #fff8e0;
}

.side-foot-card.is-active .side-foot-card__desc {
    color: rgba(255, 248, 224, 0.65);
}

.side-foot-card__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.side-foot-card__desc {
    color: var(--sidebar-muted);
    font-size: 11px;
    line-height: 1.4;
}

.contact-page .hint { margin-bottom: 16px; max-width: 52em; }

.contact-form { width: min(720px, 100%); }

.contact-links-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.contact-links-head label { margin: 0; }

.contact-links {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

.contact-link-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line, #e6e6e6);
    border-radius: var(--radius-sm, 8px);
    background: rgba(0, 0, 0, 0.02);
}

.contact-link-card__url {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 8px;
    align-items: center;
}

.contact-link-card__url input,
.contact-link-card__labels input {
    margin: 0;
}

.contact-link-card__labels {
    display: grid;
    gap: 8px;
}

.contact-link-card .btn {
    min-height: 36px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

.contact-link-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(180px, 1.4fr) 36px;
    gap: 8px;
    align-items: center;
}

.contact-link-row input { margin: 0; }

.contact-link-row .btn {
    min-height: 36px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

.contact-view__lead {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.6;
}

.contact-view__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.contact-view__list a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--yellow);
    color: #121212;
    font-weight: 600;
    text-decoration: none;
}

.contact-view__list a:hover { background: #ffd84a; }

@media (max-width: 680px) {
    .contact-link-row { grid-template-columns: 1fr; }
    .contact-link-row .btn { width: 36px; }
    .contact-link-card__url { grid-template-columns: minmax(0, 1fr) 36px; }
}

.workspace { min-width: 0; background: var(--bg); }
.workspace-body { min-width: 0; padding: 16px 24px 40px; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 16px 24px;
    background: rgba(243, 240, 232, 0.86);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar h1 { margin: 0; font-size: 18px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

.user-menu { position: relative; flex: 0 0 auto; }
.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 4px 4px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.user-menu-trigger::-webkit-details-marker { display: none; }
.user-menu-trigger:hover,
.user-menu[open] .user-menu-trigger { border-color: var(--line); background: var(--bg); }
.user-menu-trigger:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--yellow);
    color: #121212;
    font-size: 14px;
    font-weight: 600;
}
.user-meta { display: grid; line-height: 1.25; text-align: left; }
.user-meta strong { max-width: 160px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { color: var(--muted); font-size: 11px; }
.user-caret {
    width: 7px;
    height: 7px;
    margin: -3px 2px 0 2px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: rotate(45deg);
    transition: transform .15s ease;
}
.user-menu[open] .user-caret { margin-top: 3px; transform: rotate(-135deg); }
.user-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    min-width: 200px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 28px rgba(26, 26, 26, .12);
}
.user-menu-head {
    display: grid;
    gap: 1px;
    margin-bottom: 6px;
    padding: 6px 10px 10px;
    border-bottom: 1px solid var(--line);
}
.user-menu-head strong { font-size: 13px; overflow-wrap: anywhere; }
.user-menu-head span { color: var(--muted); font-size: 12px; }
.user-menu-panel a {
    display: grid;
    gap: 1px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: 13px;
    text-decoration: none;
}
.user-menu-panel a small { color: var(--muted); font-size: 11px; }
.user-menu-panel a:hover, .user-menu-panel a:focus-visible { background: var(--hover); outline: none; }
.user-menu-panel a.active { font-weight: 600; }
.user-menu-panel a.is-danger { color: var(--danger); }
.user-menu-panel a.is-danger:hover { background: #ffdad6; }
.topbar-back {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px 0 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}
.topbar-back::before { content: "\2190"; font-size: 14px; line-height: 1; }
.topbar-back:hover { border-color: var(--ink); color: var(--ink); }

.refresh-strip {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 24px 10px;
    overflow: hidden;
    background: #f8f0d4;
    border-bottom: 1px solid rgba(245, 196, 0, 0.45);
    color: var(--ink);
    font-size: 13px;
}
.refresh-strip[hidden] { display: none; }
.refresh-strip-icon {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: refresh-spin 0.8s linear infinite;
}
.refresh-strip-text { flex: 0 0 auto; font-weight: 600; }
.refresh-strip-names {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.refresh-strip-names:empty { display: none; }
.refresh-strip-bar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    overflow: hidden;
    background: rgba(245, 196, 0, 0.2);
}
.refresh-strip-bar::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -40%;
    width: 40%;
    background: var(--yellow);
    animation: refresh-slide 1.3s ease-in-out infinite;
}
.refresh-strip-action {
    margin-left: auto;
    padding: 3px 10px;
    border: 1px solid currentColor;
    border-radius: var(--radius-sm);
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.refresh-strip.is-done { background: #edf6f0; border-color: #c3dccb; color: var(--ok); }
.refresh-strip.is-error { background: #fbf4e8; border-color: #e7d4b2; color: var(--warn); }
.refresh-strip.is-done .refresh-strip-icon,
.refresh-strip.is-error .refresh-strip-icon {
    width: auto;
    height: auto;
    border: 0;
    animation: none;
    line-height: 1;
}
.refresh-strip.is-done .refresh-strip-icon::before { content: "\2713"; }
.refresh-strip.is-error .refresh-strip-icon::before { content: "!"; font-weight: 700; }
.refresh-strip.is-done .refresh-strip-bar,
.refresh-strip.is-error .refresh-strip-bar { display: none; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
@keyframes refresh-slide { to { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
    .refresh-strip-icon { animation-duration: 2.4s; }
    .refresh-strip-bar::before { left: 0; width: 100%; opacity: 0.5; animation: none; }
}

/* —— 控制台仪表盘：指标砖与报表风格 —— */
.dash-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px 20px;
    margin: 0 0 16px;
    padding: 14px 16px 13px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.dash-hero--team {
    background: var(--card);
    border-color: var(--line);
}

.dash-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
}

.dash-kicker::before {
    content: "";
    width: 12px;
    height: 2px;
    background: var(--ink);
    opacity: 0.35;
}

.dash-hero--team .dash-kicker::before { background: #6a7a3a; opacity: 0.55; }

.dash-hero h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 650;
}

.dash-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.metric-grid--inline {
    margin-bottom: 12px;
}

.metric-tile {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "icon label"
        "value value";
    gap: 4px 8px;
    align-items: center;
    padding: 12px 14px 11px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--line);
    box-shadow: none;
}

.metric-tile__icon {
    grid-area: icon;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--muted);
    opacity: 0.55;
}

.metric-tile--servers { border-left-color: var(--yellow); }
.metric-tile--servers .metric-tile__icon { background: var(--yellow); }

.metric-tile--online { border-left-color: var(--ok); }
.metric-tile--online .metric-tile__icon { background: var(--ok); }

.metric-tile--offline { border-left-color: var(--danger); }
.metric-tile--offline .metric-tile__icon { background: var(--danger); }

.metric-tile--sites { border-left-color: #121212; }
.metric-tile--sites .metric-tile__icon { background: #121212; }

.metric-tile--pending { border-left-color: var(--warn); }
.metric-tile--pending .metric-tile__icon { background: var(--warn); }

.metric-tile--apps { border-left-color: var(--yellow); }
.metric-tile--apps .metric-tile__icon { background: var(--yellow); }

.metric-tile--clients { border-left-color: #121212; }
.metric-tile--clients .metric-tile__icon { background: #3a3a3a; }

.metric-tile--nodes { border-left-color: #c8f06a; }
.metric-tile--nodes .metric-tile__icon { background: #c8f06a; }

.metric-tile--customers { border-left-color: var(--yellow); }
.metric-tile--customers .metric-tile__icon { background: var(--yellow); }

.metric-tile--devices { border-left-color: #121212; }
.metric-tile--devices .metric-tile__icon { background: #121212; }

.metric-tile__label {
    grid-area: label;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.metric-tile__value {
    grid-area: value;
    font-size: 20px;
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.panel-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 15px;
    font-weight: 650;
}

.panel-title::before {
    content: "";
    width: 3px;
    height: 14px;
    border-radius: 1px;
    background: var(--ink);
    opacity: 0.55;
}

.panel-title--alerts::before { background: var(--warn); }
.panel-title--apps::before { background: #121212; }
.panel-title--nodes::before { background: #c8f06a; }
.panel-title--devices::before { background: #121212; }

.toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.table-wrap--report {
    border-top: 1px solid var(--line);
}

.report-table tbody tr.tone-down td:first-child,
.report-table tbody tr.tone-warn td:first-child {
    box-shadow: inset 3px 0 0 var(--danger);
}

.report-table tbody tr.tone-warn td:first-child {
    box-shadow: inset 3px 0 0 var(--warn);
}

.report-meta { margin-top: 4px; }

.empty--soft {
    padding: 36px 24px;
    text-align: center;
    background: var(--card);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.empty__mark {
    width: 36px;
    height: 36px;
    margin: 0 auto 14px;
    border-radius: 10px;
    background: rgba(245, 196, 0, 0.2);
    border: 1px solid rgba(18, 18, 18, 0.12);
    box-shadow: inset 0 0 0 6px var(--card), inset 0 0 0 9px var(--yellow);
}

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

@media (max-width: 560px) {
    .metric-grid { grid-template-columns: 1fr; }
}

.summary {
    margin-bottom: 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.summary div {
    min-width: 88px;
    padding: 10px 16px;
    background: transparent;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
}

.summary .btn { margin-left: auto; margin-right: 10px; }

.summary span { display: block; color: var(--muted); font-size: 12px; }
.summary strong { font-size: 20px; font-weight: 600; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
}

.status-card {
    padding: 13px 14px 12px;
    background: #fff;
    border-color: rgba(26, 26, 26, 0.1);
}
.status-card h2 { margin: 0; font-size: 15px; font-weight: 650; }
.status-card.is-offline { border-color: #e4c4bf; background: #fffaf9; }

.status-head, .toolbar { justify-content: space-between; }
.status-head { display: flex; gap: 12px; align-items: center; }
.status-tools { display: flex; align-items: center; gap: 10px; }

.customer-name {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 12px;
}

.panel-url, .net, .system-line { margin-bottom: 8px; word-break: break-all; }
.panel-url { font-size: 13px; color: var(--muted); }

.pill {
    display: inline-flex;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
}

.pill-ok { color: var(--ok); border-color: #b7d4c2; }
.pill-down { color: var(--danger); border-color: #e4c4bf; }

.rings {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 6px 0 12px;
}
.ring { --ring: #b5b5b0; min-width: 0; text-align: center; }
.ring-ok { --ring: var(--ok); }
.ring-warn { --ring: var(--warn); }
.ring-danger { --ring: var(--danger); }
.ring-chart {
    position: relative;
    width: 84px;
    height: 84px;
    margin: 0 auto 6px;
}
.ring-chart svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-chart circle { fill: none; stroke-width: 6; }
.ring-track { stroke: var(--hover); }
.ring-fill { stroke: var(--ring); transition: stroke-dasharray .4s ease; }
.ring-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.ring-value small { margin-left: 1px; color: var(--muted); font-size: 11px; font-weight: 500; }
.ring-warn .ring-value, .ring-danger .ring-value { color: var(--ring); }
.ring-none .ring-value { color: var(--muted); }
.ring-label { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.ring-sub { color: var(--muted); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin: 12px 0 4px;
}
.facts div { margin: 0; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 0; font-weight: 600; }

.status-error { color: var(--danger); }
.empty { padding: 28px; }
.empty h2 { font-size: 16px; }
.empty ol { padding-left: 18px; color: var(--muted); }

.toolbar { margin-bottom: 12px; }
.toolbar .hint { margin: 0; }

.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 0; border-collapse: collapse; }
th, td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}
td.clip { white-space: normal; word-break: break-all; }
th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    background: var(--bg);
}
.row-actions { white-space: nowrap; }
.row-actions form { display: inline; }
.row-actions a, .btn-link {
    margin-right: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.btn-link.danger, .row-actions a.danger { color: var(--danger); }
.path-cell { max-width: 280px; white-space: normal; word-break: break-all; color: var(--muted); font-size: 13px; }

.server-view { min-width: 0; }
.server-view .detail-card { padding: 16px 16px 14px; }
.server-view .detail-card .status-body {
    display: grid;
    grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
    align-items: center;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.server-view .detail-card .rings { gap: 8px 16px; margin: 0; padding-right: 28px; }
.server-view .detail-card .ring-chart { width: 96px; height: 96px; }
.server-view .detail-card .ring-value { font-size: 19px; }
.server-view .detail-card .status-info {
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 28px;
    border-left: 1px solid var(--line);
}
.server-view .detail-card .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 20px;
    margin: 0;
}
.server-view .detail-card .facts dd { overflow-wrap: anywhere; }
.server-view .detail-card .facts .fact-wide { grid-column: span 2; }
.server-view .detail-card .facts .fact-wide dd { font-weight: 500; }
.server-view .detail-card .status-tools { gap: 6px; }
.server-view .detail-card .status-tools .pill { margin-right: 4px; }
@media (max-width: 1100px) {
    .server-view .detail-card .status-body { grid-template-columns: minmax(0, 1fr); }
    .server-view .detail-card .rings { max-width: 440px; padding: 0 0 16px; }
    .server-view .detail-card .status-info {
        padding: 16px 0 0;
        border-left: 0;
        border-top: 1px solid var(--line);
    }
    .server-view .detail-card .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.server-view .site-panel {
    min-width: 0;
    margin-top: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.server-view .site-panel .toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px 12px 0;
}
.server-view .site-panel .table-wrap {
    border: 0;
    background: transparent;
}
.server-view .site-panel .hint,
.server-view .site-panel .pager { margin: 0 12px 12px; }
.server-view .site-panel .site-sync { margin: 8px 12px 0; }
.server-view table.compact,
.server-view table.with-path { min-width: 0; }
.server-view .path-cell {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
}
.site-name { font-weight: 600; margin-right: 6px; }
.hidden-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 12px;
    line-height: 18px;
    vertical-align: 1px;
}
.site-table tr.site-hidden .site-name,
.site-table tr.site-hidden .domain-chip { opacity: 0.6; }
.domain-list { margin: 8px 0 16px; padding-left: 18px; }
.domain-list li { padding: 4px 0; word-break: break-all; }

.site-table td.site-cell { min-width: 220px; max-width: 420px; white-space: normal; }
.domain-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.domain-chip {
    display: inline-block;
    max-width: 240px;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--info);
    font-size: 12px;
    line-height: 20px;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.domain-chip:hover { border-color: var(--info); background: #fff; }

.modal {
    width: min(420px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.modal::backdrop { background: rgba(26, 26, 26, 0.32); }
.modal-body { padding: 16px 18px 18px; }
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.modal-close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.modal-close:hover { border-color: var(--line); color: var(--ink); }
.modal-facts { display: grid; gap: 8px; margin: 14px 0 16px; }
.modal-facts div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
.modal-facts div[hidden] { display: none; }
.modal-facts dt { color: var(--muted); font-size: 13px; }
.modal-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions form { display: inline-flex; margin: 0; }
.modal-actions form[hidden] { display: none; }
.domain-chip.more { color: var(--muted); }
.domain-note { margin-top: 4px; color: var(--muted); font-size: 12px; }

.site-table th.actions-head { text-align: right; }
.site-table td.site-actions-cell { width: 1%; text-align: right; }
.site-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.site-actions form { display: inline; margin: 0; }
.act-group { display: inline-flex; }
.act-group .act-btn + .act-btn { margin-left: -1px; }
.act-group .act-btn:first-child:not(:last-child) { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.act-group .act-btn:last-child:not(:first-child) { border-radius: 0 2px 2px 0; }
.act-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 26px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}
.act-btn:hover { position: relative; z-index: 1; background: var(--hover); border-color: var(--line); }
.act-btn.ok { color: var(--ok); }
.act-btn.ok:hover { border-color: #8fbfa0; }
.act-btn.warn { color: var(--warn); }
.act-btn.warn:hover { border-color: #d6bd8a; }
.act-btn.danger { color: var(--danger); }
.act-btn.danger:hover { border-color: #d4a39c; }
.act-btn.is-dim { opacity: .45; }
.site-power .act-btn { min-width: 40px; }
.act-btn.primary { background: var(--accent); border-color: var(--accent); color: #f6f3ea; font-weight: 600; }
.act-btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }

.site-panel { margin-top: 16px; }
.site-panel h2 { margin: 0; font-size: 15px; font-weight: 600; }
.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-left: auto;
}
.search-form input {
    flex: 1 1 160px;
    width: 180px;
    min-width: 0;
}
.search-form .btn {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
}
.pager { margin-top: 12px; }

.error-box { padding: 12px 0; }

.pill-warn { color: var(--warn); border-color: #e4d3b0; margin-left: 4px; }
.cache-time { margin: 6px 0 8px; color: var(--muted); font-size: 12px; }
.cache-time span { margin-left: 4px; }
.card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.card-actions-side { display: flex; flex-wrap: wrap; gap: 6px; }
.card-actions form, .status-tools form { display: inline-flex; margin: 0; }
.card-actions .act-btn, .status-tools .act-btn { height: 28px; padding: 0 12px; }
.panel-section .summary { margin-bottom: 8px; }
.small { font-size: 12px; }
.form-card.form-wide { width: min(560px, 100%); }
.summary .summary-action { margin-left: auto; }
.summary .summary-action .btn { margin: 0 0 0 10px; }
.summary .summary-action + .btn { margin-left: 10px; }

.panel-section { margin-bottom: 16px; }

.doc-card {
    margin: -4px 0 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.doc-card summary {
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
}
.doc-card[open] summary { border-bottom: 1px solid var(--line); }
.doc-body { padding: 12px 14px 4px; }
.doc-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 8px 28px;
}
.doc-body h3 { margin: 0 0 6px; font-size: 14px; }
.doc-body ol { margin: 0 0 12px; padding-left: 20px; }
.doc-body li { margin-bottom: 4px; }
.panel-section h2 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.panel-section .toolbar h2 { margin: 0; }
.panel-section > .hint { margin-bottom: 8px; }
.api-urls {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 6px 12px;
    margin: 0;
    padding: 12px 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.api-urls dt { color: var(--muted); font-size: 13px; }
.api-urls dd { margin: 0; word-break: break-all; }
td.notes-cell { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.filter-tabs { display: inline-flex; flex-wrap: wrap; }
.filter-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}
.filter-tabs a + a { margin-left: -1px; }
.filter-tabs a:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.filter-tabs a:last-child { border-radius: 0 2px 2px 0; }
.filter-tabs a span { color: var(--muted); font-size: 12px; }
.filter-tabs a.active { position: relative; z-index: 1; border-color: var(--ink); color: var(--ink); font-weight: 600; }
.filter-tabs a:hover { color: var(--ink); }
.device-code { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: .5px; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

.device-table th { padding: 10px 8px; white-space: nowrap; }
.device-table th:first-child, .device-table td:first-child { padding-left: 14px; }
.device-table th:last-child, .device-table td:last-child { padding-right: 14px; }
.device-table td {
    padding: 12px 8px;
    vertical-align: top;
    line-height: 1.45;
    white-space: normal;
    transition: background-color .15s ease;
}
.device-table tbody tr:last-child td { border-bottom: 0; }
.device-table tbody tr:hover td { background: var(--bg); }
.device-table tbody tr.is-disabled td { background: #fdf9f8; }
.device-table tbody tr.is-disabled:hover td { background: #faf3f1; }
.device-table tbody tr.is-disabled td:first-child { box-shadow: inset 3px 0 0 #e4c4bf; }
.device-table tbody tr.is-pending td:first-child { box-shadow: inset 3px 0 0 #e4d3b0; }

.device-table .main-line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 22px;
}
.device-table .sub { margin-top: 2px; color: var(--muted); font-size: 12px; }
.device-table .sep { margin: 0 6px; color: #bdbdb8; }
.device-table .clip-line {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.device-table .pill-warn { margin-left: 0; }

.device-stats {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 12px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.device-stats .stat {
    position: relative;
    display: block;
    padding: 10px 14px 9px;
    background: var(--card);
    color: var(--ink);
    text-decoration: none;
}
.device-stats .stat span { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; }
.device-stats .stat strong { display: block; font-size: 22px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.device-stats a.stat { transition: background-color .15s ease; }
.device-stats a.stat:hover { background: var(--bg); }
.device-stats a.stat span::after { content: " \203A"; color: #bdbdb8; }
.device-stats .stat.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--yellow);
}
.device-stats .tone-ok strong { color: var(--ok); }
.device-stats .tone-warn strong { color: var(--warn); }
.device-stats .tone-down strong { color: var(--danger); }
.device-stats .tone-info strong { color: var(--ink); }
.device-stats + .doc-card { margin-top: 0; }

.device-toolbar { flex-wrap: wrap; gap: 8px; }
.device-toolbar .search-form { margin-left: auto; }
.device-toolbar .search-form input { width: 200px; }

.group-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 10px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.group-filter-label {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
}
.group-filter-tabs {
    flex: 1 1 240px;
    min-width: 0;
}
.group-filter-tabs a {
    max-width: 12em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.group-filter-manage {
    margin-left: auto;
    color: var(--info);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}
.group-filter-manage:hover { text-decoration: underline; }

.batch-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.batch-bar.has-selection {
    position: sticky;
    top: 0;
    z-index: 15;
    border-color: var(--yellow);
    box-shadow: 0 4px 12px rgba(18, 18, 18, .08);
}
.batch-select { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.batch-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.batch-check input, .row-check { width: 15px; height: 15px; margin: 0; padding: 0; accent-color: var(--yellow); cursor: pointer; }
.batch-count { color: var(--muted); font-size: 13px; }
.batch-count.is-selected { color: var(--ink); font-weight: 600; }
.batch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.batch-move { display: inline-flex; align-items: center; gap: 6px; }
.batch-move select { width: 140px; min-height: 30px; padding: 4px 8px; font-size: 13px; }
.batch-move input { width: 130px; min-height: 30px; padding: 4px 8px; font-size: 13px; }
.batch-actions .btn { min-height: 30px; padding: 0 10px; font-size: 13px; }
.batch-actions .btn:disabled { opacity: .45; cursor: not-allowed; background: #fff; }
.batch-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line); }

.device-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 10px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.pager-info { color: var(--ink); font-size: 13px; }
.pager-info .muted { margin-left: 4px; font-size: 12px; }
.pager-links { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}
.pager-num { padding: 0 6px; font-variant-numeric: tabular-nums; }
a.pager-btn:hover { background: var(--hover); border-color: var(--line); }
.pager-btn.is-current { background: var(--accent); border-color: var(--accent); color: #f6f3ea; font-weight: 600; }
.pager-btn.is-disabled { background: var(--sidebar); color: #b0b0ab; cursor: not-allowed; }
.pager-gap { padding: 0 2px; color: var(--muted); }

.form-card.batch-confirm { width: min(860px, 100%); }
.batch-confirm .force-list td { white-space: nowrap; }
.batch-confirm tr.muted td { color: var(--muted); }

.device-table tbody tr.is-selected td,
.device-table tbody tr.is-selected:hover td { background: #f1f5fa; }
.device-head .row-check { flex: 0 0 auto; }
.group-chip {
    display: inline-block;
    max-width: 170px;
    margin-top: 6px;
    padding: 0 7px;
    overflow: hidden;
    border-radius: 9px;
    background: #e8eef6;
    color: var(--info);
    font-size: 12px;
    line-height: 18px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
.group-chip:hover { background: #dbe5f1; }

.group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.group-head-text { flex: 1 1 360px; margin: 0; color: var(--muted); }
.group-head-text strong { color: var(--ink); }
.group-table td { vertical-align: middle; }
.group-table th.num, .group-table td.num { width: 1%; text-align: right; white-space: nowrap; }
.group-table th.actions-head { text-align: right; }
.group-table td.site-actions-cell { width: 1%; text-align: right; white-space: nowrap; }
.group-table .group-name { font-weight: 600; text-decoration: none; }
.group-table .group-name:hover { color: var(--info); text-decoration: underline; }
.group-table .sub { max-width: 320px; margin-top: 2px; color: var(--muted); font-size: 12px; white-space: normal; }
.group-table .beat { display: inline-flex; align-items: center; gap: 6px; }
.group-status { display: flex; flex-wrap: wrap; gap: 4px; }
.group-status .pill { margin-left: 0; }
.group-table tr.is-ungrouped td { background: var(--bg); }
.group-table tr.is-ungrouped .group-name { color: var(--muted); }

.device-table .col-device { min-width: 156px; }
.device-head { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.device-head .device-code { font-size: 14px; }
.device-table .device-remark { max-width: 160px; margin-top: 6px; overflow-wrap: anywhere; }
.clamp-2,
.device-table .clamp-2,
.group-table .clamp-2 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.device-table .col-node { min-width: 148px; }
.device-table .col-node .main-line { max-width: 200px; }
.device-table .col-node .main-line .clip-line { flex: 0 1 auto; font-weight: 500; }
.device-table .col-node .main-line .pill { flex: 0 0 auto; }
.device-table .col-node .sub.clip-line { max-width: 200px; }
.device-table .col-node .node-line { margin-top: 6px; }
.service-id-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}
.service-id-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.service-id-value {
    color: var(--ink);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
}
a.service-id-link {
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
a.service-id-link:hover {
    color: var(--info);
    border-bottom-color: currentColor;
}
.service-id-value.is-missing,
.service-id-block.is-empty .service-id-value {
    color: #b0aea6;
    font-size: 22px;
    font-weight: 600;
}
.service-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    margin-top: 6px;
    padding: 1px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #f7f7f4;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}
.service-chip strong { color: var(--ink); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; }
.service-chip.is-empty { border-style: dashed; background: transparent; }

.device-table .device-model { max-width: 170px; margin-top: 6px; font-weight: 500; }
.device-table .col-device .sub.mono { white-space: nowrap; }

.device-table .col-phone { min-width: 130px; }
.device-table .col-phone strong.mono { font-size: 14px; letter-spacing: .2px; }
.sim-lines { margin-top: 4px; color: var(--muted); font-size: 12px; }
.sim-lines .sim-label { margin-right: 6px; }
.cell-link {
    display: inline-block;
    margin-top: 6px;
    color: var(--info);
    font-size: 12px;
    text-decoration: none;
}
.cell-link::after { content: " \203A"; }
.cell-link:hover { text-decoration: underline; }

.device-table .col-version { min-width: 150px; }
.update-lines { max-width: 160px; }
.update-lines .pill { white-space: normal; line-height: 18px; padding-top: 1px; padding-bottom: 1px; }
.update-lines > div { margin-top: 4px; }
.update-lines > .small { margin-top: 2px; }
.update-lines .wrap-text { white-space: normal; overflow-wrap: anywhere; }

.device-table .col-beat { min-width: 130px; }
.device-table .col-beat .sub { white-space: nowrap; }
.beat { color: var(--muted); font-weight: 500; }
.beat::before {
    content: "";
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c4c4bf;
}
.beat-ok { color: var(--ok); }
.beat-ok::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(29, 107, 58, .15); }
.beat-down { color: var(--danger); }
.beat-down::before { background: var(--danger); }
.device-table th.actions-head { text-align: right; }
.device-table td.site-actions-cell { width: 1%; text-align: right; white-space: nowrap; }
.row-acts { display: inline-flex; gap: 4px; }
.row-acts .act-btn { min-width: 0; padding: 0 8px; }

@media (max-width: 1279px) {
    .device-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .device-table, .device-table tbody { display: block; }
    .device-table thead { display: none; }
    .device-table tbody tr.device-row {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-areas:
            "device device device acts"
            "node phone version beat";
        gap: 12px 20px;
        padding: 14px 16px;
        border-bottom: 1px solid var(--line);
        transition: background-color .15s ease;
    }
    .device-table tbody tr.device-row:last-child { border-bottom: 0; }
    .device-table tbody tr.device-row:hover { background: var(--bg); }
    .device-table tbody tr.device-row.is-disabled { background: #fdf9f8; box-shadow: inset 3px 0 0 #e4c4bf; }
    .device-table tbody tr.device-row.is-pending { box-shadow: inset 3px 0 0 #e4d3b0; }
    .device-table tbody tr.device-row.is-selected { background: #f1f5fa; }
    .device-table tbody tr.device-row > td,
    .device-table tbody tr.device-row > td:first-child,
    .device-table tbody tr.device-row:hover > td {
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    .device-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--muted);
        font-size: 11px;
        letter-spacing: .5px;
    }
    .device-table tbody tr.device-row > td.col-device {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 2px 14px;
        grid-area: device;
        align-self: center;
    }
    .device-table td.col-device > * { margin-top: 0; }
    .device-table .device-model { max-width: 260px; }
    .device-table .device-remark { flex-basis: 100%; max-width: none; }
    .device-table td.col-node { grid-area: node; }
    .device-table td.col-phone { grid-area: phone; }
    .device-table td.col-version { grid-area: version; }
    .device-table td.col-beat { grid-area: beat; }
    .device-table tbody tr.device-row > td.site-actions-cell { grid-area: acts; align-self: start; width: auto; text-align: right; }
    .device-table .service-id-value { font-size: 26px; }
    .device-table .col-node .main-line,
    .device-table .col-node .sub.clip-line,
    .update-lines { max-width: none; }
    .device-table .col-beat .sub { white-space: normal; }
}

@media (max-width: 900px) {
    .device-table tbody tr.device-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "device device"
            "node phone"
            "version beat"
            "acts acts";
    }
    .device-table tbody tr.device-row > td.site-actions-cell { text-align: left; }
    .device-toolbar .search-form { flex: 1 1 260px; margin-left: 0; }
    .device-toolbar .search-form input { flex: 1; width: auto; min-width: 0; }
}

@media (max-width: 560px) {
    .device-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .device-table tbody tr.device-row {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "device" "node" "phone" "version" "beat" "acts";
    }
}
.device-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin: 0 0 16px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--line);
}
.device-facts div { margin: 0; min-width: 0; }
.device-facts dt { color: var(--muted); font-size: 12px; }
.device-facts dd { margin: 0; }
.device-facts dd.device-code { font-size: 18px; font-weight: 600; }
.device-facts dd.uid { word-break: break-all; }
.force-list { max-height: 280px; margin-bottom: 12px; overflow-y: auto; border: 1px solid var(--line); }

.form-section { margin: 22px 0 4px; font-size: 15px; font-weight: 600; }
.account-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin: 0;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--line);
}
.account-facts div { min-width: 0; }
.account-facts dt { color: var(--muted); font-size: 12px; }
.account-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.perm-list { margin-top: 10px; border: 1px solid var(--line); }
.perm-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    font-weight: 400;
    cursor: pointer;
}
.perm-item:last-child { border-bottom: 0; }
.perm-item input { width: auto; margin-top: 3px; }
.perm-item strong { display: block; font-weight: 600; }
.perm-table th.perm-cell, .perm-table td.perm-cell { width: 1%; text-align: center; white-space: nowrap; }
.perm-table td.perm-cell input { width: auto; }
.perm-table td.row-actions { width: 1%; text-align: right; }
.btn.btn-small, button.btn.btn-small { min-height: 28px; padding: 0 12px; font-size: 13px; }

@media (max-width: 680px) {
    .app-shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 2;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 12px;
        height: auto;
        overflow: visible;
        padding: 10px 12px;
        border-right: 0;
        border-bottom: 1px solid var(--sidebar-line);
    }
    .brand { margin: 0; }
    .side-tagline { display: none; }
    .side-nav {
        display: flex;
        flex: 1;
        gap: 8px;
        min-width: 0;
        min-height: 0;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
        scrollbar-width: thin;
        scrollbar-color: rgba(245, 196, 0, 0.35) transparent;
    }
    .side-group { display: flex; gap: 2px; align-items: center; }
    .side-group__label { display: none; }
    .side-nav a { white-space: nowrap; }
    .side-foot { display: none; }
    .user-meta, .user-caret { display: none; }
    .user-menu-trigger { padding: 2px; }
    .workspace-body, .topbar, .refresh-strip { padding-left: 16px; padding-right: 16px; }
    .refresh-strip { flex-wrap: wrap; }
    .refresh-strip-text { flex: 1 1 auto; }
    .refresh-strip-names { flex-basis: 100%; }
    .summary { align-items: stretch; }
    .summary .btn { margin: 8px; }
}

/* �Ƽ�� */
.monitor-toolbar { align-items: flex-start; }
.monitor-title { margin: 0 0 4px; font-size: 18px; }
.monitor-toolbar .hint.mb-0 { margin-bottom: 0; }
.monitor-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 14px;
}
.monitor-chart-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 14px 10px;
}
.monitor-chart-card header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    margin-bottom: 8px;
}
.monitor-chart-card h3 { margin: 0; font-size: 14px; }
.monitor-chart-card canvas { display: block; width: 100%; }
.monitor-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}
.monitor-legend .leg::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 3px;
    margin-right: 6px;
    vertical-align: middle;
    border-radius: 1px;
}
.leg-cpu::before, .leg-l1::before { background: #2f6fed; }
.leg-mem::before, .leg-l5::before { background: #1a9f6e; }
.leg-disk::before, .leg-l15::before { background: #c47a12; }
.monitor-table { max-height: 420px; overflow: auto; }
@media (max-width: 900px) {
    .monitor-charts { grid-template-columns: 1fr; }
}
