:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --primary: #4f46e5;
    --primary-light: #eef2ff;
    --green: #10b981;
    --green-bg: #d1fae5;
    --orange: #f59e0b;
    --orange-bg: #fef3c7;
    --red: #ef4444;
    --red-bg: #fee2e2;
    --radius: 12px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}


::-webkit-input-placeholder{ color:var(--text-muted) !important; }
::-moz-placeholder{ color:var(--text-muted) !important; }
:-ms-input-placeholder { color:var(--text-muted) !important; }
input:-moz-placeholder { color:var(--text-muted) !important; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Topbar ─── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    margin-right: 20px;
}
.brand svg { width: 28px; height: 28px; color: var(--primary); }
a.brand { text-decoration: none; }
a.brand:hover { text-decoration: none; }
.topbar-left { display: flex; align-items: center; gap: 16px; }

/* ─── Topbar Lang Dropdown（无边框自定义） ─── */
.topbar-lang-wrap { position: relative; }
.topbar-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border: none;
    border-radius: 8px;
    background: none;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.topbar-lang-btn:hover { background: var(--primary-light); color: var(--primary); }
.topbar-lang-btn.active { background: var(--primary-light); color: var(--primary); }
.topbar-lang-btn .topbar-lang-arrow { transition: transform .18s; }
.topbar-lang-btn.active .topbar-lang-arrow { transform: rotate(180deg); }
.topbar-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 140px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    padding: 6px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .18s, transform .18s;
}
.topbar-lang-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.topbar-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: none;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background .15s;
}
.topbar-lang-option:hover { background: var(--primary-light); color: var(--primary); }
.topbar-lang-option.active { color: var(--primary); font-weight: 500; }
.topbar-lang-option.active::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}
.topbar-lang-option:not(.active)::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    flex-shrink: 0;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-nav-link {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s;
}
.topbar-nav-link:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.topbar-nav-link.active { background: var(--primary-light); color: var(--primary); font-weight: 500; }
.menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    height: 38px;
}

/* ─── Layout ─── */
.layout {
    /* max-width: 1400px; */
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    padding: 32px 24px;
}

/* ─── Sidebar ─── */
.sidebar {
    position: sticky;
    top: 96px;
    height: calc(100vh - 128px);
    overflow-y: auto;
    padding-right: 8px;
}
.nav-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    margin: 24px 0 8px;
}
.nav-title:first-child { margin-top: 0; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 8px 6px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.15s;
    text-decoration: none;
}
.nav-link:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.nav-link.active { background: var(--primary-light); color: var(--primary); font-weight: 500; }
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ─── Main ─── */
.main { min-width: 0; }

/* ─── Section ─── */
.section { margin-bottom: 24px; }
.section-title {
    font-size: 22px;
    font-weight: 700;
    padding-bottom: 12px;
}

/* ─── Card ─── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    scroll-margin-top: 96px;
}
.card h3 { margin: 0 0 8px; font-size: 20px; }
.desc { color: var(--text-secondary); margin: 0 0 20px; font-size: 15px; }

/* ─── Stats Grid ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}
.stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.green   { background: var(--green-bg); color: var(--green); }
.stat-icon.orange  { background: var(--orange-bg); color: var(--orange); }
.stat-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}
.stat-value {
    font-size: 28px;
}
.stat-value .decimal {
    font-size: 18px;
    color: var(--text-secondary);
}
.stat-value .unit {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 8px;
}

/* ─── Usage Table ─── */
.param-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.param-table th, .param-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.param-table th { background: var(--bg); color: var(--text-secondary); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
.param-table tr:last-child td { border-bottom: none; }
.param-name { color: var(--primary); }
.type { color: var(--text-muted); font-size: 12px; }

.tag {
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
}
.tag.green  { color: #16a34a; }
.tag.blue   { color: #2563eb; }
.tag.red    { color: #dc2626; }

/* ─── Empty & Loading ─── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state svg { width: 40px; height: 40px; margin-bottom: 12px; color: var(--text-muted); }

footer { text-align: center; color: var(--text-muted); font-size: 13px; padding: 40px 0 60px; }

/* ─── Topbar Actions ─── */
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 8px;
    transition: all 0.15s;
}
.topbar-link:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.topbar-team-name {
    font-size: 14px;
    color: var(--text);
    padding: 6px 12px;
    border-radius: 8px;
}
.topbar-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}
.topbar-icon-btn:hover {
    color: var(--text);
}
.topbar-icon-btn.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* ─── Topbar More Dropdown ─── */
.topbar-more-wrap { position: relative; }
.topbar-more-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    padding: 6px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .18s, transform .18s;
}
.topbar-more-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.topbar-more-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: none;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background .15s;
}
.topbar-more-item:hover { background: var(--primary-light); color: var(--primary); }
.topbar-more-item.danger { color: #dc2626; }
.topbar-more-item.danger:hover { background: #fef2f2; color: #dc2626; }
.topbar-more-item svg { flex-shrink: 0; }

/* ─── Forms ─── */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}
.form-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}


/* input with icon */
.input-wrap { position: relative; }
.input-wrap .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 18px;
    height: 18px;
}
.input-wrap .input-icon svg { width: 18px; height: 18px; }
.input-wrap .form-input { padding-left: 44px; }
.input-wrap .input-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    display: flex;
    align-items: center;
}
.input-wrap .input-toggle:hover { color: var(--text); }
.input-wrap .input-toggle svg { width: 18px; height: 18px; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: #4338ca; }
.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}
.btn-block { width: 100%; }

/* ─── Alert / Message ─── */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
}
.alert.error { background: var(--red-bg); color: #991b1b; display: block; }
.alert.success { background: var(--green-bg); color: #065f46; display: block; }

/* ─── Login Page ─── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 50%, #f0fdf4 100%);
}
.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.login-header { text-align: center; margin-bottom: 12px; }
.login-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}
.login-logo svg { width: 28px; height: 28px; }

/* ─── 首页登录弹窗 ─── */
.login-dialog-mask {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    padding: 20px;
    box-sizing: border-box;
}
.login-dialog-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--surface, #fff);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    padding: 36px 32px;
    box-sizing: border-box;
    animation: loginDialogIn .22s ease;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
@keyframes loginDialogIn {
    from { opacity: 0; transform: translateY(16px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-dialog-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}
.login-dialog-close:hover { background: var(--primary-light, #eef2ff); color: var(--text, #1e293b); }

/* ─── 登录页语言切换下拉框 ─── */
.lang-switch {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
}
.lang-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 30px 6px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.15s;
}
.lang-select:hover,
.lang-select:focus {
    border-color: var(--primary);
    outline: none;
}
.login-header h1 { font-size: 22px; font-weight: 700; color: var(--text); margin-top: 12px; margin-bottom: 6px; }
.login-header p { font-size: 14px; color: var(--text-muted); }

/* captcha row */
.captcha-row { display: flex; gap: 12px; align-items: stretch; }
.captcha-row .form-input { flex: 1; }
.captcha-img {
    width: 120px;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    object-fit: cover;
    flex-shrink: 0;
}

.login-footer { text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-muted); }
.login-footer a { color: var(--primary); font-weight: 500; }

/* ─── 登录弹窗 Tab 切换（短信登录 / 密码登录） ─── */
.login-dialog-tabs {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    margin-bottom: 12px;
    background: var(--bg, #f1f5f9);
    border-radius: 10px;
    padding: 4px;
}
.login-dialog-tab {
    flex: 1;
    border: none;
    background: none;
    border-radius: 8px;
    padding: 9px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    transition: all 0.15s;
}
.login-dialog-tab:hover { color: var(--text, #1e293b); }
.login-dialog-tab.active {
    background: var(--surface, #fff);
    color: var(--primary, #4f46e5);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 短信验证码行（输入框 + 发送按钮） */
.sms-code-row { display: flex; gap: 12px; align-items: stretch; }
.sms-code-row .form-input { flex: 1; }
.sms-send-btn {
    flex-shrink: 0;
    width: 120px;
    border: none;
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.sms-send-btn:hover { background: var(--border); }
.sms-send-btn:disabled {
    background: var(--bg);
    color: rgba(0, 0, 0, 0.7);
    opacity: 0.55;
    cursor: not-allowed;
}

/* 未注册手机号：绑定团队提示 */
.bind-hint {
    margin: -4px 0 18px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--primary, #4f46e5);
    background: color-mix(in srgb, var(--primary, #4f46e5) 8%, transparent);
    border-radius: 8px;
    padding: 8px 12px;
}

/* 已验证账号只读区块（第1步验证通过后展示，非input） */
.verified-account {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px dashed rgba(16, 185, 129, 0.4);
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
}
.verified-account svg {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    color: #10b981;
}
.verified-account .verified-label { white-space: nowrap; }
.verified-account .verified-value {
    font-weight: 600;
    font-size: 13px;
    color: var(--text, #1e293b);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Layer Dialog Custom Style ─── */
body .layui-layer-dialog.custom-dialog-style,
body .layui-layer-page.custom-dialog-style {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: none;
    min-width: 420px;
}
body .custom-dialog-style .layui-layer-title {
    background-color: var(--surface);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    padding: 0 30px;
    height: 72px;
    line-height: 72px;
}
body .custom-dialog-style .layui-layer-setwin {
    top: 30px; right: 30px;
}
body .custom-dialog-style .layui-layer-setwin .layui-layer-close2 {
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
}
body .custom-dialog-style .layui-layer-padding,
body .custom-dialog-style .layui-layer-content {
    padding: 0 30px 10px;
    font-size: 16px;
    color: var(--text);
    align-items: center;
    line-height: 1.5;
    overflow: visible;
}
body .custom-dialog-style.is-confirm .layui-layer-content {
    padding: 30px 30px 46px;
    text-align: center;
}
body .custom-dialog-style .layui-layer-btn {
    padding: 0 24px 24px;
    text-align: right;
    background: transparent;
}
body .custom-dialog-style.is-confirm .layui-layer-btn {
    text-align: center;
}
body .custom-dialog-style .layui-layer-btn a {
    height: 40px;
    line-height: 40px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 500;
    border: 0;
    border-radius: 8px;
    margin-left: 12px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}
body .custom-dialog-style .layui-layer-btn .layui-layer-btn0 {
    background-color: var(--bg);
    border-color: transparent;
    color: var(--text);
}
body .custom-dialog-style .layui-layer-btn .layui-layer-btn0:hover {
    background-color: var(--border);
    color: var(--text);
}
body .custom-dialog-style .layui-layer-btn .layui-layer-btn1 {
    background-color: var(--primary);
    border-color: transparent;
    color: #fff;
}
body .custom-dialog-style .layui-layer-btn .layui-layer-btn1:hover {
    opacity: 0.85;
    background-color: var(--primary);
    color: #fff;
}

@keyframes fadeInShade {
    0% { opacity: 0 !important; }
    100% { opacity: 0.5 !important; }
}

@media (max-width: 768px) {
    .layout { grid-template-columns: 1fr; padding: 20px 16px; }
    .sidebar { display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0; background: var(--bg); z-index: 40; padding: 20px; height: auto; }
    .sidebar.open { display: block; }
    .menu-btn { display: block; }
    .card { padding: 20px; }
    .stats-grid { grid-template-columns: 1fr; }
    .login-card { padding: 28px; }
}

/* ─── LayUI Form Select 样式覆盖（对齐 usage.html 自定义 input） ─── */
.filter-card.layui-form .layui-form-select {
    width: 100%;
}
.filter-card.layui-form .layui-select-title .layui-input {
    height: 44px;
    line-height: 44px;
    padding: 0 16px;
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}
.filter-card.layui-form .layui-select-title .layui-input:hover,
.filter-card.layui-form .layui-form-selected .layui-select-title .layui-input,
.filter-card.layui-form .layui-form-selectup .layui-select-title .layui-input,
.filter-card.layui-form .layui-select-title .layui-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.filter-card.layui-form .layui-form-select .layui-edge {
    top: 50%;
    margin-top: -3px;
    right: 12px;
    border-width: 5px;
}
.filter-card.layui-form .layui-form-select dl {
    top: 50px;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 4px 0;
    background: var(--surface);
}
.filter-card.layui-form .layui-form-select dl dd {
    color: var(--text);
    line-height: 36px;
    padding: 0 16px;
}
.filter-card.layui-form .layui-form-select dl dd:hover,
.filter-card.layui-form .layui-form-select dl dd.layui-this {
    background: var(--primary-light);
    color: var(--primary);
}

.layui-laydate .layui-this, .layui-laydate .layui-this>div {
    background-color: var(--primary) !important;
}
.layui-laydate-linkage .layui-laydate-content td.laydate-selected>div {
    background-color: var(--primary-light) !important;
}

.layui-laydate-content td.laydate-day-now:after {
    border-color: var(--primary) !important;
}

.layui-laydate-preview, .layui-laydate-preview:hover {
    color: #333 !important;
}
.layui-laydate-footer span:hover,
.layui-laydate-content td.laydate-day-now,
.layui-laydate-footer span[lay-type=date],
.laydate-set-ym span:hover
{
    color: var(--primary) !important;
}

/* ─── LayUI Laypage 分页样式覆盖 ─── */
.pagination .layui-laypage {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}
.pagination .layui-laypage a,
.pagination .layui-laypage span:not(.layui-laypage-skip):not(.layui-laypage-spr) {
    height: 36px !important;
    line-height: 36px !important;
    min-width: 20px;
    padding: 0 10px !important;
    background: #fff !important;
    color: var(--text-secondary) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    margin: 0 !important;
    text-align: center;
    transition: all 0.15s;
}
.pagination .layui-laypage a:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}
.pagination .layui-laypage .layui-laypage-curr {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}
.pagination .layui-laypage .layui-laypage-curr em {
    background: var(--primary) !important;
    color: #fff !important;
    border-radius: 8px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 14px !important;
}
.pagination .layui-laypage .layui-laypage-count {
    color: var(--text-secondary) !important;
    border: none !important;
    background: transparent !important;
    margin-right: 8px !important;
    padding: 0 !important;
}
.pagination .layui-laypage .layui-laypage-spr {
    border: none !important;
    background: transparent !important;
    color: var(--text-muted) !important;
    line-height: 36px !important;
    padding: 0 !important;
}
.pagination .layui-laypage .layui-laypage-skip {
    color: var(--text-secondary) !important;
    font-size: 14px !important;
    border: none !important;
    background: transparent !important;
    margin-left: 4px !important;
    line-height: 36px !important;
    padding: 0 !important;
}
.pagination .layui-laypage .layui-laypage-skip input {
    height: 36px;
    width: 48px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    margin: 0 4px;
    outline: none;
}
.pagination .layui-laypage .layui-laypage-skip input:focus {
    border-color: var(--primary);
}
.pagination .layui-laypage .layui-laypage-skip button {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 4px;
    transition: all 0.15s;
}
.pagination .layui-laypage .layui-laypage-skip button:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pagination .layui-laypage .layui-laypage-prev,
.pagination .layui-laypage .layui-laypage-next {
    padding: 0 12px !important;
}

.layui-form-radio:hover>*, .layui-form-radioed, .layui-form-radioed>i {
    color: var(--primary) !important;
}
.layui-form-onswitch {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ─── Dialog Form（弹窗表单通用样式） ─── */
.dialog-content {
    padding: 24px;
}
.form-item {
    margin-bottom: 16px;
}
.form-item-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-item-label .required {
    color: #dc2626;
}
.form-item .form-input {
    height: 44px;
    font-size: 14px;
}
.form-radio-group {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 44px;
}
.form-input-unit {
    position: relative;
}
.form-input-unit .form-input {
    padding-right: 40px;
}
.form-input-unit .unit-label {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--text-secondary);
}
.form-switch-group {
    display: flex;
    align-items: center;
    height: 44px;
}
/* ── 余额不足提醒 - 开关 ── */
.alert-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    vertical-align: middle;
    cursor: pointer;
}
.alert-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.alert-switch .slider {
    position: absolute;
    inset: 0;
    background: var(--border, #e2e8f0);
    border-radius: 24px;
    transition: background 0.25s;
}
.alert-switch .slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.alert-switch input:checked + .slider { background: var(--primary); }
.alert-switch input:checked + .slider:before { transform: translateX(20px); }
.alert-switch input:focus-visible + .slider { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ── 余额不足提醒 - 规则列表 ── */
.balance-rule-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.balance-rule-row .rule-type {
    width: 128px;
    flex-shrink: 0;
    height: 38px;
    padding: 0 8px;
    font-size: 13px;
}
.balance-rule-row .rule-value {
    flex: 1;
    min-width: 0;
    height: 38px;
}
.balance-rule-row .rule-unit {
    font-size: 13px;
    color: var(--text-secondary, #64748b);
    flex-shrink: 0;
    white-space: nowrap;
}
.balance-rule-row .rule-del {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
}
.balance-rule-row .rule-del:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.08);
}
.balance-add-rule {
    margin-top: 2px;
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity 0.2s;
}
.balance-add-rule:hover { opacity: 0.8; }

/* ── 登录弹窗 - 7天自动登录 ── */
.auto-login-group {
    margin-top: 12px;
    margin-bottom: 0;
}
.auto-login-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    user-select: none;
}
.auto-login-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}