/* ===== 全局重置与基础样式 ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #1a3a6e;
    --primary-dark: #122a52;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --text-light: #94a3b8;
    --bg-light: #f1f5f9;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
    --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; outline: none; }

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.navbar-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.navbar-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.navbar-nav a {
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 500;
    transition: color .2s;
}

.navbar-nav a:hover { color: var(--accent); }

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

.btn-login {
    background: none;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background .2s;
}

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

.btn-register {
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 8px;
    transition: background .2s;
}

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

.user-menu {
    position: relative;
    display: none;
}

.user-menu.active { display: flex; align-items: center; }

.user-email-btn {
    background: none;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .2s;
}

.user-email-btn:hover { background: var(--bg-light); }

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    overflow: hidden;
}

.user-dropdown.show { display: block; }

.user-dropdown a, .user-dropdown button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-dark);
    text-align: left;
    background: none;
    transition: background .15s;
}

.user-dropdown a:hover, .user-dropdown button:hover { background: var(--bg-light); }

.user-dropdown .divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* ===== 主内容区 ===== */
main { padding-top: 64px; }

/* ===== Hero 区域 ===== */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1a3a6e 100%);
    color: #fff;
    padding: 100px 24px 80px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero h1 span { color: #60a5fa; }

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.8);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-download {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all .2s;
}

.btn-download:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.7);
}

/* ===== 功能区域 ===== */
.features {
    padding: 80px 24px;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 56px;
}

.features-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}

.feature-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.7;
}

/* ===== 定价区域 ===== */
.pricing {
    padding: 80px 24px;
    background: var(--bg-white);
}

.pricing-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: start;
}

.plan-card {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 36px 28px;
    text-align: center;
    transition: all .2s;
    position: relative;
}

.plan-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}

.plan-card.featured {
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(26,58,110,0.15);
    transform: scale(1.04);
}

.plan-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.plan-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 16px;
}

.plan-price {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 4px;
}

.plan-price sup {
    font-size: 1.4rem;
    vertical-align: top;
    margin-top: 8px;
    display: inline-block;
}

.plan-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-gray);
}

.plan-saving {
    font-size: 0.85rem;
    color: var(--success);
    font-weight: 600;
    margin-bottom: 24px;
    min-height: 20px;
}

.plan-features {
    list-style: none;
    margin-bottom: 28px;
    text-align: left;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--bg-light);
}

.plan-features li:last-child { border-bottom: none; }

.plan-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

.btn-buy {
    width: 100%;
    background: var(--primary);
    color: #fff;
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    transition: background .2s, transform .1s;
}

.btn-buy:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.plan-card.featured .btn-buy {
    background: linear-gradient(135deg, #1a3a6e, #2563eb);
}

/* ===== 下载区域 ===== */
.downloads {
    padding: 80px 24px;
    background: var(--bg-light);
}

.download-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.download-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 36px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
}

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.download-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.download-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.download-card p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.btn-dl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background .2s;
    border: none;
    cursor: pointer;
}

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

/* ===== CTA 区域 ===== */
.cta {
    padding: 80px 24px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    text-align: center;
    color: #fff;
}

.cta h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.cta p {
    font-size: 1rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-cta {
    background: #fff;
    color: var(--primary);
    padding: 14px 36px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    transition: all .2s;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-cta:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* ===== 页脚 ===== */
footer {
    background: #0f172a;
    color: rgba(255,255,255,0.6);
    padding: 40px 24px;
    text-align: center;
}

footer p { font-size: 0.9rem; margin-bottom: 12px; }

.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    transition: color .2s;
}

.footer-links a:hover { color: #fff; }

/* ===== 模态框 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: #fff;
    border-radius: 16px;
    padding: 36px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    position: relative;
    animation: modalIn .2s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    color: var(--text-gray);
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.modal-close:hover { background: var(--bg-light); }

.modal h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.modal-link {
    text-align: right;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.modal-link a {
    color: var(--accent);
    font-weight: 600;
}

.modal-link a:hover { text-decoration: underline; }

/* 表单样式 */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #fff;
    transition: border-color .2s;
    outline: none;
}

.form-control:focus { border-color: var(--accent); }
.form-control.error { border-color: var(--error); }

.btn-submit {
    width: 100%;
    background: var(--primary);
    color: #fff;
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 8px;
    transition: background .2s;
}

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

.btn-cancel {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    transition: background .2s;
}

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

.modal-footer-btns {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.modal-footer-btns .btn-cancel,
.modal-footer-btns .btn-submit {
    flex: 1;
    margin-top: 0;
}

/* 消息提示 */
.msg-box {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 14px;
    display: none;
}

.msg-box.error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; display: block; }
.msg-box.success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; display: block; }

/* ===== 数量控件 ===== */
.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

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

/* ===== 支付模态框 ===== */
.payment-modal { max-width: 520px; }

.order-summary {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.95rem;
}

.order-summary-row .label { color: var(--text-gray); }
.order-summary-row .value { font-weight: 600; color: var(--text-dark); }
.order-summary-row .price { font-size: 1.3rem; font-weight: 800; color: var(--primary); }

.payment-methods { margin-bottom: 20px; }

.payment-methods h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.payment-method-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all .2s;
}

.payment-method-option:hover { border-color: var(--accent); background: #eff6ff; }
.payment-method-option.selected { border-color: var(--accent); background: #eff6ff; }

.payment-method-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.payment-method-icon { font-size: 24px; width: 36px; text-align: center; }
.payment-method-name { font-size: 0.95rem; font-weight: 600; color: var(--text-dark); }

/* ===== QR码支付页面 ===== */
.qr-modal { max-width: 480px; text-align: center; }

.qr-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.qr-header .qr-icon { font-size: 28px; }
.qr-header h2 { margin: 0; font-size: 1.2rem; }

.qr-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.qr-amount sup {
    font-size: 1.2rem;
    vertical-align: top;
    margin-top: 10px;
    display: inline-block;
}

.qr-image-wrap {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border: 3px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
}

.qr-image-wrap img { width: 100%; height: 100%; object-fit: contain; }

.qr-hint { font-size: 0.9rem; color: var(--text-gray); margin-bottom: 24px; }

.qr-order-info {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 24px;
    text-align: left;
}

.qr-order-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 4px 0;
    color: var(--text-gray);
}

.qr-order-row span:last-child { color: var(--text-dark); font-weight: 500; }

.qr-submit-section { text-align: left; }

.qr-submit-section label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

/* ===== 用户中心 ===== */
.user-center {
    min-height: calc(100vh - 64px);
    background: var(--bg-light);
    padding: 40px 24px;
}

.user-center-inner {
    max-width: 900px;
    margin: 0 auto;
}

.user-center-header { margin-bottom: 32px; }

.user-center-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.user-center-header p { font-size: 0.9rem; color: var(--text-gray); }

.user-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.user-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* 订单表格 */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.orders-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--bg-light);
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.85rem;
}

.orders-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dark);
}

.orders-table tr:last-child td { border-bottom: none; }

.order-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.order-status.paid      { background: #dcfce7; color: #16a34a; }
.order-status.pending   { background: #fef9c3; color: #ca8a04; }
.order-status.failed    { background: #fee2e2; color: #dc2626; }
.order-status.cancelled { background: #f1f5f9; color: #64748b; }

.empty-orders {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-gray);
}

.empty-orders .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-orders p { font-size: 0.95rem; }

/* ===== 成功提示 ===== */
.success-modal { text-align: center; max-width: 400px; }

.success-icon {
    width: 72px;
    height: 72px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
}

.success-modal h2 { margin-bottom: 10px; }
.success-modal p { color: var(--text-gray); font-size: 0.95rem; margin-bottom: 24px; }

/* ===== 管理后台 ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: #0f172a;
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.admin-sidebar-logo {
    padding: 24px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-sidebar-nav {
    padding: 16px 0;
    flex: 1;
}

.admin-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all .15s;
    text-decoration: none;
}

.admin-sidebar-nav a:hover,
.admin-sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.admin-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

.admin-main {
    flex: 1;
    background: #f8fafc;
    overflow-x: hidden;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-topbar h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.admin-content { padding: 32px; }

.admin-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.admin-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.stat-card.green  { border-left-color: var(--success); }
.stat-card.yellow { border-left-color: var(--warning); }
.stat-card.red    { border-left-color: var(--error); }

.stat-label { font-size: 0.85rem; color: var(--text-gray); margin-bottom: 6px; }
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--text-dark); }

/* 管理表格 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--bg-light);
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dark);
    vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f8fafc; }

.user-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.user-status-badge.active   { background: #dcfce7; color: #16a34a; }
.user-status-badge.disabled { background: #fee2e2; color: #dc2626; }

.btn-sm {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .15s;
}

.btn-sm.enable  { background: #dcfce7; color: #16a34a; }
.btn-sm.enable:hover  { background: #bbf7d0; }
.btn-sm.disable { background: #fee2e2; color: #dc2626; }
.btn-sm.disable:hover { background: #fecaca; }

/* 管理员登录页 */
.admin-login-wrap {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-login-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.admin-login-box h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.admin-login-box p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 28px;
}

/* 搜索框 */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color .2s;
}

.search-bar input:focus { border-color: var(--accent); }

.search-bar button {
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background .2s;
}

.search-bar button:hover { background: var(--primary-dark); }

/* 分页 */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--text-dark);
    transition: all .15s;
    text-decoration: none;
}

.pagination a:hover { background: var(--bg-light); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .navbar-nav { display: none; }
    .pricing-grid { grid-template-columns: 1fr; }
    .plan-card.featured { transform: none; }
    .orders-table { font-size: 0.8rem; }
    .orders-table th, .orders-table td { padding: 10px 8px; }
    .admin-sidebar { display: none; }
    .admin-content { padding: 16px; }
}

/* ===== 加载动画 ===== */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn-submit:disabled, .btn-buy:disabled { opacity: 0.7; cursor: not-allowed; }

/* 返回链接 */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
    transition: color .2s;
    text-decoration: none;
}

.back-link:hover { color: var(--accent-hover); }
