/* 付费进群系统统一样式表 style.css */
/* 通用基础样式 */

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f0f2f5;
    color: #1f1f1f;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: #1890ff; text-decoration: none; transition: color 0.2s; }
a:hover { color: #096dd9; text-decoration: none; }

/* ===== 前台首页 ===== */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 16px 60px;
    min-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f0f2f5 100%);
}
.header {
    text-align: center;
    padding: 40px 0 24px;
}
.header h1 {
    font-size: 26px;
    color: #1890ff;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 1px;
}
.header .subtitle {
    color: #8c8c8c;
    font-size: 13px;
}
.groups { margin-top: 16px; }
.group-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}
.group-card:hover {
    box-shadow: 0 6px 24px rgba(24,144,255,0.12);
    transform: translateY(-2px);
    border-color: #e6f7ff;
}
.group-info h3 {
    font-size: 16px;
    margin-bottom: 6px;
    color: #262626;
    font-weight: 600;
}
.group-info .price {
    color: #ff4d4f;
    font-weight: 600;
    font-size: 20px;
}
.group-info .price::before {
    content: '￥';
    font-size: 14px;
    margin-right: 1px;
}
.buy-form {
    display: flex;
    gap: 6px;
}
.buy-form input {
    width: 150px;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}
.buy-form input:focus { border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,0.15); }
.buy-form button {
    padding: 8px 18px;
    background: linear-gradient(135deg, #1890ff, #096dd9);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(24,144,255,0.3);
}
.buy-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24,144,255,0.4);
}
.empty {
    text-align: center;
    padding: 80px 0;
    color: #bfbfbf;
    font-size: 15px;
}
.footer {
    text-align: center;
    margin-top: 40px;
    color: #bfbfbf;
    font-size: 12px;
    padding: 20px 0;
    border-top: 1px solid #e8e8e8;
}

/* ===== 等待/成功页 ===== */
.waiting-box, .success-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    margin-top: 20px;
}
.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #52c41a, #389e0d);
    color: #fff;
    border-radius: 50%;
    font-size: 36px;
    line-height: 64px;
    box-shadow: 0 4px 12px rgba(82,196,26,0.3);
}
.success-box h2 {
    margin-bottom: 20px;
    color: #262626;
    font-weight: 600;
}
.qr-wrap {
    margin: 20px auto;
    padding: 12px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    display: inline-block;
    background: #fafafa;
}
.qr-img {
    max-width: 280px;
    width: 100%;
    height: auto;
}
.order-info {
    margin-top: 20px;
    font-size: 14px;
    color: #595959;
    background: #fafafa;
    padding: 16px;
    border-radius: 6px;
    text-align: left;
}
.order-info p { margin: 6px 0; }
.muted { color: #bfbfbf; font-size: 12px; }
.tip {
    margin-top: 16px;
    color: #ff4d4f;
    font-size: 13px;
    font-weight: 500;
}
.loading {
    width: 44px;
    height: 44px;
    margin: 0 auto 16px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #1890ff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 后台登录页 ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 50%, #0050b3 100%);
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    top: -200px;
    right: -200px;
}
.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
}
.login-box {
    background: #fff;
    padding: 36px 40px 32px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    width: 360px;
    position: relative;
    z-index: 1;
}
.login-box h2 {
    text-align: center;
    color: #262626;
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 600;
}
.login-box .sub-title {
    text-align: center;
    color: #bfbfbf;
    font-size: 13px;
    margin-bottom: 28px;
}

/* ===== 后台布局 ===== */
.admin-wrap {
    display: flex;
    min-height: 100vh;
    background: #f0f2f5;
}
.admin-sidebar {
    width: 220px;
    background: linear-gradient(180deg, #001529 0%, #002140 100%);
    color: #fff;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
    z-index: 100;
}
.admin-sidebar h3 {
    text-align: center;
    padding: 26px 0;
    font-size: 18px;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-weight: 600;
    letter-spacing: 2px;
}
.admin-sidebar h3::before {
    content: '◆';
    color: #1890ff;
    margin-right: 8px;
    font-size: 14px;
}
.admin-sidebar ul { list-style: none; padding: 12px 0; }
.admin-sidebar li a {
    display: flex;
    align-items: center;
    color: #b3c0d1;
    padding: 14px 26px;
    font-size: 14px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.admin-sidebar li a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4a5568;
    margin-right: 12px;
    transition: all 0.2s;
}
.admin-sidebar li a:hover {
    background: rgba(24,144,255,0.1);
    color: #fff;
}
.admin-sidebar li a:hover::before { background: #1890ff; }
.admin-sidebar li a.active {
    background: linear-gradient(90deg, rgba(24,144,255,0.2), transparent);
    color: #fff;
    border-left-color: #1890ff;
    font-weight: 500;
}
.admin-sidebar li a.active::before { background: #1890ff; box-shadow: 0 0 8px #1890ff; }
.admin-content {
    flex: 1;
    padding: 28px 32px;
    overflow-x: auto;
    margin-left: 220px;
    min-height: 100vh;
}

/* ===== 后台通用 ===== */
.page-title {
    font-size: 22px;
    margin-bottom: 24px;
    color: #1f1f1f;
    padding-bottom: 14px;
    border-bottom: 2px solid #1890ff;
    display: inline-block;
    font-weight: 600;
}
.section-title {
    font-size: 16px;
    color: #262626;
    margin: 24px 0 14px;
    font-weight: 600;
}
.alert {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert::before {
    font-size: 16px;
    font-weight: bold;
}
.alert-error { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }
.alert-error::before { content: '✕'; }
.alert-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.alert-success::before { content: '✓'; }

/* ===== 统计卡片：横向网格布局 ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}
.stat-card {
    background: #fff;
    padding: 22px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.25s;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #1890ff;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.stat-card.highlight {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    border-color: transparent;
}
.stat-card.highlight::before { background: rgba(255,255,255,0.4); }
.stat-card.highlight .stat-num, .stat-card.highlight .stat-label { color: #fff; }
.stat-num {
    font-size: 26px;
    font-weight: 700;
    color: #1f1f1f;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.stat-label {
    color: #8c8c8c;
    font-size: 13px;
    font-weight: 500;
}

/* ===== 表格 ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    font-size: 14px;
}
.table th, .table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}
.table th {
    background: #fafafa;
    font-weight: 600;
    color: #595959;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.table tr:hover { background: #fafafa; }
.table tr:last-child td { border-bottom: none; }
.empty-row {
    text-align: center;
    color: #bfbfbf;
    padding: 40px;
}

/* ===== 标签 ===== */
.tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.tag-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.tag-warning { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #262626;
    font-size: 14px;
    font-weight: 500;
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    background: #fff;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.15);
}
.form-group textarea {
    resize: vertical;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.form-section {
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    margin-bottom: 22px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.form-section h3 {
    font-size: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    color: #262626;
    font-weight: 600;
}
.btn-submit {
    padding: 10px 32px;
    background: linear-gradient(135deg, #1890ff, #096dd9);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(24,144,255,0.3);
}
.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24,144,255,0.4);
}
.btn-cancel {
    display: inline-block;
    padding: 10px 22px;
    background: #fff;
    color: #595959;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    margin-left: 12px;
    transition: all 0.2s;
}
.btn-cancel:hover {
    color: #595959;
    border-color: #1890ff;
}
.btn-sm {
    display: inline-block;
    padding: 5px 14px;
    background: #1890ff;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    margin-right: 6px;
    transition: all 0.2s;
}
.btn-sm:hover { background: #096dd9; color: #fff; }
.btn-sm.btn-danger { background: #ff4d4f; }
.btn-sm.btn-danger:hover { background: #cf1322; }
.btn-sm.btn-cancel { background: #fff; color: #595959; border: 1px solid #d9d9d9; }
.btn-sm.btn-cancel:hover { background: #fafafa; color: #595959; border-color: #1890ff; }
.filter-form {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    align-items: center;
    flex-wrap: wrap;
    background: #fff;
    padding: 14px 18px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.filter-form input, .filter-form select {
    padding: 7px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    min-width: 160px;
}
.filter-form input:focus, .filter-form select:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.15);
}
.card {
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    margin-bottom: 22px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.card h3 {
    font-size: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    color: #262626;
    font-weight: 600;
}
.actions { white-space: nowrap; }
.current-qr {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.qr-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
}
.settings-form {
    max-width: 100%;
}
.error {
    color: #ff4d4f;
    font-size: 14px;
    margin-bottom: 18px;
    text-align: center;
    background: #fff2f0;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ffccc7;
}

/* ===== 移动端响应式 ===== */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    .admin-sidebar ul {
        display: flex;
        overflow-x: auto;
        padding: 0;
    }
    .admin-sidebar li {
        flex-shrink: 0;
    }
    .admin-sidebar li a {
        padding: 14px 18px;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    .admin-sidebar li a:hover, .admin-sidebar li a.active {
        border-bottom-color: #1890ff;
        border-left-color: transparent;
        background: rgba(24,144,255,0.1);
    }
    .admin-sidebar h3 {
        padding: 18px;
        font-size: 16px;
    }
    .admin-content {
        margin-left: 0;
        padding: 20px 16px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .table { font-size: 12px; }
    .table th, .table td { padding: 10px 8px; }
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-num { font-size: 22px; }
}
