/* =========================================================
   推送中心 · 样式表
   深色控制台风格，青绿 / 天蓝双色强调
   ========================================================= */

:root {
    --bg: #070c12;
    --bg-soft: #0b121a;
    --panel: rgba(17, 25, 35, 0.82);
    --panel-solid: #111a24;
    --panel-2: rgba(10, 17, 24, 0.72);
    --line: rgba(122, 172, 218, 0.14);
    --line-strong: rgba(122, 172, 218, 0.28);
    --text: #e8f1fb;
    --muted: #8ba0b5;
    --muted-2: #647a90;
    --teal: #2fe0c0;
    --blue: #4cc2ff;
    --ok: #3ddc97;
    --danger: #ff7b7b;
    --warn: #ffc857;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
        "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
    background:
        radial-gradient(900px 520px at 8% -10%, rgba(47, 224, 192, 0.13), transparent 60%),
        radial-gradient(860px 520px at 92% -6%, rgba(76, 194, 255, 0.12), transparent 58%),
        var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 背景网格 */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(122, 172, 218, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(122, 172, 218, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}

.page {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 22px 40px;
}

/* ---------------- 顶栏 ---------------- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 2px 22px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: var(--teal);
    background: linear-gradient(145deg, rgba(47, 224, 192, 0.16), rgba(76, 194, 255, 0.1));
    border: 1px solid rgba(47, 224, 192, 0.32);
    box-shadow: 0 0 26px -8px rgba(47, 224, 192, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-text h1 {
    margin: 0;
    font-size: 20px;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.brand-text span {
    display: block;
    font-size: 10px;
    letter-spacing: 0.32em;
    color: var(--muted-2);
    margin-top: 1px;
}

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

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid var(--line);
    background: rgba(12, 20, 28, 0.7);
    color: var(--muted);
    white-space: nowrap;
}

.status-chip i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--muted-2);
    box-shadow: 0 0 0 0 transparent;
}

.status-chip.ok {
    color: #b8f3e4;
    border-color: rgba(47, 224, 192, 0.28);
    background: rgba(47, 224, 192, 0.08);
}

.status-chip.ok i {
    background: var(--teal);
    box-shadow: 0 0 10px rgba(47, 224, 192, 0.9);
}

.inline-form {
    margin: 0;
}

/* ---------------- 布局 ---------------- */

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 18px;
    align-items: start;
}

.col-main,
.col-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

/* ---------------- 卡片 ---------------- */

.card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(47, 224, 192, 0.4), rgba(76, 194, 255, 0.35), transparent);
    opacity: 0.7;
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.card-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.card-head p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.corner-mark {
    font-size: 11px;
    color: var(--muted-2);
    letter-spacing: 0.18em;
    border: 1px solid var(--line);
    padding: 2px 8px;
    border-radius: 6px;
    font-variant-numeric: tabular-nums;
}

/* ---------------- 表单 ---------------- */

.field {
    margin-bottom: 14px;
    min-width: 0;
}

.field-label,
.field > label {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.field-label label {
    margin-bottom: 0;
}

.opt {
    font-size: 11px;
    color: var(--muted-2);
    font-weight: 400;
}

.counter {
    margin-left: auto;
    font-size: 11px;
    color: var(--muted-2);
    font-variant-numeric: tabular-nums;
    margin-bottom: 0;
}

.input {
    width: 100%;
    display: block;
    padding: 11px 13px;
    color: var(--text);
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.6;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.input::placeholder {
    color: #52697f;
}

.input:hover {
    border-color: var(--line-strong);
}

.input:focus {
    border-color: rgba(47, 224, 192, 0.6);
    box-shadow: 0 0 0 3px rgba(47, 224, 192, 0.12);
    background: rgba(8, 15, 21, 0.85);
}

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

select.input option {
    background: #111a24;
    color: var(--text);
}

.area {
    resize: vertical;
    min-height: 120px;
    font-size: 14px;
}

.area-sm {
    resize: vertical;
    min-height: 58px;
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 12.5px;
    letter-spacing: 0.02em;
}

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

.switch-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 4px;
}

.switch-field > label {
    margin-bottom: 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex: none;
    margin: 0;
    cursor: pointer;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(122, 172, 218, 0.16);
    border: 1px solid var(--line);
    transition: background 0.18s ease, border-color 0.18s ease;
    pointer-events: none;
}

.switch span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #9fb4c8;
    transition: transform 0.18s ease, background 0.18s ease;
}

.switch input:checked + span {
    background: rgba(47, 224, 192, 0.28);
    border-color: rgba(47, 224, 192, 0.55);
}

.switch input:checked + span::after {
    transform: translateX(20px);
    background: var(--teal);
}

/* ---------------- 通道选择 ---------------- */

.channel-picker {
    display: flex;
    gap: 8px;
}

.chan {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--muted);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.16s ease;
    user-select: none;
}

.chan i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted-2);
    transition: all 0.16s ease;
}

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

.chan.on {
    color: #c8fff4;
    border-color: rgba(47, 224, 192, 0.5);
    background: linear-gradient(150deg, rgba(47, 224, 192, 0.16), rgba(47, 224, 192, 0.06));
    box-shadow: inset 0 0 0 1px rgba(47, 224, 192, 0.06);
}

.chan.on i {
    background: var(--teal);
    box-shadow: 0 0 8px rgba(47, 224, 192, 0.85);
}

/* ---------------- 按钮 ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.16s ease, opacity 0.16s ease, background 0.16s ease;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn.primary {
    color: #032720;
    background: linear-gradient(120deg, #2fe0c0, #4cc2ff);
    box-shadow: 0 10px 26px -14px rgba(47, 224, 192, 0.9);
}

.btn.primary:hover {
    box-shadow: 0 14px 30px -12px rgba(47, 224, 192, 0.75);
}

.btn.primary.outline {
    color: #b9fff2;
    background: linear-gradient(150deg, rgba(47, 224, 192, 0.16), rgba(76, 194, 255, 0.1));
    border-color: rgba(47, 224, 192, 0.42);
    box-shadow: none;
}

.btn.primary.outline:hover {
    background: linear-gradient(150deg, rgba(47, 224, 192, 0.24), rgba(76, 194, 255, 0.16));
}

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

.btn.ghost:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(122, 172, 218, 0.06);
}

.btn.sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

.btn.block {
    width: 100%;
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

/* ---------------- 配置分组 ---------------- */

.group {
    padding: 14px 0 6px;
    border-top: 1px dashed var(--line);
}

.group:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #b8ccdd;
    margin-bottom: 12px;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.dot.teal {
    background: var(--teal);
    box-shadow: 0 0 8px rgba(47, 224, 192, 0.8);
}

.dot.blue {
    background: var(--blue);
    box-shadow: 0 0 8px rgba(76, 194, 255, 0.8);
}

.dot.gray {
    background: var(--muted-2);
}

.tip {
    margin: 2px 0 10px;
    font-size: 11.5px;
    color: var(--muted-2);
    line-height: 1.7;
}

.tip a {
    color: var(--blue);
    text-decoration: none;
    border-bottom: 1px dotted rgba(76, 194, 255, 0.4);
}

.tip a:hover {
    color: #9fdcff;
}

/* ---------------- 结果提示 ---------------- */

.result {
    margin-top: 14px;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    font-size: 13px;
}

.result.hidden {
    display: none;
}

.result-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
}

.result-head .tag {
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 999px;
    letter-spacing: 0.04em;
}

.tag.ok {
    color: #adf5dd;
    background: rgba(61, 220, 151, 0.14);
    border: 1px solid rgba(61, 220, 151, 0.3);
}

.tag.err {
    color: #ffd0d0;
    background: rgba(255, 123, 123, 0.12);
    border: 1px solid rgba(255, 123, 123, 0.3);
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.result-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted);
}

.result-row .ch {
    font-weight: 600;
    color: #cfe1f0;
    min-width: 74px;
    flex: none;
}

.result-row.bad .msg {
    color: #ffb4b4;
}

.result-row.good .msg {
    color: #adf5dd;
}

/* ---------------- 历史记录 ---------------- */

.history {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow: auto;
    padding-right: 2px;
}

.history::-webkit-scrollbar {
    width: 6px;
}

.history::-webkit-scrollbar-thumb {
    background: rgba(122, 172, 218, 0.2);
    border-radius: 3px;
}

.history .empty {
    color: var(--muted-2);
    font-size: 12.5px;
    padding: 14px 0;
    text-align: center;
}

.hist-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(10, 17, 24, 0.5);
    transition: border-color 0.16s ease;
}

.hist-item:hover {
    border-color: var(--line-strong);
}

.hist-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.hist-title {
    font-size: 13px;
    font-weight: 600;
    color: #dceaf7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.hist-state {
    font-size: 10.5px;
    padding: 1px 7px;
    border-radius: 999px;
    flex: none;
}

.hist-state.ok {
    color: #a6f0d5;
    background: rgba(61, 220, 151, 0.12);
}

.hist-state.err {
    color: #ffc2c2;
    background: rgba(255, 123, 123, 0.12);
}

.hist-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--muted-2);
    flex-wrap: wrap;
}

.hist-body {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ---------------- 角标 / 页脚 ---------------- */

.footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 26px 4px 4px;
    font-size: 11px;
    color: var(--muted-2);
    letter-spacing: 0.06em;
    flex-wrap: wrap;
}

/* ---------------- Toast ---------------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 20px);
    z-index: 60;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    color: #d9fff7;
    background: rgba(12, 24, 30, 0.94);
    border: 1px solid rgba(47, 224, 192, 0.35);
    box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-width: calc(100vw - 40px);
}

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

.toast.err {
    color: #ffd7d7;
    border-color: rgba(255, 123, 123, 0.4);
}

/* ---------------- 登录页 ---------------- */

.login-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(600px 400px at 50% -10%, rgba(47, 224, 192, 0.16), transparent 65%),
        radial-gradient(700px 500px at 80% 110%, rgba(76, 194, 255, 0.10), transparent 60%),
        var(--bg);
}

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 30px 26px 24px;
    box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(14px);
}

.login-logo {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    border: 1px solid rgba(47, 224, 192, 0.32);
    background: linear-gradient(145deg, rgba(47, 224, 192, 0.16), rgba(76, 194, 255, 0.1));
    margin-bottom: 16px;
}

.login-card h1 {
    margin: 0 0 4px;
    font-size: 20px;
    letter-spacing: 0.04em;
}

.login-sub {
    margin: 0 0 18px;
    font-size: 12.5px;
    color: var(--muted);
}

.login-foot {
    margin: 16px 0 0;
    font-size: 11px;
    color: var(--muted-2);
    text-align: center;
}

.alert {
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 12.5px;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 123, 123, 0.32);
    background: rgba(255, 123, 123, 0.1);
    color: #ffc9c9;
}

.login-card .actions {
    margin-top: 18px;
}

.login-card .btn {
    margin-top: 6px;
}

/* ---------------- 快速上手 ---------------- */

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.steps li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(10, 17, 24, 0.45);
}

.step-no {
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #b9fff2;
    background: rgba(47, 224, 192, 0.14);
    border: 1px solid rgba(47, 224, 192, 0.35);
}

.steps strong {
    display: block;
    font-size: 12.5px;
    color: #d9e8f5;
    margin-bottom: 2px;
}

.steps p {
    margin: 0;
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.65;
}

.api-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
    font-size: 11.5px;
    color: var(--muted-2);
    flex-wrap: wrap;
}

.api-hint code {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 11.5px;
    color: #bfe9ff;
    background: rgba(76, 194, 255, 0.08);
    border: 1px solid rgba(76, 194, 255, 0.2);
    padding: 3px 8px;
    border-radius: 6px;
}

/* ---------------- 响应式 ---------------- */

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

    .page {
        padding: 20px 14px 32px;
    }

    .topbar {
        padding-bottom: 16px;
    }
}

@media (max-width: 560px) {
    .card {
        padding: 18px 16px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .top-actions {
        width: 100%;
    }

    .status-chip {
        font-size: 11px;
        padding: 5px 10px;
    }

    .actions {
        flex-wrap: wrap;
    }

    .btn.primary {
        flex: 1;
    }
}
