/* 全站设计令牌：深色基底、靛蓝交互色与语义状态色集中维护。 */
:root {

    color-scheme: dark;
    font-family: "Inter", "Geist Sans", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
    font-synthesis: none;
    --background-deep: #020203;
    --background-base: #050506;
    --background-elevated: #0a0a0c;
    --surface: rgba(255, 255, 255, .045);
    --surface-hover: rgba(255, 255, 255, .075);
    --foreground: #ededf0;
    --muted: #989ca8;
    --subtle: #a8abb6;
    --accent: #5e6ad2;
    --accent-bright: #6872d9;
    /* 按钮底色略深，确保小字号按钮在默认与悬停状态均满足 4.5:1 对比度。 */
    --button-accent: #5661bf;
    --button-hover: #5b65c4;
    --accent-text: #aeb6ff;
    --accent-glow: rgba(94, 106, 210, .3);
    --line: rgba(255, 255, 255, .075);
    --line-hover: rgba(255, 255, 255, .14);
    --success: #71d5a5;
    --warning: #e6bd60;
    --error: #f58b92;
    --radius: 16px;
    --control-radius: 8px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --ease: cubic-bezier(.16, 1, .3, 1);
    --shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 2px 20px rgba(0, 0, 0, .22), 0 12px 40px rgba(0, 0, 0, .16);
    --shadow-raised: inset 0 1px 0 rgba(255, 255, 255, .1), 0 8px 40px rgba(0, 0, 0, .4), 0 0 60px rgba(94, 106, 210, .08);
    color: var(--foreground);
    background: var(--background-base);
}
* {

    box-sizing: border-box;
}
body {

    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    min-width: 320px;
    isolation: isolate;
}
[hidden] {

    display: none !important;
}
::selection {

    background: rgba(94, 106, 210, .45);
    color: var(--foreground);
}
/* 固定装饰层不拦截点击；小屏减少模糊面积，避免长列表滚动负担。 */
.ambient {

    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 0, #11111d 0, var(--background-base) 55%, var(--background-deep) 100%);
}
.ambient::before, .ambient::after {

    content: "";
    position: absolute;
    inset: 0;
}
.ambient::before {

    background: url("/static/noise.svg");
    opacity: .025;
}
.ambient::after {

    background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent 85%);
}
.ambient-light {

    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: ambient-float 10s ease-in-out infinite;
}
.ambient-light:first-child {

    width: 1000px;
    height: 700px;
    left: 15%;
    top: -520px;
    background: rgba(94, 106, 210, .22);
}
.ambient-light:nth-child(2) {

    width: 600px;
    height: 700px;
    left: -400px;
    top: 28%;
    background: rgba(119, 74, 155, .12);
    animation-delay: -4s;
}
.ambient-light:nth-child(3) {

    width: 650px;
    height: 500px;
    right: -300px;
    bottom: -250px;
    background: rgba(64, 88, 173, .13);
    animation-delay: -7s;
}
button, input, select {

    font: inherit;
}
button {

    cursor: pointer;
    transition: background 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease), color 200ms var(--ease), transform 200ms var(--ease);
}
button:active:not(:disabled) {

    transform: scale(.98);
}
button:disabled, select:disabled {

    cursor: not-allowed;
    opacity: .6;
}
:focus-visible {

    outline: 2px solid var(--accent-text);
    outline-offset: 4px;
}
h1, h2, h3, p {

    margin: 0;
}
h1 {

    font-size: 30px;
    font-weight: 600;
    letter-spacing: -.04em;
    line-height: 1.35;
    background: linear-gradient(180deg, #f1f1f5, #b6b8c6);
    background-clip: text;
    color: transparent;
}
h2 {

    font-size: 17px;
    font-weight: 600;
    letter-spacing: -.02em;
}
h3 {

    font-size: 16px;
    font-weight: 600;
}
.workspace {

    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    min-height: 100vh;
}
.sidebar {

    position: sticky;
    top: 0;
    height: 100vh;
    padding: 32px 16px 24px;
    display: flex;
    flex-direction: column;
    background: rgba(8, 8, 12, .88);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(20px);
    z-index: 5;
}
.brand-row, .brand {

    display: flex;
    align-items: center;
}
.brand-row {

    justify-content: space-between;
}
.brand {

    gap: 12px;
    color: var(--foreground);
    text-decoration: none;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 600;
}
/* 品牌图片共用一个轻量资源，固定尺寸防止加载时偏移；登录卡片单独放大。 */
.brand-mark {

    width: 40px;
    height: 40px;
    display: block;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    flex-shrink: 0;
}
.auth-card > .brand-mark {

    width: 64px;
    height: 64px;
    border-radius: 0;
}
.brand small {

    display: block;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: .1em;
    color: var(--muted);
}
nav {

    display: grid;
    gap: 6px;
    margin-top: 44px;
}
.nav-item {

    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    text-align: left;
    padding: 10px 14px;
    border-radius: var(--control-radius);
    font-size: 13px;
}
.nav-item svg {

    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.nav-item:hover {

    color: var(--foreground);
    background: var(--surface);
}
.nav-item.active {

    color: var(--accent-text);
    background: linear-gradient(90deg, rgba(94, 106, 210, .16), rgba(94, 106, 210, .06));
    border-color: rgba(94, 106, 210, .16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}
.sidebar-footer {

    margin-top: auto;
    padding: 20px 12px 0;
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid var(--line);
}
.sidebar-footer p {

    margin-bottom: 8px;
}
.text-button {

    color: var(--muted);
    padding: 6px 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    text-decoration: none;
}
.text-button:hover {

    color: var(--accent-text);
}
.menu-toggle {

    display: none;
}
main {

    padding: 36px 40px 48px;
    max-width: 1760px;
    width: 100%;
    min-width: 0;
    margin: 0 auto;
}
.page-header, .intro-row, .section-top, .dialog-header {

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-6);
}
.page-header {

    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}
.breadcrumb {

    color: var(--muted);
    font-size: 11px;
    margin-bottom: 10px;
    letter-spacing: .035em;
}
.switch-area {

    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 12px;
}
.mode-control {

    display: flex;
    flex-direction: column;
    gap: 5px;
}
#mode-select {

    width: 206px;
    min-width: 0;
    font-size: 12px;
}
#mode-lock-note {

    color: var(--muted);
    font-size: 11px;
}
#switch-description {

    white-space: nowrap;
    color: var(--muted);
}
.switch {

    width: 40px;
    height: 24px;
    border: 1px solid var(--line-hover);
    border-radius: 20px;
    padding: 3px;
    background: #353641;
    flex-shrink: 0;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .2);
}
.switch span {

    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ededf0;
    transition: transform 200ms var(--ease);
}
.switch[aria-checked="true"] {

    background: var(--accent);
    border-color: var(--accent-bright);
}
.switch[aria-checked="true"] span {

    transform: translateX(16px);
}
.intro-row {

    margin: 24px 0;
    color: var(--muted);
    font-size: 12px;
}
.intro-row > p {

    max-width: 720px;
}
.primary, .secondary {

    position: relative;
    overflow: hidden;
    padding: 10px 16px;
    min-height: 40px;
    border: 1px solid var(--line-hover);
    border-radius: var(--control-radius);
    white-space: nowrap;
    line-height: 1.5;
    font-size: 12px;
    font-weight: 500;
}
.primary {

    background: var(--button-accent);
    color: #f5f5fb;
    border-color: rgba(144, 153, 238, .45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 4px 12px rgba(94, 106, 210, .2), 0 0 24px rgba(94, 106, 210, .1);
}
.primary::after {

    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .14), transparent 80%);
    transform: translateX(-120%);
    transition: transform 400ms var(--ease);
    pointer-events: none;
}
.primary:hover:not(:disabled) {

    background: var(--button-hover);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 4px 16px var(--accent-glow), 0 0 32px rgba(94, 106, 210, .15);
}
.primary:hover::after {

    transform: translateX(120%);
}
.secondary {

    color: var(--foreground);
    background: var(--surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 2px 6px rgba(0, 0, 0, .12);
}
.secondary:hover {

    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, .22);
}
/* 摘要使用非均匀列宽，留出运行状态与最近读取的文字空间。 */
.summary-grid {

    display: grid;
    grid-template-columns: 1.2fr .85fr .85fr 1.1fr;
    gap: 12px;
}
.summary, .form-panel, .auth-card, .rule-explanation {

    position: relative;
    isolation: isolate;
    background: linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.summary {

    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    transition: border-color 250ms var(--ease), box-shadow 250ms var(--ease);
}
.summary:first-child {

    background: linear-gradient(130deg, rgba(94, 106, 210, .13), rgba(255, 255, 255, .025));
    border-color: rgba(94, 106, 210, .19);
}
.summary:hover {

    border-color: var(--line-hover);
    box-shadow: var(--shadow-raised);
}
.summary > span {

    color: var(--muted);
    font-size: 12px;
}
.summary strong {

    font-size: 30px;
    font-weight: 550;
    line-height: 1.5;
    letter-spacing: -.025em;
    font-variant-numeric: tabular-nums;
}
.summary strong.time-value {

    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 23px;
    line-height: 1.96;
    letter-spacing: -.035em;
}
.summary small {

    color: var(--muted);
    font-size: 11px;
}
.section-top {

    margin: 32px 0 16px;
    flex-wrap: wrap;
}
.section-top p, .form-panel > p {

    color: var(--muted);
    font-size: 12px;
    margin-top: 6px;
}
.table-wrap {

    border: 1px solid var(--line);
    background: rgba(13, 13, 18, .84);
    border-radius: var(--radius);
    overflow: auto;
    scrollbar-color: #373743 #101015;
    box-shadow: var(--shadow);
}
table {

    border-collapse: collapse;
    width: 100%;
    text-align: left;
    font-size: 12px;
}
th {

    padding: 14px 18px;
    background: rgba(255, 255, 255, .025);
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
}
td {

    padding: 20px 18px;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
    min-width: 100px;
}
tr:last-child td {

    border-bottom: 0;
}
tbody tr:hover {

    background: rgba(255, 255, 255, .018);
}
#page-overview th:nth-child(1) {

    width: 11%;
}
#page-overview th:nth-child(2) {

    width: 7%;
}
#page-overview th:nth-child(3) {

    width: 7%;
}
#page-overview th:nth-child(4) {

    width: 8%;
}
#page-overview th:nth-child(5) {

    width: 9%;
}
#page-overview th:nth-child(6) {

    width: 14%;
}
#page-overview th:nth-child(7) {

    width: 8%;
}
#page-overview th:nth-child(8) {

    width: 12%;
}
#page-overview th:nth-child(9) {

    width: 16%;
}
.billing-cell small, .wallet-cell small {

    white-space: nowrap;
}
.billing-cell strong, .wallet-cell strong {

    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
}
.log-pagination, .log-page-controls, .log-page-size {

    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.log-pagination {

    justify-content: space-between;
    padding: 16px 0;
}
.log-pagination p, .log-page-size {

    margin: 0;
    color: var(--muted);
    font-size: 12px;
}
.log-page-size select {

    width: auto;
    min-width: 80px;
}
.log-page-controls button {

    min-height: 40px;
}
.column-hint {

    display: block;
    font-size: 10px;
    font-weight: 400;
    opacity: .8;
    margin-top: 2px;
}
/* 为调度结果和完整北京时间保留宽度，宽表继续在自身容器内横向滚动。 */
.schedule-status {

    min-width: 168px;
}
.last-scheduled-at time {

    display: block;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.schedule-status strong {

    white-space: nowrap;
    font-size: 13px;
}
td strong {

    font-weight: 500;
    display: block;
    overflow-wrap: anywhere;
}
td:first-child strong {

    font-size: 13px;
    color: #e1e2ec;
}
td small {

    color: var(--muted);
    display: block;
    margin-top: 5px;
    overflow-wrap: anywhere;
    font-size: 11px;
}
.account-line {

    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 10px;
    margin-bottom: 8px;
    white-space: normal;
    overflow-wrap: anywhere;
}
.account-line:last-child {

    margin-bottom: 0;
}
.account-line > small {

    margin: 0;
    flex-basis: 100%;
}
.account-line > .status {

    flex-basis: auto;
    white-space: nowrap;
    margin-left: auto;
    font-size: 10px;
    font-weight: 400;
}
.participation-toggle {

    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    border: 1px solid var(--line-hover);
    border-radius: 6px;
    padding: 5px 9px;
    background: var(--surface);
    color: var(--muted);
    font-size: 11px;
}
.participation-toggle::before {

    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.participation-toggle.enabled {

    border-color: rgba(94, 106, 210, .3);
    color: var(--accent-text);
    background: rgba(94, 106, 210, .1);
}
.participation-toggle:hover:not(:disabled) {

    border-color: var(--accent-bright);
    background: rgba(94, 106, 210, .18);
}
.status {

    font-size: 12px;
    font-weight: 500;
}
.status.success {

    color: var(--success);
}
.status.error, .error-text {

    color: var(--error);
}
.status.warning {

    color: var(--warning);
}
.status.neutral {

    color: var(--muted);
}
/* 色块保持纯色、无可见文字；含义由 title 与 aria-label 补充。 */
.history-timeline {

    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    width: 116px;
    margin-top: 3px;
}
.history-point {

    display: block;
    width: 20px;
    height: 22px;
    border-radius: 4px;
    background: #676c7c;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 2px 4px rgba(0, 0, 0, .15);
}
.history-point.unknown {

    background: #ffffff;
}
.history-point.green {

    background: #51ae84;
}
.history-point.yellow {

    background: #d9b558;
}
.history-point.red {

    background: #d46d77;
}
.empty {

    text-align: center;
    padding: 64px 24px;
}
.empty p {

    color: var(--muted);
    margin: 8px 0 24px;
}
.footnote {

    color: var(--muted);
    font-size: 11px;
    margin-top: 16px;
}
label {

    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: #c5c7d0;
    min-width: 0;
}
input, select {

    border: 1px solid var(--line-hover);
    background: #0f0f14;
    border-radius: var(--control-radius);
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--foreground);
    transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
input:hover, select:hover:not(:disabled) {

    border-color: rgba(255, 255, 255, .23);
}
input:focus, select:focus {

    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(94, 106, 210, .14);
}
input::placeholder {

    color: #9296a3;
    font-size: 12px;
}
.search-label {

    width: 230px;
    flex-shrink: 0;
}
.channel-filters {

    display: flex;
    gap: 12px;
    align-items: center;
}
.participation-filter-label {

    width: 170px;
    flex-shrink: 0;
}
.connection-grid, .field-grid {

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
.form-panel {

    padding: 28px;
}
.form-panel .field-grid {

    margin: 24px 0;
}
.form-panel .field-help {

    margin: 12px 0 20px;
    font-size: 12px;
    color: var(--muted);
}
.api-panel {

    margin-top: 24px;
}
.form-actions {

    margin-top: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.form-actions span {

    font-size: 12px;
    color: var(--muted);
}
.rules-layout {

    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
    gap: 24px;
    align-items: start;
}
.rule-explanation {

    padding: 28px;
    background: rgba(255, 255, 255, .02);
}
/* 全局和渠道规则共用分组布局，窗口独占一行，其余规则按动作分组。 */
.rule-editor {

    min-width: 0;
}
.rule-editor > h2 {

    margin-bottom: 24px;
}
.rule-groups {

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
}
.rule-group {

    min-width: 0;
    margin: 0;
    padding: 16px 20px 20px;
    border: 1px solid var(--line-hover);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015));
}
.rule-group legend {

    padding: 0 8px;
    margin-left: -8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--foreground);
}
.rule-group-description {

    color: var(--muted);
    font-size: 12px;
    margin-bottom: 16px;
}
.rule-group-fields {

    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.rule-group-window {

    grid-column: 1 / -1;
}
.rule-group-window .rule-group-fields {

    max-width: 240px;
}
.timing-group {

    margin-top: 24px;
}
.timing-group .rule-group-fields {

    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.rule-explanation ul, .rule-explanation ol {

    padding-left: 20px;
    color: var(--muted);
    font-size: 12px;
}
.rule-explanation li {

    margin-bottom: 16px;
    padding-left: 4px;
}
.rule-explanation li::marker {

    color: var(--accent-text);
}
.rule-explanation h2:not(:first-child) {

    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.notice {

    border: 1px solid rgba(94, 106, 210, .25);
    border-radius: var(--control-radius);
    background: #161724;
    color: #c3c9f2;
    padding: 12px 16px;
    margin-top: 20px;
    font-size: 12px;
}
.notice.error {

    background: #26191e;
    color: #f3b1b6;
    border-color: rgba(245, 139, 146, .2);
}
dialog {

    color: var(--foreground);
    background: #111117;
    border: 1px solid var(--line-hover);
    border-radius: var(--radius);
    padding: 28px;
    width: min(760px, calc(100% - 32px));
    max-height: calc(100dvh - 48px);
    overflow: auto;
    box-shadow: var(--shadow-raised);
}
dialog::backdrop {

    background: rgba(2, 2, 5, .75);
    backdrop-filter: blur(5px);
}
#dialog-subtitle {

    color: var(--muted);
    margin-top: 8px;
    overflow-wrap: anywhere;
    font-size: 12px;
}
.checkbox-label {

    flex-direction: row;
    align-items: center;
    margin: 24px 0;
}
.checkbox-label input {

    width: 16px;
    min-height: 16px;
    accent-color: var(--accent);
}
.error-text {

    font-size: 12px;
    margin-top: 16px;
}
.auth-screen {

    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    align-items: center;
    gap: 80px;
    max-width: 1120px;
    margin: auto;
    padding: 64px 32px;
}
.auth-intro h2 {

    margin-top: 48px;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 550;
    line-height: 1.3;
    letter-spacing: -.045em;
    background: linear-gradient(180deg, #ededf0 40%, #a5a6bb);
    background-clip: text;
    color: transparent;
}
.auth-intro .accent-text {

    background: linear-gradient(90deg, #a7b0ff, #d0c9ef, #a7b0ff);
    background-size: 200% auto;
    background-clip: text;
    color: transparent;
    animation: accent-shift 10s ease-in-out infinite;
}
.auth-intro > p {

    max-width: 360px;
    color: var(--muted);
    font-size: 14px;
    margin-top: 24px;
    line-height: 1.9;
}
.auth-signals {

    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 40px;
    opacity: .8;
}
.auth-signals i {

    width: 7px;
    height: 28px;
    border-radius: 3px;
    background: var(--accent);
}
.auth-signals i:nth-child(2n) {

    height: 18px;
    opacity: .6;
}
.auth-signals i:nth-child(3n) {

    height: 38px;
    background: #9299de;
}
.auth-card {

    width: 100%;
    padding: 36px;
    background-color: rgba(14, 14, 20, .8);
    overflow: hidden;
}
.auth-card h1 {

    margin-top: 24px;
    font-size: 25px;
}
.auth-card > p {

    color: var(--muted);
    font-size: 12px;
    margin: 10px 0 28px;
}
.auth-card label + label {

    margin-top: 20px;
}
.auth-card .primary {

    margin-top: 28px;
    width: 100%;
    min-height: 44px;
}
.auth-card .error-text {

    color: var(--error);
    margin-bottom: 0;
}
.sr-only {

    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
/* 聚光只绘制在少量摘要与登录卡片，不绑定长列表的每一行。 */
.spotlight::after {

    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(150px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), rgba(94, 106, 210, .15), transparent 100%);
    opacity: 0;
    transition: opacity 250ms var(--ease);
    z-index: -1;
}
.spotlight:hover::after {

    opacity: 1;
}
.page:not([hidden]), dialog[open], .auth-card {

    animation: enter-surface 400ms var(--ease) both;
}
.summary:nth-child(2) {

    animation-delay: 60ms;
}
.summary:nth-child(3) {

    animation-delay: 120ms;
}
.summary:nth-child(4) {

    animation-delay: 180ms;
}
.page:not([hidden]) .summary {

    animation-name: enter-surface;
    animation-duration: 450ms;
    animation-fill-mode: both;
    animation-timing-function: var(--ease);
}
@keyframes enter-surface {

    from {

        opacity: 0;
        transform: translateY(6px);
    }
    to {

        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes ambient-float {

    0%, 100% {

        transform: translateY(0) rotate(0deg);
    }
    50% {

        transform: translateY(20px) rotate(1deg);
    }
}
@keyframes accent-shift {

    0%, 100% {

        background-position: 0% center;
    }
    50% {

        background-position: 100% center;
    }
}
/* 视差只作用于装饰光源，滚动时不隐藏控制项或降低监控数据可读性。 */
@supports (animation-timeline: scroll()) {

    .ambient::after {

        animation: ambient-scroll linear both;
        animation-timeline: scroll(root block);
    }
    @keyframes ambient-scroll {

        to {

            transform: translateY(40px);
            opacity: .3;
        }
    }
}
@media (max-width: 1200px) {

    main {

        padding: 28px 24px;
    }
    .workspace {

        grid-template-columns: 196px minmax(0, 1fr);
    }
    .summary {

        padding: 20px 16px;
    }
    .summary strong {

        font-size: 26px;
    }
    .summary strong.time-value {

        font-size: 20px;
    }
    .connection-grid, .rules-layout {

        grid-template-columns: 1fr;
    }
    .switch-area {

        gap: 8px;
    }
    #switch-description {

        display: none;
    }
    #page-overview table {

        min-width: 1040px;
    }
}
@media (max-width: 900px) {

    .auth-screen {

        grid-template-columns: 1fr 380px;
        gap: 32px;
    }
    .summary-grid {

        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {

    .workspace {

        display: block;
    }
    .sidebar {

        position: relative;
        height: auto;
        padding: 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .brand {

        padding: 0;
    }
    .menu-toggle {

        display: grid;
        place-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        border-radius: var(--control-radius);
        border: 1px solid var(--line-hover);
        color: var(--foreground);
        background: var(--surface);
    }
    .menu-toggle span {

        display: block;
        width: 18px;
        height: 1px;
        background: currentColor;
        transition: transform 200ms var(--ease);
    }
    .menu-toggle[aria-expanded="true"] span:first-child {

        transform: translateY(3px) rotate(45deg);
    }
    .menu-toggle[aria-expanded="true"] span:last-child {

        transform: translateY(-3px) rotate(-45deg);
    }
    nav, .sidebar-footer {

        display: none;
    }
    .sidebar.menu-open nav {

        display: grid;
        margin-top: 20px;
        animation: enter-surface 200ms var(--ease) both;
    }
    .sidebar.menu-open .sidebar-footer {

        display: block;
        padding-top: 12px;
        margin-top: 12px;
    }
    .sidebar-footer p {

        display: none;
    }
    .sidebar-footer .text-button {

        width: 100%;
        min-height: 44px;
        text-align: left;
    }
    main {

        padding: 24px 16px 40px;
    }
    h1 {

        font-size: 26px;
    }
    .page-header, .intro-row, .section-top {

        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }
    .page-header {

        padding-bottom: 20px;
    }
    .switch-area {

        width: 100%;
        justify-content: space-between;
    }
    #switch-description {

        display: block;
        margin-left: auto;
        font-size: 11px;
    }
    #mode-select {

        width: 180px;
    }
    .summary-grid {

        gap: 10px;
    }
    .summary {

        padding: 18px 14px;
    }
    .summary strong {

        font-size: 24px;
    }
    .summary strong.time-value {

        font-size: 21px;
        line-height: 1.72;
    }
    .summary small {

        font-size: 10px;
    }
    .search-label {

        width: 100%;
    }
    .channel-filters {

        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .participation-filter-label {

        width: 100%;
    }
    .field-grid {

        grid-template-columns: 1fr;
        gap: 20px;
    }
    .form-panel, .rule-explanation {

        padding: 24px 20px;
    }
    .rule-groups, .timing-group .rule-group-fields {

        grid-template-columns: 1fr;
    }
    .rule-group-window .rule-group-fields {

        max-width: none;
    }
    td, th {

        padding: 16px;
    }
    #page-logs table {

        min-width: 620px;
    }
    .auth-screen {

        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 32px 20px;
        gap: 32px;
    }
    .auth-intro {

        width: min(420px, 100%);
    }
    .auth-intro h2, .auth-intro > p, .auth-signals {

        display: none;
    }
    .auth-card {

        max-width: 420px;
        padding: 28px;
    }
    .auth-card > .brand-mark {

        display: none;
    }
    .auth-card h1 {

        margin-top: 0;
    }
    .ambient-light {

        filter: blur(70px);
        max-width: 600px;
    }
    dialog {

        padding: 24px 20px;
    }
}
@media (max-width: 370px) {

    #switch-description {

        display: none;
    }
}
/* 遵循系统减少动态效果偏好，功能与数据展示不依赖动画完成。 */
@media (prefers-reduced-motion: reduce) {

    *, *::before, *::after {

        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    .spotlight::after {

        display: none;
    }
}
@media (forced-colors: active) {

    h1, .auth-intro h2, .auth-intro .accent-text {

        color: CanvasText;
        background: none;
    }
    .history-point {

        forced-color-adjust: none;
    }
    .ambient {

        display: none;
    }
}

/* 监控页倍率信息与渠道列表分区；规则页的周期表单沿用相同容器间距。 */
.billing-dialog {

    max-width: 440px;
}

.billing-edit {

    margin-top: 6px;
    padding: 4px 0;
}

.oauth-rate-panel, .oauth-rate-config-panel {

    margin-bottom: 24px;
}

.oauth-rate-panel {

    margin-top: 28px;
    padding: 24px;
}

.oauth-rate-header {

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.oauth-rate-header h2 {

    margin: 0;
}

.oauth-rate-header .switch {

    flex-shrink: 0;
}

.oauth-rate-summary {

    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(0, 3fr);
    gap: 24px;
    align-items: center;
    margin: 20px 0 0;
}

.oauth-rate-last {

    min-width: 0;
    padding-left: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.oauth-rate-last p {

    margin: 8px 0;
    overflow-wrap: anywhere;
}

.oauth-rate-current {

    display: block;
    font-size: 32px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.oauth-rate-config-panel input {

    max-width: 320px;
}

@media (max-width: 767px) {

    .oauth-rate-summary {

        grid-template-columns: 1fr;
        gap: 12px;
    }

    .oauth-rate-panel {

        margin-top: 24px;
        padding: 20px;
    }

    .oauth-rate-last {

        padding: 16px 0 0;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
}

/* 表头排序按钮沿用表格字号和键盘焦点，整块按钮均可点击。 */
.table-sort {

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
}
.table-sort:hover {

    color: var(--foreground, #EDEDEF);
}
th[aria-sort="ascending"] .table-sort,
th[aria-sort="descending"] .table-sort {

    color: #EDEDEF;
}

/* 探测配置沿用表单间距，说明与输入焦点环留出空间。 */
.probe-dialog {

    max-width: 560px;
}

#probe-form {

    display: grid;
    gap: 20px;
}

#probe-channel-name, #probe-help {

    color: var(--foreground-muted, #8A8F98);
    font-size: 13px;
    line-height: 1.7;
}

#probe-channel-name {

    margin-top: 8px;
}

/* 今日统计四行固定标签，完整数字右对齐，窄屏沿用表格横向滚动。 */
.today-stats-cell {

    min-width: 178px;
}

.today-stat-line {

    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    line-height: 1.8;
    white-space: nowrap;
    font-size: 12px;
}

.today-stat-line span {

    color: var(--muted);
}

.today-stat-line strong {

    font-variant-numeric: tabular-nums;
    overflow-wrap: normal;
}

#page-overview th:nth-child(10) {

    width: 8%;
}

/* 容量徽标按原平台亮暗层级显示；图标仅装饰，数字和说明提供非颜色含义。 */
.capacity-cell {

    min-width: 112px;
}

.capacity-badge {

    /* 固定徽标行高，避免继承正文 1.65 行高造成图标与数字视觉错位。 */
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    min-height: 24px;
    line-height: 16px;
    gap: 5px;
    border-radius: 6px;
    padding: 4px 7px;
    /* 背景向左延伸一个内边距，使内容图标与列标题、下方状态文字共用左边线。 */
    margin-inline-start: -7px;
    white-space: nowrap;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, monospace;
}

.capacity-badge.idle {

    color: #8a8f98;
    background: rgba(138, 143, 152, .08);
}

.capacity-badge.active {

    color: #f5d77e;
    background: rgba(234, 179, 8, .16);
    box-shadow: inset 0 0 0 1px rgba(234, 179, 8, .2), 0 0 12px rgba(234, 179, 8, .08);
}

.capacity-badge.full {

    color: #f3a3ad;
    background: rgba(239, 68, 68, .18);
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .24), 0 0 12px rgba(239, 68, 68, .08);
}

.capacity-divider {

    opacity: .65;
}

.capacity-badge > span:not(.capacity-slots) {

    display: inline-flex;
    align-items: center;
    height: 16px;
    line-height: 16px;
}

.capacity-slots {

    /* 图标使用独立固定网格，不受文字基线与字体度量影响。 */
    display: grid;
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    grid-template-columns: repeat(2, 5px);
    grid-template-rows: repeat(2, 5px);
    gap: 2px;
    margin-right: 2px;
    align-self: center;
}

.capacity-slots i {

    display: block;
    width: 5px;
    height: 5px;
    border: 1px solid currentColor;
    border-radius: 1px;
}

/* 列表数值与渠道阶段使用统一文字色；不改变布局，旧值/失败文字标识仍保留。 */
#monitor-rows .tone-good {

    color: var(--success);
}

#monitor-rows .tone-warning {

    color: var(--warning);
}

#monitor-rows .tone-bad {

    color: var(--error);
}
