/* ========================================
   VIP 会员管理系统 - 全局样式表
   响应式设计：桌面端 / 平板 / 手机
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    color: #333;
    line-height: 1.6;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* --- Utility --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all .2s ease;
    text-align: center;
    white-space: nowrap;
}

.btn-primary { background: #FF6B35; color: #fff; }
.btn-primary:hover { background: #e55a2b; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,107,53,.35); }

.btn-outline { border: 1.5px solid #FF6B35; color: #FF6B35; background: #fff; }
.btn-outline:hover { background: #fff5f0; transform: translateY(-1px); }

.btn-white { background: #fff; color: #FF6B35; }
.btn-white:hover { background: #f5f5f5; transform: translateY(-1px); }

.btn-block { display: block; width: 100%; }

/* --- Navbar --- */
.navbar {
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.navbar .logo {
    font-size: 20px;
    font-weight: 700;
    color: #FF6B35;
    flex-shrink: 0;
}

.navbar .nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.navbar .nav-links a {
    color: #555;
    font-size: 14px;
    transition: color .2s;
}

.navbar .nav-links a:hover { color: #FF6B35; }

/* 移动端菜单按钮（默认隐藏） */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all .3s;
}

/* --- Hero --- */
.hero {
    background: linear-gradient(135deg, #FF6B35 0%, #f7931e 100%);
    padding: 80px 20px;
    text-align: center;
    color: #fff;
}

.hero h1 { font-size: 42px; font-weight: 800; margin-bottom: 16px; letter-spacing: -.5px; }
.hero p  { font-size: 18px; opacity: .92; max-width: 600px; margin: 0 auto 30px; }
.hero .actions { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; }
.hero .btn { padding: 13px 36px; font-size: 16px; }
.hero .link-more { color: #fff; font-size: 14px; opacity: .85; }
.hero .link-more:hover { opacity: 1; }

/* --- Section --- */
.section { padding: 70px 20px; }
.section.bg-gray { background: #f8f9fb; }
.section-title { text-align: center; font-size: 30px; font-weight: 700; margin-bottom: 10px; color: #1a1a2e; }
.section-subtitle { text-align: center; font-size: 15px; color: #999; margin-bottom: 48px; }

/* --- 数据统计卡片 --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
}

.stat-card .num { font-size: 32px; font-weight: 700; margin-bottom: 6px; }
.stat-card .num.c-orange { color: #FF6B35; }
.stat-card .num.c-blue   { color: #1890ff; }
.stat-card .num.c-green  { color: #52c41a; }
.stat-card .num.c-gold   { color: #fa8c16; }
.stat-card .label { font-size: 13px; color: #999; }

/* --- 特性卡片 --- */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px 22px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: transform .25s ease, box-shadow .25s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0,0,0,.1);
}

.feature-card .icon { font-size: 40px; margin-bottom: 14px; display: block; }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: #1a1a2e; }
.feature-card p  { font-size: 13px; color: #999; line-height: 1.7; }

/* --- 使用流程 --- */
.steps {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    width: 200px;
}

.step .num {
    width: 56px;
    height: 56px;
    line-height: 56px;
    border-radius: 50%;
    background: #FF6B35;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 14px;
}

.step h4 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.step p  { font-size: 13px; color: #999; }

/* --- Footer --- */
.footer {
    background: #1a1a2e;
    color: #999;
    text-align: center;
    padding: 40px 20px;
    font-size: 13px;
}

.footer .name { color: #ccc; font-size: 16px; font-weight: 500; margin-bottom: 8px; }

/* --- Dashboard 页面 --- */
.dashboard-page { background: #f5f7fa; min-height: 100vh; }

.db-header {
    background: #fff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 12px;
}

.db-header h3 { font-size: 18px; font-weight: 600; }

.db-content { padding: 24px; }

.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-cards .stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 22px 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.stat-cards .stat-card .label { font-size: 13px; color: #999; margin-bottom: 8px; }
.stat-cards .stat-card .num { font-size: 28px; font-weight: 700; }

.table-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    overflow: hidden;
}

.table-box .header {
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; min-width: 600px; }

th {
    text-align: left;
    padding: 12px 16px;
    background: #fafafa;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid #f5f5f5;
}

tr:hover td { background: #fafafa; }

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.tag-green  { background: #f6ffed; color: #52c41a; }
.tag-blue   { background: #e6f7ff; color: #1890ff; }
.tag-orange { background: #fff7e6; color: #fa8c16; }
.tag-red    { background: #fff2f0; color: #f5222d; }

.empty { text-align: center; padding: 40px 20px; color: #999; font-size: 14px; }

/* --- 登录页 --- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 14px;
    padding: 44px 40px;
    width: 420px;
    max-width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.login-box h2 { text-align: center; margin-bottom: 6px; font-size: 24px; font-weight: 700; }
.login-box .sub { text-align: center; color: #999; font-size: 13px; margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; color: #666; font-weight: 500; }
.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}

.form-group input:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,.1); }

.login-box .btn { width: 100%; padding: 12px; font-size: 16px; margin-top: 10px; }
.login-error {
    color: #ff4d4f;
    font-size: 13px;
    text-align: center;
    margin-bottom: 10px;
    background: #fff2f0;
    padding: 8px 12px;
    border-radius: 6px;
}

/* ========================================
   响应式设计 - 平板端 (768px - 1024px)
   ======================================== */
@media (max-width: 1024px) {
    .features { grid-template-columns: repeat(2, 1fr); }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }

    .hero h1 { font-size: 34px; }
    .hero p  { font-size: 16px; }

    .section { padding: 50px 20px; }
    .section-title { font-size: 26px; }

    .steps { gap: 32px; }
}

/* ========================================
   响应式设计 - 移动端 (320px - 768px)
   ======================================== */
@media (max-width: 768px) {
    /* 导航：切换为汉堡菜单 */
    .navbar .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,.1);
        padding: 8px 0;
    }

    .navbar .nav-links.active { display: flex; }

    .navbar .nav-links a {
        padding: 14px 24px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 15px;
        display: block;
    }

    .navbar .nav-links a:last-child { border-bottom: none; }

    .nav-toggle { display: flex; }

    /* Hero */
    .hero { padding: 56px 20px; }
    .hero h1 { font-size: 28px; }
    .hero p  { font-size: 15px; max-width: 100%; }
    .hero .actions { flex-direction: column; gap: 12px; }
    .hero .btn { width: 100%; }

    /* Section */
    .section { padding: 40px 16px; }
    .section-title { font-size: 24px; }
    .section-subtitle { font-size: 14px; margin-bottom: 32px; }

    /* 统计卡片 */
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 20px 14px; }
    .stat-card .num { font-size: 24px; }

    /* 特性 */
    .features { grid-template-columns: 1fr; gap: 16px; }
    .feature-card { padding: 24px 18px; }

    /* 流程 */
    .steps { flex-direction: column; align-items: center; gap: 24px; }
    .step { width: 100%; max-width: 280px; }

    /* Dashboard */
    .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .db-content { padding: 16px; }
    .db-header { padding: 14px 16px; }
    .db-header h3 { font-size: 16px; }

    /* 登录 */
    .login-box { padding: 32px 24px; }

    /* Footer */
    .footer { padding: 30px 16px; }
}

/* ========================================
   响应式设计 - 小屏手机 (320px - 480px)
   ======================================== */
@media (max-width: 480px) {
    .hero h1 { font-size: 24px; }
    .hero p  { font-size: 14px; }

    .stats-row { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 16px 10px; border-radius: 8px; }
    .stat-card .num { font-size: 22px; }

    .section-title { font-size: 22px; }

    .stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }

    .login-box { padding: 28px 18px; }
    .login-box h2 { font-size: 20px; }
}
