:root {
    /* 科技蓝主色调 */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --primary-glow: rgba(37, 99, 235, 0.3);
    
    /* 背景色 */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.1);
    
    /* 文字色 */
    --text: #0f172a;
    --text-light: #f8fafc;
    --text-muted: #64748b;
    --text-muted-light: #94a3b8;
    
    /* 边框和线条 */
    --line: #e2e8f0;
    --line-light: rgba(255, 255, 255, 0.2);
    
    /* 状态色 */
    --good: #10b981;
    --bad: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.15);
    --shadow-primary: 0 4px 14px rgba(37, 99, 235, 0.4);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    background: url('../bj.png') no-repeat center center fixed;
    background-size: cover;
    line-height: 1.6;
}

/* ========== 登录/注册页面背景 ========== */
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* 动态背景效果 */
.auth-layout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    z-index: 0;
}

/* 网格背景 */
.auth-layout::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
}

/* 浮动装饰元素 */
.auth-layout .floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

.auth-layout .shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(6, 182, 212, 0.2));
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.auth-layout .shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(37, 99, 235, 0.15));
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.auth-layout .shape-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.1));
    top: 50%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

/* ========== 登录卡片 ========== */
.auth-card {
    width: min(440px, 100%);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: 
        var(--shadow-xl),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset,
        var(--shadow-glow);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-head {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: block;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 14px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.auth-head h1 {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.auth-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.auth-card > h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--text);
}

.auth-card > .muted {
    margin: 0 0 24px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ========== 表单样式 ========== */
.auth-form label {
    display: block;
    margin-bottom: 20px;
}

.auth-form span {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

/* 输入框样式 */
.auth-form input,
textarea,
input[type="text"],
input[type="password"],
input[type="tel"],
input[type="email"],
input[type="number"],
select {
    width: 100%;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: all 0.2s ease;
    outline: none;
}

.auth-form input::placeholder,
textarea::placeholder,
input::placeholder {
    color: var(--text-muted-light);
}

.auth-form input:hover,
textarea:hover,
input:hover,
select:hover {
    border-color: #cbd5e1;
}

.auth-form input:focus,
textarea:focus,
input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: #fff;
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: var(--radius);
    padding: 14px 24px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: var(--shadow-primary);
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    border: 2px solid var(--line);
    background: #fff;
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* ========== 提示信息 ========== */
.alert {
    border: 0;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid var(--bad);
}

.alert::before {
    content: '⚠';
    font-size: 18px;
}

.alert.success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    border-left-color: var(--good);
}

.alert.success::before {
    content: '✓';
}

.alert.info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    border-left-color: var(--primary);
}

.alert.info::before {
    content: 'ℹ';
}

/* ========== 底部链接 ========== */
.auth-foot {
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

.auth-foot a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-foot a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ========== 后台布局 ========== */
.app-shell {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    min-width: 260px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 0% 0%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

/* 侧边栏品牌区：logo 垂直排列在名称上方并居中 */
.brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.brand-block .brand-logo {
    width: 60px;
    height: 60px;
}

.brand-block .brand {
    justify-content: center;
}

.brand-text {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-sub {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 13px;
    position: relative;
    z-index: 1;
}

.menu {
    margin-top: 32px;
    position: relative;
    z-index: 1;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    padding: 14px 16px;
    margin-bottom: 4px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary-gradient);
    border-radius: 0 3px 3px 0;
    transition: height 0.2s ease;
}

.menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.menu a.active {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
}

.menu a.active::before {
    height: 24px;
}

/* 主内容区 */
.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: var(--shadow-sm);
}

.top-bar h1 {
    margin: 0;
    flex: 1;
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
}

.account-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-area .user-info {
    text-align: right;
}

.account-area .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.account-area .user-role {
    font-size: 12px;
    color: var(--text-muted);
}

.menu-toggle {
    display: none;
    border: 0;
    background: var(--bg-glass);
    border-radius: var(--radius);
    padding: 10px;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.page-content {
    padding: 24px;
    flex: 1;
}

/* ========== 卡片组件 ========== */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.section-head h2, .section-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.muted {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 16px;
}

/* ========== 表单网格 ========== */
.form-grid label {
    display: block;
    margin-bottom: 20px;
}

.form-grid span,
label span {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ========== 状态标签 ========== */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
}

.status-chip::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-chip.on {
    background: #d1fae5;
    color: #065f46;
}

.status-chip.on::before {
    background: var(--good);
    box-shadow: 0 0 8px var(--good);
}

.status-chip.off {
    background: #fee2e2;
    color: #991b1b;
}

.status-chip.off::before {
    background: var(--bad);
}

.status-chip.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-chip.pending::before {
    background: var(--warning);
}

/* ========== 进度条 ========== */
.simulation-card {
    margin-top: 20px;
}

.progress-track {
    width: 100%;
    height: 10px;
    border-radius: var(--radius-full);
    background: #e2e8f0;
    overflow: hidden;
    margin-top: 12px;
    position: relative;
}

.progress-track::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

#simulationProgress {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #10b981, #06b6d4);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

#simulationProgress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

#simulationLog {
    margin: 16px 0 0;
    padding-left: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ========== 支付弹窗 ========== */
.pay-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 30;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pay-overlay.show {
    display: flex;
}

.pay-modal {
    width: min(760px, 100%);
    border-radius: var(--radius-lg);
    padding: 28px;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pay-close {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-muted);
    transition: all 0.2s;
}

.pay-close:hover {
    background: #e2e8f0;
    color: var(--text);
}

.pay-table-wrap {
    overflow: auto;
    margin-top: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.pay-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.pay-table th,
.pay-table td {
    border: 1px solid var(--line);
    padding: 14px;
    text-align: center;
    font-size: 14px;
}

.pay-table th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 600;
    color: var(--text);
}

.pay-table tr:hover td {
    background: #f8fafc;
}

.qr-img {
    width: 160px;
    height: 160px;
    display: block;
    margin: 12px auto 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px;
    background: #fff;
}

/* ========== 表格样式 ========== */
.table-wrap {
    overflow: auto;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    font-size: 14px;
}

.table th,
.table td {
    text-align: left;
    padding: 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.table th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tr:hover td {
    background: #f8fafc;
}

.table tr:last-child td {
    border-bottom: 0;
}

/* ========== 行内表单 ========== */
.line-form {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.line-form select,
.line-form button {
    width: 100%;
}

.line-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0;
}

/* ========== 搜索表单 ========== */
.search-form {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.search-form input {
    width: min(320px, 100%);
}

/* ========== 键值网格 ========== */
.kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.kv-grid div {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius);
    padding: 16px;
    font-size: 14px;
    border: 1px solid var(--line);
    transition: all 0.2s;
}

.kv-grid div:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.kv-grid strong {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.kv-grid span {
    color: var(--text);
    font-weight: 600;
    font-size: 16px;
}

/* ========== 统计卡片 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.stat-card.primary::before { background: var(--primary-gradient); }
.stat-card.success::before { background: linear-gradient(180deg, #10b981, #059669); }
.stat-card.warning::before { background: linear-gradient(180deg, #f59e0b, #d97706); }
.stat-card.danger::before { background: linear-gradient(180deg, #ef4444, #dc2626); }

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.stat-change {
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
}

.stat-change.up { color: var(--good); }
.stat-change.down { color: var(--bad); }

/* ========== 响应式设计 ========== */
@media (max-width: 950px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        height: 100vh;
        z-index: 30;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .app-shell.menu-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        backdrop-filter: blur(4px);
        z-index: 25;
    }

    .two-col,
    .line-form {
        grid-template-columns: 1fr;
    }

    .search-form {
        flex-wrap: wrap;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .auth-head h1 {
        font-size: 26px;
    }

    .page-content {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 24px 20px;
    }

    .auth-head h1 {
        font-size: 22px;
    }
}

/* ========== 动画效果 ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.4s ease;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--line);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 徽章 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* ========== 版权页脚 ========== */
.auth-footer {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 13px;
    position: relative;
    z-index: 1;
}

/* ========== 欢迎引导 ========== */
.welcome-guide {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.welcome-step {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid var(--line);
    transition: all 0.2s;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
}

.welcome-step:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.welcome-step.active {
    border-color: var(--primary);
    background: #eff6ff;
}

.welcome-step .step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.welcome-step .step-num.done {
    background: linear-gradient(135deg, #10b981, #059669);
}

.welcome-step h4 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
}

.welcome-step p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* ========== 用户版本信息 ========== */
.user-plan-info {
    text-align: right;
    line-height: 1.5;
}

.user-plan-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.user-plan-tags {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
}

.plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.plan-badge.on {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2);
}

.plan-badge.off {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.15);
}

.plan-expire-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
}

/* ========== 联系客户经理页面 ========== */
.contact-card {
    text-align: center;
}

.contact-card .qr-img {
    width: 200px;
    height: 200px;
    margin: 16px auto;
}

.contact-card .contact-phone {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin: 12px 0;
}

/* ========== GEO 进度面板 ========== */
.geo-progress-panel {
    background: #f8fafc;
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--line);
    margin-top: 20px;
}

.geo-progress-panel .progress-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 14px;
}

.geo-progress-panel .progress-step .step-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.geo-progress-panel .progress-step .step-icon.done {
    background: #d1fae5;
    color: #065f46;
}

.geo-progress-panel .progress-step .step-icon.current {
    background: #dbeafe;
    color: #1e40af;
    animation: pulse 1.5s infinite;
}

.geo-progress-panel .progress-step .step-icon.pending {
    background: #f1f5f9;
    color: #94a3b8;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========== 行内客户信息表格 ========== */
.customer-row {
    display: grid;
    grid-template-columns: 2fr repeat(9, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.customer-row:hover {
    background: #f8fafc;
}

.customer-row-header {
    font-weight: 600;
    color: var(--text);
    background: #f1f5f9;
}

.action-cell {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 950px) {
    .welcome-guide {
        grid-template-columns: 1fr;
    }
    .customer-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* 分隔线 */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
    margin: 24px 0;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state-desc {
    font-size: 14px;
}

/* ========== 管理后台紧凑模式 ========== */
.admin-shell .sidebar {
    width: 200px;
    min-width: 200px;
    padding: 16px 12px;
}

.admin-shell .brand {
    font-size: 20px;
}

.admin-shell .brand-sub {
    font-size: 11px;
    margin-top: 2px;
}

.admin-shell .menu {
    margin-top: 16px;
}

.admin-shell .menu a {
    padding: 8px 12px;
    font-size: 13px;
    gap: 6px;
    margin-bottom: 2px;
}

.admin-shell .top-bar {
    height: 48px;
    padding: 0 16px;
    gap: 10px;
}

.admin-shell .top-bar h1 {
    font-size: 16px;
}

.admin-shell .page-content {
    padding: 12px 16px;
}

.admin-shell .card {
    padding: 14px 16px;
    margin-bottom: 10px;
    border-radius: var(--radius);
}

.admin-shell .card:hover {
    box-shadow: var(--shadow);
}

.admin-shell .section-head {
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.admin-shell .section-head h2,
.admin-shell .section-head h3,
.admin-shell .card h2,
.admin-shell .card h3 {
    font-size: 15px;
    margin: 0;
}

.admin-shell .form-grid label {
    margin-bottom: 10px;
}

.admin-shell .form-grid span,
.admin-shell label span {
    margin-bottom: 4px;
    font-size: 12px;
}

.admin-shell input,
.admin-shell textarea,
.admin-shell select {
    padding: 8px 10px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.admin-shell .two-col {
    gap: 10px;
}

.admin-shell .three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.admin-shell .btn {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.admin-shell .btn-small {
    padding: 4px 10px;
    font-size: 11px;
}

.admin-shell .muted {
    font-size: 12px;
    margin: 0 0 8px;
}

.admin-shell .table th,
.admin-shell .table td {
    padding: 6px 10px;
    font-size: 12px;
}

.admin-shell .table th {
    font-size: 11px;
}

.admin-shell .alert {
    padding: 8px 12px;
    font-size: 12px;
    margin-bottom: 10px;
}

.admin-shell .status-chip {
    padding: 3px 10px;
    font-size: 11px;
}

.admin-shell .search-form {
    margin-bottom: 10px;
    gap: 8px;
}

.admin-shell .search-form input {
    font-size: 13px;
    padding: 8px 10px;
}

.admin-shell .customer-row {
    padding: 6px 10px;
    font-size: 12px;
    gap: 8px;
}

.admin-shell .customer-row-header {
    font-size: 11px;
}

.admin-shell .agent-set-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.admin-shell .agent-set-row .card {
    flex: 1;
}

.admin-shell .admin-customer-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.admin-shell .admin-customer-form .full-width {
    grid-column: 1 / -1;
}
