/* 2026 SaaS UI - Final Fixed Version (完整无损版) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ★★★ 核心修复1：全局盒模型 (解决页面偏右/撑破问题) ★★★ */
* {
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-body: #f9fafb;
    --bg-card: #ffffff;
    --bg-hover: #f3f4f6;
    --bg-input: #f9fafb;
    --text-main: #111827;
    --text-sub: #6b7280;
    --border-color: #e5e7eb;
    --nav-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

body.dark-theme {
    --bg-body: #000000;
    --bg-card: #141414;
    --bg-hover: #27272a;
    --bg-input: #27272a;
    --text-main: #f9fafb;
    --text-sub: #9ca3af;
    --border-color: #27272a;
    --nav-bg: #141414;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding-top: 64px;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ================= 导航栏 (Navbar) ================= */
.navbar {
    background: var(--nav-bg);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.nav-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 8px;
    margin-left: 40px;
    align-items: center;
}

.nav-link {
    color: var(--text-sub);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
    background-color: var(--bg-hover);
    font-weight: 600;
}

body.dark-theme .nav-link:hover,
body.dark-theme .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle-btn {
    cursor: pointer;
    color: var(--text-sub);
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
    background: var(--bg-hover);
}

.theme-toggle-btn:hover {
    color: var(--primary);
    background: var(--border-color);
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 14px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0px solid var(--border-color);
    object-fit: cover;
}

.dropdown-menu {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 2000;
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-item {
    padding: 10px 15px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

/* =============================================================
   ★★★ 核心布局 (Layout) ★★★ 
   ============================================================= */

/* 1. 双栏布局 (index.php) */
.layout-container {
    display: flex;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    gap: 25px;
    align-items: flex-start;
}

.sidebar-wrapper {
    width: 260px;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. 全宽布局 (shop.php, contact.php, home.php) */
.main-container {
    display: block;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.content-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}


/* 侧边栏遮罩 (手机端用) */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* 侧边栏补充导航 (手机端显示) */
.mobile-only-nav {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.mobile-nav-title {
    padding: 0 16px 5px;
    font-size: 12px;
    color: var(--text-sub);
    font-weight: 700;
    opacity: 0.7;
}

/* 卡片 */
.sidebar-card,
.panel-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.panel-header {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 侧边菜单 */
.user-mini-profile {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.user-mini-info div {
    font-weight: 700;
    color: var(--text-main);
}

.user-mini-info small {
    color: var(--text-sub);
    font-size: 12px;
}

.side-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.side-item {
    padding: 12px 15px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
    font-weight: 500;
}

.side-item:hover {
    background: var(--bg-hover);
}

.side-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

/* --- 输入框 --- */
.form-input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    outline: none;
    box-sizing: border-box;
    transition: 0.2s;
    font-size: 14px;
}

.form-input:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input:read-only {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--bg-hover);
}

/* --- 表格 --- */
.table-responsive {
    overflow-x: auto;
    margin: 0 0px;
    padding: 0 0px;
    width: calc(100% + 0px);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    white-space: nowrap;
}

.modern-table th {
    text-align: left;
    color: var(--text-sub);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 13px;
    background: var(--bg-hover);
    text-align: center;
}

.modern-table td {
    text-align: center !important;
    padding: 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

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

.empty-state {
    text-align: center;
    padding: 60px 0 !important;
    color: var(--text-sub);
    font-size: 14px;
    background-image: radial-gradient(circle at center, var(--bg-hover) 0%, transparent 70%);
}

/* --- 商店专用样式 --- */
.shop-intro-box {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
}

.shop-intro-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.shop-intro-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    line-height: 2;
    color: var(--text-sub);
}

.pkg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.pkg-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
    padding: 10px !important;
}

.pkg-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.pkg-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-hover);
}

.pkg-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
}

.pkg-tabs {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 15px;
}

.pkg-tab {
    padding: 5px 10px;
    font-size: 12px;
    color: var(--text-sub);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    transition: 0.2s;
}

.pkg-tab:hover {
    border-color: var(--primary);
    color: var(--text-main);
}

.pkg-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pkg-price-area {
    text-align: center;
    padding: 10px 0 20px;
}

.pkg-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

.pkg-limit {
    font-size: 12px;
    color: var(--text-sub);
}

.pkg-features {
    padding: 20px;
    background: var(--bg-hover);
    flex: 1;
    border-top: 1px solid var(--border-color);
}

.pkg-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-sub);
}

.pkg-val {
    color: var(--text-main);
    font-weight: 600;
}

.pkg-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.pkg-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.pkg-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* --- 通用按钮 & 布局 --- */
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

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

.btn-light {
    background: var(--bg-hover);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

/* 资料页 */
.profile-section {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.profile-avatar-col {
    flex: 0 0 120px;
    text-align: center;
}

.profile-form-col {
    flex: 1;
}

.avatar-wrapper {
    width: 120px;
    height: 120px;
    position: relative;
    margin-bottom: 15px;
}

.avatar-lg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.avatar-edit-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid var(--bg-card);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group label,
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sub);
    margin-bottom: 8px;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

/* 安全设置 */
.security-form-box {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.security-form-box label {
    display: block;
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 8px;
}

.security-input {
    background: var(--bg-hover);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

/* --- 修复弹窗 --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-box {
    background: var(--bg-card);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeIn 0.3s;
}

/* ================== Summernote 弹窗修复 ================== */
.note-modal-content {
    position: relative;
    margin: 10% auto;
}

body.dark-theme .note-modal-content {
    background-color: #1f2937 !important;
    border: 1px solid #374151 !important;
    color: #f3f4f6 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .note-modal-header {
    border-bottom: 1px solid #374151 !important;
    background-color: #111827 !important;
    color: #fff !important;
}

body.dark-theme .note-modal-footer {
    border-top: 1px solid #374151 !important;
    background-color: #1f2937 !important;
    color: #333;
}

body.dark-theme .note-form-group input[type="text"],
body.dark-theme .note-form-group input[type="file"],
body.dark-theme .note-form-group .form-control {
    background-color: #111827 !important;
    border: 1px solid #4b5563 !important;
    color: #fff !important;
}

body.dark-theme .close {
    color: #fff !important;
    opacity: 0.8;
    text-shadow: none;
}

body.dark-theme .close:hover {
    opacity: 1;
}

body.dark-theme .btn-default {
    background-color: #374151 !important;
    color: #fff !important;
    border: 1px solid #4b5563 !important;
}

.note-modal-backdrop {
    z-index: 1040 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.note-modal {
    z-index: 1050 !important;
}

/* ================== SweetAlert2 黑夜模式强力覆盖 ================== */
body.dark-theme .swal2-popup {
    background: #141414 !important;
    color: #f9fafb !important;
    border: 1px solid #27272a !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
}

body.dark-theme .swal2-title {
    color: #f9fafb !important;
}

body.dark-theme .swal2-content,
body.dark-theme .swal2-html-container {
    color: #9ca3af !important;
}

body.dark-theme .swal2-confirm {
    background-color: #6366f1 !important;
    box-shadow: 0 0 0 0 transparent !important;
}

body.dark-theme .swal2-cancel {
    background-color: #27272a !important;
    color: #fff !important;
}

body.dark-theme .swal2-cancel:hover {
    background-color: #3f3f46 !important;
}

body.dark-theme .swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

/* ================================================================= */
/* ★★★ Tab面板切换样式 (Tab Panel System) ★★★ */
/* ================================================================= */

/* 默认隐藏所有tab面板 */
.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

/* 显示激活的tab面板 */
.tab-panel.active {
    display: block;
}

/* Tab切换淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================================= */
/* ★★★ 用户中心专用样式 (User Center) ★★★ */
/* ================================================================= */

/* 仪表盘网格布局 - 垂直排列 */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
    width: 100%;
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    background: var(--bg-hover);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-color: #6366f1;
}

.pc-title {
    font-weight: bold;
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.pc-price {
    color: #6366f1;
    font-weight: 700;
}

.pc-info {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.6;
}

.pc-status {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 10px;
    font-weight: 500;
}

.pc-status.expired {
    background: #f3f4f6;
    color: #9ca3af;
}

.pc-status.pending {
    background: #dbeafe;
    color: #1e40af;
}

/* 按钮样式 */
.btn-view {
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-pay {
    background: #6366f1;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
    text-decoration: none;
    display: inline-block;
}

.btn-bal {
    background: #10b981;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.btn-bal:hover {
    background: #059669;
}

.btn-disabled {
    background: #cbd5e1;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
}

/* 分页条 */
.pagination-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    margin: 0 2px;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--bg-input);
}

/* 资料页面布局 */
.profile-layout-new {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    max-width: 460px;
    margin: 20px auto;
    padding-top: 10px;
}

.profile-left {
    width: 120px;
    text-align: center;
    flex-shrink: 0;
}

.profile-right {
    flex: 1;
    min-width: 0;
}

.avatar-box {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #f1f5f9;
    margin: 0 auto;
    position: relative;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-hint {
    margin-top: 20px;
    font-size: 12px;
    color: #ef4444;
    background: #fef2f2;
    padding: 10px;
    border-radius: 8px;
    text-align: left;
    border: 1px solid #fee2e2;
    line-height: 1.5;
}

.profile-form-container {
    max-width: 460px;
    margin: 30px auto;
    padding: 0;
}

/* 钱包资产卡片 */
.balance-card {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    padding: 30px;
    border-radius: 16px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
}

.balance-val {
    font-size: 36px;
    font-weight: 800;
    margin-top: 5px;
}

.btn-wallet {
    padding: 10px 25px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-w-add {
    background: #fff;
    color: #6366f1;
}

.btn-w-out {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    margin-left: 10px;
    backdrop-filter: blur(5px);
}

/* 支付方式网格 */
.pay-methods-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
}

.pay-item {
    padding: 15px;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.2s;
    font-weight: 600;
    color: #475569;
}

.pay-item:hover,
.pay-item.active {
    border-color: #6366f1;
    background: #eef2ff;
    color: #6366f1;
}

.pay-item i {
    font-size: 24px;
}

/* 徽章样式 */
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* SweetAlert2弹窗美化 */
.swal2-container {
    z-index: 99999 !important;
}

.swal2-popup {
    border-radius: 20px !important;
    padding: 25px !important;
}

.swal2-input::placeholder {
    color: #cbd5e1 !important;
    opacity: 1;
    font-weight: normal;
}

/* ================================================================= */
/* ★★★ 商城弹窗样式 (Shop Modal) ★★★ */
/* ================================================================= */

/* 弹窗头部 - 关键:使用flex让关闭按钮居右 */
.modal-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
}

.close-btn {
    cursor: pointer;
    font-size: 24px;
    color: #999;
}

.close-btn:hover {
    color: var(--text-main);
}

/* 订单摘要 */
.order-summary {
    background: var(--bg-hover);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-sub);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.total-price {
    color: var(--primary);
    font-size: 20px;
}

/* 支付方式选择器(商城专用) */
.pay-channels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.pay-channels .pay-item {
    /* 作为label标签,需要有基础样式 */
    display: block;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;

    /* 默认边框和背景(可被HTML内联样式覆盖) */
    border: 1px solid #e5e7eb;
    background: #fff;
}

.pay-channels .pay-item input {
    display: none;
}

.pay-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    color: var(--text-main);
    font-weight: 500;
    /* 不要设置边框和背景,在pay-item上控制 */
}

/* 选中状态 - HTML内联样式已控制边框和背景,这里只控制文字颜色 */
.pay-channels .pay-item input:checked+.pay-label {
    color: var(--primary);
}

/* 悬停效果 */
.pay-channels .pay-item:hover {
    opacity: 0.9;
}

/* 弹窗按钮 */
.btn-confirm {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

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

.btn-confirm:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 支付状态操作按钮 */
.status-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-help {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-sub);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: 0.2s;
}

.btn-help:hover {
    background: var(--bg-hover);
    border-color: #ccc;
    color: var(--text-main);
}

.btn-success {
    flex: 1;
    background: #10b981;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: 0.2s;
}

.btn-success:hover {
    background: #059669;
}

/* 夜间模式适配 */
/* 商城弹窗在夜间模式下保持白色背景,不变暗 */
/* body.dark-theme .modal-box - 已删除,弹窗保持亮色 */

/* 夜间模式下支付方式选项文字颜色修复 */
body.dark-theme .pay-item {
    color: #1e293b;
    background: #ffffff;
    border-color: #e2e8f0;
}

body.dark-theme .pay-item:hover,
body.dark-theme .pay-item.active {
    border-color: #6366f1;
    background: #eef2ff;
    color: #6366f1;
}

/* 商店支付方式样式 - 垂直单列布局 */
.pay-channels {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.pay-item {
    position: relative;
}

.pay-item input[type="radio"] {
    display: none;
}

.pay-label {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s;
    color: #4b5563;
    font-weight: 500;
    background: #ffffff;
    position: relative;
}

/* 添加自定义单选按钮圆圈 */
.pay-label::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.2s;
    background: #ffffff;
}

/* 添加选中后的圆点 */
.pay-item input[type="radio"]:checked+.pay-label::before {
    border-color: #4f46e5;
    background: #4f46e5;
    box-shadow: inset 0 0 0 3px #ffffff;
}

.pay-item input[type="radio"]:checked+.pay-label {
    border-color: #4f46e5;
    background: #eef2ff;
    color: #4f46e5;
}

.pay-label i {
    font-size: 20px;
    flex-shrink: 0;
}

/* 订阅信息盒子 */
.sub-info-box {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.sub-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 15px;
}

.sub-label {
    color: #64748b;
    font-size: 13px;
}

.sub-val {
    font-weight: 600;
    color: #334155;
}

.sub-link-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    word-break: break-all;
    font-family: monospace;
    color: #6366f1;
    margin-bottom: 15px;
}

/* ================================================================= */
/* ★★★ 首页仪表盘专用样式 (Home Dashboard) ★★★ */
/* ================================================================= */

.home-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 25px;
    align-items: start;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
    margin-bottom: 15px;
}

.download-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    padding: 25px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    height: 110px;
}

.download-item i {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--text-sub);
    transition: 0.2s;
}

.download-item span {
    font-size: 13px;
    font-weight: 600;
}

.download-item:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.download-item:hover i {
    color: var(--primary);
}

.contact-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-btn {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border-radius: 12px;
    color: #fff !important;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1);
}

.contact-btn i {
    font-size: 28px;
    margin-right: 15px;
    opacity: 0.9;
}

.cb-content {
    display: flex;
    flex-direction: column;
}

.cb-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.cb-desc {
    font-size: 11px;
    opacity: 0.85;
    font-weight: 400;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-ticket {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-online {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.announcement-list {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-main);
}

.ann-item {
    margin-bottom: 12px;
    position: relative;
}

.ann-link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
}

.ann-link:hover {
    border-bottom-style: solid;
}

.backup-links {
    margin-top: 20px;
    background: var(--bg-hover);
    padding: 15px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-sub);
}

.backup-links div {
    margin-bottom: 5px;
}

.backup-links a {
    color: var(--text-sub);
    text-decoration: none;
    font-family: monospace;
}

.backup-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.invite-link-box {
    background: var(--bg-hover) !important;
    /* 自动变深灰 */
    border: 1px solid var(--border-color) !important;
    /* 自动变深色边框 */
    color: var(--text-sub) !important;
    /* 文字自动变灰白 */

    /* 保持原有布局 */
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    word-break: break-all;
}

/* ★★★ 修复：钱包提现说明的夜间模式适配 ★★★ */
.wallet-notice {
    background: var(--bg-hover);
    /* 自动适配背景色 */
    border: 1px solid var(--border-color);
    /* 自动适配边框 */
    color: var(--text-sub);
    /* 自动适配文字颜色 */
    padding: 20px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.8;
}

/* =========================================================
   ★★★ 手机端 App 风格适配 (核心修改) ★★★
   ========================================================= */
@media (max-width: 768px) {

    /* 1. 基础重置 */
    body {
        min-width: 100%;
        padding-top: 64px;
        overflow-x: hidden;
    }

    /* 2. 导航栏 */
    .navbar {
        padding: 0 15px;
        height: 64px;
    }

    .nav-links {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: block !important;
    }

    .nav-logo {
        display: none !important;
    }

    .user-dropdown-btn span {
        display: none;
    }

    /* 3. 首页(Index) 布局调整：侧边栏变抽屉，内容全宽 */
    .layout-container {
        display: block;
        padding: 15px;
        margin: 0;
    }

    /* ★★★ 修复：手机端资产卡片挤压问题 ★★★ */
    .balance-card {
        flex-direction: column !important;
        /* 强制垂直排列 */
        align-items: flex-start !important;
        /* 文字左对齐 */
    }

    /* 选中包含按钮的那个 div */
    .balance-card>div:last-child {
        width: 100%;
        /* 占满宽度 */
        margin-top: 15px;
        /* 与上方金额拉开距离 */
        display: flex;
        /* 弹性布局 */
        gap: 10px;
        /* 按钮之间的间距 */
    }

    /* 按钮样式调整 */
    .btn-wallet {
        flex: 1;
        /* 让两个按钮平分宽度，一样大 */
        display: flex;
        /* 确保文字居中 */
        justify-content: center;
        padding: 12px 0 !important;
        /* 增加高度更易点击 */
    }

    /* 去掉提现按钮原有的左边距，改用 gap 控制 */
    .btn-w-out {
        margin-left: 0 !important;
    }

    /* ★★★ 侧边栏：抽屉式设计 ★★★ */
    .sidebar-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100%;
        background: var(--bg-card);
        z-index: 2001;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
        padding: 0;
        overflow-y: auto;
    }

    .sidebar-wrapper.show-sidebar {
        transform: translateX(0);
    }

    /* 内容区域：占满屏幕 */
    .content-area {
        width: 100%;
        min-width: 100%;
    }

    /* 4. 显示侧边栏里的补充导航 */
    .mobile-only-nav {
        display: block !important;
    }

    /* 5. 全宽页面适配 */
    .main-container {
        padding: 15px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 6. 组件适配 */
    .contact-grid,
    .pkg-grid,
    .home-layout,
    .download-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .table-responsive {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modern-table th,
    .modern-table td {
        white-space: nowrap;
        padding: 12px 10px;
    }

    .panel-card {
        padding: 20px !important;
    }

    /* ★★★ 修复2：仪表盘网格改为垂直布局 ★★★ */
    .dashboard-grid {
        display: grid;
        grid-template-columns: 1fr;
        /* 垂直排列，一上一下 */
        gap: 20px;
        align-items: start;
        /* 顶部对齐 */
        width: 100%;
    }

    /* ★★★ 修复3：手机端状态徽章改为纯文字 (解决图1文字挤压) ★★★ */
    .badge {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        font-weight: bold !important;
        /* 字体加粗更清晰 */
        font-size: 13px !important;
        white-space: nowrap !important;
    }

    .product-card {
        transition: transform 0.1s ease, border-color 0.1s ease;
        /* 动画速度加快，反应更灵敏 */
    }

    /* 当手指按住卡片时 */
    .product-card:active {
        transform: scale(0.98);
        /* 整体轻微缩小，模拟按压感 */
        border-color: var(--primary);
        /* 边框变亮 */
        background-color: var(--bg-hover);
        /* 背景微变 */
        box-shadow: none;
        /* 按下时去除阴影，显得更贴合平面 */
    }



    /* 2. 禁止横向滚动，强制内容在屏幕内显示 */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: hidden !important;
    }

    /* 3. 表格样式重置 */
    .modern-table {
        width: 100%;
        table-layout: fixed;
        /* 固定布局，防止撑破屏幕 */
    }

    /* 4. 单元格核心样式：换行 + 居中 */
    .modern-table th,
    .modern-table td {
        white-space: normal !important;
        /* 允许文字换行 */
        word-break: break-all !important;
        /* 强制长单词(如IP)换行 */
        text-align: center !important;
        /* ★★★ 文字居中 ★★★ */
        font-size: 12px !important;
        /* 缩小字号，容纳更多内容 */
        padding: 8px 2px !important;
        /* 减小内边距 */
        height: auto !important;
        /* 高度自适应 */
    }

    /* 针对“最近订单”卡片的特殊微调，防止卡片模式干扰 */
    .order-table tr {
        display: table-row !important;
        /* 恢复为表格行显示 */
        border: none !important;
        background: transparent !important;
        margin-bottom: 0 !important;
    }

    .order-table td {
        display: table-cell !important;
        /* 恢复为单元格显示 */
        border-bottom: 1px solid var(--border-color) !important;
    }

    /* 隐藏之前可能加的 data-label */
    .order-table td::before {
        content: none !important;
    }

}

/* ★★★ 电脑端隐藏“手机专用侧边栏” ★★★ */
@media (min-width: 769px) {
    .sidebar-mobile-only {
        display: none !important;
    }
}

/* ================================================================
   ★★★ 工单系统专用样式 (Tickets) ★★★
   ================================================================ */
.badge-yellow {
    background: #fffbeb;
    color: #b45309;
}

.badge-green {
    background: #ecfdf5;
    color: #047857;
}

.badge-gray {
    background: #f3f4f6;
    color: #6b7280;
}

.reply-section {
    margin-top: 20px;
    border-top: 1px dashed #eee;
    padding-top: 15px;
}

.reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.btn-send {
    background: #4f46e5;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-send:hover {
    background: #4338ca;
}

.btn-close-ticket {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-close-ticket:hover {
    background: #059669;
}

.note-editor {
    border-radius: 8px;
    border: 1px solid #ddd;
}

.note-toolbar {
    border-radius: 8px 8px 0 0;
}

.title-col {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: #374151;
    display: block;
}

.page-info {
    font-size: 13px;
    color: var(--text-sub);
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.limit-select {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-main);
    background: var(--bg-card);
    outline: none;
    cursor: pointer;
}

.limit-select:focus {
    border-color: var(--primary);
}

/* Summernote编辑器夜间模式补丁 */
body.dark-theme .note-editor .note-editing-area .note-editable {
    background-color: var(--bg-input, #27272a);
    color: #ffffff !important;
}

body.dark-theme .note-toolbar {
    background-color: var(--bg-hover, #27272a) !important;
    border-bottom: 1px solid var(--border-color, #3f3f46) !important;
}

body.dark-theme .note-btn {
    background-color: var(--bg-card, #141414) !important;
    color: #e5e7eb !important;
    border: 1px solid var(--border-color, #3f3f46) !important;
}

body.dark-theme .note-btn:hover {
    background-color: var(--primary, #6366f1) !important;
    color: #ffffff !important;
}

body.dark-theme .note-placeholder {
    color: #6b7280 !important;
}

/* 手机端工单表格卡片化 */
@media (max-width: 768px) {
    .note-statusbar {
        display: none !important;
    }

    .hide-on-mobile {
        display: none !important;
    }

    .mobile-card-table thead {
        display: none !important;
    }

    .mobile-card-table tr {
        display: block;
        margin-bottom: 15px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }

    .mobile-card-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px dashed var(--border-color) !important;
        padding: 10px 0 !important;
        font-size: 14px;
        text-align: right;
        min-height: 35px;
    }

    .mobile-card-table td:last-child {
        border-bottom: none !important;
    }

    .mobile-card-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--text-sub);
        margin-right: 15px;
        flex-shrink: 0;
        text-align: left;
    }

    .mobile-card-table td>* {
        text-align: right;
        word-break: break-all;
        white-space: normal;
    }

    .title-col {
        max-width: 200px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
        vertical-align: middle;
    }
}

/* ================================================================
   ★★★ 商店专用样式 (Shop) ★★★
   ================================================================ */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* ================================================================
   ★★★ 联系页面专用样式 (Contact) ★★★
   ================================================================ */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.contact-card {
    background: var(--bg-card);
    padding: 35px 25px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.icon-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 36px;
    transition: 0.3s;
}

.contact-card:hover .icon-box {
    background: var(--primary);
    color: #fff !important;
}

.cc-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
}

.cc-desc {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 20px;
    min-height: 20px;
}

.cc-btn {
    padding: 10px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
    display: inline-block;
    width: 80%;
}

@media (max-width: 768px) {
    .contact-card {
        padding: 25px 15px;
    }

    .cc-btn {
        width: 100%;
    }
}

/* ================================================================= */
/* ★★★ Shop 页面专用样式 (从 backup/shop.php 迁移) ★★★ */
/* ================================================================= */

/* 输入框样式 - 隐藏数字输入框箭头 */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* 弹窗头部样式（新增） */
.modal-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    cursor: pointer;
    font-size: 24px;
    color: #999;
}

/* 订单摘要样式 */
.order-summary {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    color: #666;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.total-price {
    color: #4f46e5;
    font-size: 20px;
}

/* 支付通道样式 */
.pay-channels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.pay-item {
    position: relative;
}

.pay-item input {
    display: none;
}

.pay-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: 0.2s;
    color: #4b5563;
    font-weight: 500;
}

.pay-item input:checked+.pay-label {
    border-color: #4f46e5;
    background: #e0e7ff;
    color: #4f46e5;
}

/* 确认按钮 */
.btn-confirm {
    width: 100%;
    background: #4f46e5;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-confirm:hover {
    background: #4338ca;
}

/* 状态操作按钮 */
.status-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-help {
    flex: 1;
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: 0.2s;
}

.btn-help:hover {
    background: #f9fafb;
    border-color: #ccc;
    color: #333;
}

.btn-success {
    flex: 1;
    background: #10b981;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: 0.2s;
}

.btn-success:hover {
    background: #059669;
}

/* ★★★ 强制 SweetAlert2 在最上层 (z-index > 1000) ★★★ */
.swal2-container {
    z-index: 99999 !important;
}

/* =========================================
   2026 支付样式修复补丁 (请追加到文件末尾)
   功能：去除圆圈、适配黑夜模式、单层边框
   ========================================= */

/* 1. 强制重置网格布局 */
.pay-channels {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
}

/* 2. 外层容器透明化 (解决底部白框问题) */
.pay-item {
    position: relative !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* 隐藏原生单选钮 */
.pay-item input[type="radio"] {
    display: none !important;
}

/* 3. 核心按钮样式 (适配黑夜模式变量) */
.pay-label {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    height: 100% !important;
    padding: 14px !important;
    
    /* 使用变量适配黑夜模式 */
    background: var(--bg-card, #ffffff) !important; 
    border: 1px solid var(--border-color, #e5e7eb) !important;
    color: var(--text-main, #333) !important;
    
    border-radius: 12px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

/* 4. 彻底移除圆圈 (Before/After) */
.pay-label::before,
.pay-label::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
}

/* 5. 选中状态 (高亮边框 + 浅色背景) */
.pay-item input[type="radio"]:checked + .pay-label {
    border-color: var(--primary, #6366f1) !important;
    color: var(--primary, #6366f1) !important;
    /* 使用透明度背景，在黑/白模式下都好看 */
    background-color: rgba(99, 102, 241, 0.1) !important;
    box-shadow: 0 0 0 1px var(--primary, #6366f1) !important;
}

/* 6. 鼠标悬停 */
.pay-item:hover .pay-label {
    border-color: var(--primary, #6366f1) !important;
    background: var(--bg-hover, #f3f4f6) !important;
}

/* 图标颜色跟随文字 */
.pay-label i {
    font-size: 20px !important;
    color: inherit !important;
}

/* =========================================
   Part 3: 黑夜模式 & 弹窗颜色修复 (请追加到最后)
   功能：修复弹窗背景白色的问题，强制适配黑底白字
   ========================================= */

/* 1. 定义黑夜模式的核心颜色 (覆盖原文件设置) */
body.dark-theme {
    --bg-card: #18181b !important;   /* 弹窗/卡片变深灰 */
    --text-main: #f3f4f6 !important; /* 文字变亮白 */
    --text-sub: #9ca3af !important;  /* 副标题变灰白 */
    --border-color: #27272a !important; /* 边框变深色 */
    --bg-hover: #27272a !important;  /* 悬停/摘要区域背景 */
}

/* 2. 修复“确认订单”大弹窗的背景颜色 */
.modal-box {
    background: var(--bg-card, #ffffff) !important;
    border: 1px solid var(--border-color, #e5e7eb) !important;
    color: var(--text-main, #333) !important;
}

/* 3. 修复“应付金额”摘要区域的背景颜色 */
.order-summary {
    background: var(--bg-hover, #f3f4f6) !important;
    color: var(--text-main, #333) !important;
    border: none !important;
}

/* 4. 修复弹窗内的标题和文字颜色 */
.modal-header,
.summary-row, 
.summary-total {
    color: var(--text-main, #333) !important;
}

/* 5. 修复右上角关闭按钮 */
.close-btn {
    color: var(--text-sub, #666) !important;
}
.close-btn:hover {
    color: var(--text-main, #333) !important;
}

/* 6. 修复支付方式的大标题文字 (如“选择支付方式”) */
#checkoutForm > div[style] {
    color: var(--text-sub) !important; /* 强制覆盖行内样式的深灰色 */
}


/* --- Datatable 分页样式复刻 (适配 User.php) --- */

/* 分页容器 */
.datatable-pager-nav {
    margin: 20px 0 0 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* 居右显示，如需居中改 center */
    list-style: none;
    gap: 5px;
}

/* 所有列表项 */
.datatable-pager-nav li {
    display: inline-flex;
    align-items: center;
}

/* 按钮基础样式 */
.datatable-pager-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%; /* 圆形 */
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.3s;
    background: transparent;
    border: 1px solid transparent;
    text-decoration: none !important;
    font-size: 14px;
}

/* 图标大小 */
.datatable-pager-link i {
    font-size: 16px;
}

/* 悬停效果 */
.datatable-pager-link:hover:not(.datatable-pager-link-disabled) {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
}

/* 禁用状态 */
.datatable-pager-link-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* 激活状态 (当前页码) */
.datatable-pager-link-active {
    background: var(--primary);
    color: #fff;
    font-weight: bold;
}

/* 中间的页码输入框 */
.datatable-pager-input {
    width: 50px;
    height: 32px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-input);
    color: var(--text-main);
    font-weight: 600;
    margin: 0 5px;
    outline: none;
    transition: 0.2s;
}

.datatable-pager-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .datatable-pager-nav {
        justify-content: center;
    }
}

/* --- 用户中心布局优化 (Settings Tab) --- */

/* 设置页面的双栏布局 */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px; /* 增加卡片间距 */
    align-items: stretch; /* 让左右卡片高度保持一致 */
}

/* 移动端适配：屏幕变窄时自动改为单栏 */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* 设置表单容器：使用 Flex 布局撑开高度 */
.settings-form-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 280px; /* 保证最小高度，避免太扁 */
}

/* 表单组间距优化 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 14px;
}

/* 输入框样式增强 */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-input, #f9fafb);
    color: var(--text-main);
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.form-control:disabled {
    background: var(--bg-hover);
    cursor: not-allowed;
    opacity: 0.7;
}

/* 按钮全宽样式 */
.btn-block {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border-radius: 10px;
    margin-top: 20px;
}