* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 顶部导航 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar .logo {
    font-size: 20px;
    font-weight: bold;
}

.navbar .nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.navbar .nav-links a {
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s;
}

.navbar .nav-links a:hover {
    background: rgba(255,255,255,0.2);
}

.navbar .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 汉堡菜单按钮 */
.navbar .menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* 手机端搜索栏 */
.navbar .search-bar-mobile {
    display: none;
    flex: 1;
    margin: 0 12px;
}

.navbar .search-bar-mobile a {
    display: block;
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    color: #888 !important;
}

/* 响应式：移动端 */
@media (max-width: 768px) {
    .navbar {
        padding: 0 12px;
        flex-wrap: nowrap;
        height: 56px;
        min-height: 56px;
    }

    .navbar .menu-toggle {
        display: none !important;
    }

    .navbar .logo {
        display: none;
    }

    .navbar .search-bar-mobile {
        display: block;
    }

    .navbar .nav-links {
        display: none !important;
    }

    .navbar .user-info {
        gap: 8px;
        font-size: 13px;
    }

    .navbar .user-info .tag {
        display: none;
    }

    .navbar .user-info .btn {
        padding: 4px 8px;
        font-size: 12px;
    }

    .container {
        margin: 12px auto;
        padding: 0 12px;
        padding-top: 68px;
        padding-bottom: 70px;
    }

    .card {
        padding: 16px;
        margin-bottom: 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .bottom-nav .nav-item {
        font-size: 11px;
        padding: 6px 2px;
    }

    .bottom-nav .nav-item .icon {
        font-size: 20px;
        margin-bottom: 2px;
    }
}

/* 底部Tab导航（移动端） */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e8e8e8;
    z-index: 9999;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

.bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    color: #888;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 4px;
}

.bottom-nav .nav-item .icon {
    font-size: 24px;
    display: block;
    margin-bottom: 4px;
}

.bottom-nav .nav-item .label {
    display: block;
    white-space: nowrap;
}

.bottom-nav .nav-item.active {
    color: #667eea;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }

    .container {
        padding-bottom: 70px;
    }

    .navbar .nav-links {
        display: none !important;
    }

    .navbar .menu-toggle {
        display: none !important;
    }
}

/* 主内容区 */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    padding-top: 70px;
}

/* 卡片 */
.card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #333;
    border-left: 4px solid #667eea;
    padding-left: 12px;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
}

.stat-card .stat-value.green { color: #52c41a; }
.stat-card .stat-value.orange { color: #fa8c16; }
.stat-card .stat-value.red { color: #f5222d; }

/* 功能菜单网格 */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.menu-item {
    background: white;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.menu-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.menu-item .menu-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.menu-item .menu-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.menu-item .menu-desc {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-success {
    background: #52c41a;
    color: white;
}

.btn-warning {
    background: #fa8c16;
    color: white;
}

.btn-danger {
    background: #f5222d;
    color: white;
}

.btn-default {
    background: #f0f0f0;
    color: #666;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* 验证码 */
.captcha-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-group input {
    flex: 1;
}

.captcha-img {
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
}

/* 消息提示 */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.flash-message.success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.flash-message.error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #f5222d;
}

.flash-message.warning {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #fa8c16;
}

/* 登录注册页面 */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    width: 420px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.auth-box .auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 14px;
}

.auth-box .auth-footer a {
    color: #667eea;
}

/* 首页（未登录） */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero .hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.hero .btn {
    padding: 14px 36px;
    font-size: 16px;
}

.hero .btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.features {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
}

.features h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.feature-card .feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    margin-bottom: 12px;
    color: #333;
}

.feature-card p {
    color: #888;
    font-size: 14px;
}

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background: #fafafa;
    font-weight: 600;
    color: #555;
}

table tr:hover {
    background: #f9f9f9;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
}

.tag-success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.tag-warning { background: #fffbe6; color: #fa8c16; border: 1px solid #ffe58f; }
.tag-error { background: #fff2f0; color: #f5222d; border: 1px solid #ffccc7; }
.tag-default { background: #f5f5f5; color: #888; border: 1px solid #d9d9d9; }
.tag-primary { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }

/* 占位提示 */
.placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

.placeholder .placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.placeholder p {
    font-size: 16px;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 30px;
    color: #aaa;
    font-size: 14px;
}


/* ===== 手机端响应式设计 ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 0 10px;
        height: 50px;
        flex-wrap: nowrap;
    }
    .navbar .logo {
        font-size: 16px;
        flex-shrink: 0;
        margin-right: 10px;
    }
    .navbar .nav-links {
        display: flex;
        gap: 5px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .navbar .nav-links::-webkit-scrollbar {
        display: none;
    }
    .navbar .nav-links a {
        padding: 6px 10px;
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .navbar .user-info {
        display: none;
    }
    .container {
        margin: 15px auto;
        padding: 0 10px;
    }
    .card {
        padding: 16px;
    }
    .card-title {
        font-size: 16px;
    }
    h1 {
        font-size: 22px;
    }
    h2 {
        font-size: 18px;
    }
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    table {
        font-size: 12px;
    }
    th, td {
        padding: 6px 8px;
    }
}



/* ===== 首页样式 ===== */
.home-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
}
.home-welcome h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
}
.home-subtitle {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}
.status-active {
    background: rgba(82,196,26,0.3);
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
}
.status-inactive {
    background: rgba(250,140,22,0.3);
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
}
.member-badge {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
}
.home-points {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}
.point-item {
    flex: 1;
}
.point-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}
.point-value {
    font-size: 22px;
    font-weight: bold;
}
.point-value.green { color: #73d13d; }
.point-value.orange { color: #ffc53d; }

.activate-tip {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #d48806;
}

.home-section {
    margin-bottom: 20px;
}
.section-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 3px solid #667eea;
}
.home-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.home-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 12px 4px;
    border-radius: 8px;
    transition: background 0.2s;
}
.home-item:hover {
    background: #f5f5f5;
}
.home-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 8px;
}
.home-name {
    font-size: 12px;
    text-align: center;
    color: #333;
}

@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .home-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    .home-name {
        font-size: 11px;
    }
    .home-header {
        padding: 16px;
    }
    .home-welcome h2 {
        font-size: 18px;
    }
    .point-value {
        font-size: 18px;
    }
}



/* ===== 新首页样式 ===== */
.home-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 16px;
}
.topbar-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.topbar-hello {
    font-size: 16px;
    font-weight: bold;
}
.topbar-points {
    font-size: 12px;
    opacity: 0.9;
}
.topbar-points strong {
    color: #ffd666;
}
.more-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
.more-btn:hover {
    background: rgba(255,255,255,0.3);
}

.more-menu {
    background: white;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.more-menu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.more-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 8px 4px;
    border-radius: 6px;
    font-size: 12px;
}
.more-item:hover {
    background: #f5f5f5;
}
.more-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.activate-tip {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #d48806;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.product-card:hover {
    transform: translateY(-2px);
}
.product-img {
    width: 100%;
    height: 140px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.placeholder-img {
    font-size: 48px;
}
.product-name {
    padding: 8px 10px 4px;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-price {
    padding: 0 10px 10px;
    font-size: 16px;
    font-weight: bold;
    color: #f5222d;
}

@media (max-width: 768px) {
    .more-menu-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .more-icon {
        font-size: 20px;
    }
    .more-item {
        font-size: 11px;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .product-img {
        height: 120px;
    }
    .home-topbar {
        padding: 10px 12px;
    }
    .topbar-hello {
        font-size: 14px;
    }
}



/* 首页数字身份证样式 */
.topbar-uniqueid {
    font-size: 11px;
    opacity: 0.85;
    cursor: pointer;
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}
.topbar-uniqueid:hover {
    background: rgba(255,255,255,0.25);
}

