* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif; background: #f0f2f5; color: #333; max-width: 480px; margin: 0 auto; min-height: 100vh; -webkit-tap-highlight-color: transparent; }

.page { display: none; padding-bottom: 70px; min-height: 100vh; animation: fadeIn 0.25s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* 头部 */
.header { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%); color: white; padding: 48px 20px 20px; font-size: 19px; font-weight: 700; letter-spacing: 0.5px; }

/* 登录 */
.login-container { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 30px; background: linear-gradient(160deg, #6366f1 0%, #8b5cf6 40%, #c084fc 100%); position: relative; overflow: hidden; }
.login-container::before { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,0.06); top: -80px; right: -60px; }
.login-container::after { content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,0.04); bottom: -40px; left: -40px; }
.login-logo { font-size: 72px; margin-bottom: 20px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15)); animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.login-container h2 { color: white; font-size: 24px; font-weight: 700; margin-bottom: 8px; text-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.login-desc { color: rgba(255,255,255,0.75); font-size: 13px; margin-bottom: 50px; letter-spacing: 3px; }
.btn-wechat { background: rgba(255,255,255,0.95); color: #6366f1; border: none; padding: 14px 36px; border-radius: 50px; font-size: 15px; font-weight: 600; cursor: pointer; width: 75%; max-width: 280px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); transition: all 0.2s; letter-spacing: 1px; }
.btn-wechat:active { transform: scale(0.97); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.login-test { margin-top: 24px; color: rgba(255,255,255,0.4); font-size: 12px; cursor: pointer; }

/* Banner */
.banner { margin: 16px; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%); box-shadow: 0 8px 25px rgba(99,102,241,0.25); }
.banner-content { display: flex; justify-content: space-between; align-items: center; padding: 24px 20px; color: white; }
.banner-en { font-size: 9px; opacity: 0.6; letter-spacing: 3px; text-transform: uppercase; }
.banner-content h1 { font-size: 21px; font-weight: 700; margin: 6px 0; }
.banner-slogan { font-size: 12px; opacity: 0.75; letter-spacing: 1px; }
.banner-icon { font-size: 44px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1)); }

/* 快捷入口 */
.quick-entry { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 16px; margin-bottom: 16px; }
.entry-card { background: white; border-radius: 14px; padding: 18px 10px; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.04); transition: all 0.2s; }
.entry-card:active { transform: scale(0.96); background: #fafafe; }
.entry-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin: 0 auto 8px; }
.entry-icon.green { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.entry-icon.blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.entry-icon.orange { background: linear-gradient(135deg, #ffedd5, #fed7aa); }
.entry-card span { font-size: 12px; color: #555; font-weight: 500; }

/* 食谱入口 */
.menu-entry { margin: 0 16px 16px; background: white; border-radius: 14px; padding: 16px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.menu-entry-left { display: flex; align-items: center; gap: 12px; }
.menu-entry-icon { font-size: 28px; }
.menu-entry-left h3 { font-size: 14px; font-weight: 600; color: #333; }
.menu-entry-left p { font-size: 11px; color: #aaa; margin-top: 3px; }
.menu-entry-btn { color: #6366f1; font-size: 13px; font-weight: 500; }

/* 区块 */
.section { padding: 0 16px; margin-bottom: 16px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.title-bar { width: 3px; height: 16px; background: linear-gradient(180deg, #6366f1, #a78bfa); border-radius: 2px; }
.meal-tabs { display: flex; gap: 6px; }
.meal-tab { padding: 5px 14px; border-radius: 20px; font-size: 12px; color: #999; background: white; cursor: pointer; font-weight: 500; box-shadow: 0 1px 4px rgba(0,0,0,0.04); transition: all 0.2s; }
.meal-tab.active { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; box-shadow: 0 4px 12px rgba(99,102,241,0.3); }

/* 菜品 */
.menu-list { display: flex; flex-direction: column; gap: 10px; }
.dish-item { background: white; border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); transition: all 0.15s; }
.dish-item:active { transform: scale(0.99); background: #fafafe; }
.dish-image { width: 48px; height: 48px; border-radius: 10px; background: linear-gradient(135deg, #f0f0f5, #e8e8ee); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; overflow: hidden; }
.dish-image img { width: 100%; height: 100%; object-fit: cover; }
.dish-info { flex: 1; min-width: 0; }
.dish-name { font-size: 14px; font-weight: 600; color: #333; }
.dish-time { font-size: 11px; color: #aaa; margin-top: 3px; }
.dish-tag { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #7c3aed; padding: 3px 10px; border-radius: 10px; font-size: 10px; font-weight: 500; flex-shrink: 0; }
.empty-state { text-align: center; padding: 40px 20px; color: #ccc; font-size: 13px; }
.loading { text-align: center; padding: 30px; color: #bbb; font-size: 13px; }

/* 一周食谱 */
.week-container { display: flex; height: calc(100vh - 120px); }
.week-sidebar { width: 68px; background: white; border-right: 1px solid #f0f0f5; flex-shrink: 0; }
.week-day { padding: 14px 0; text-align: center; font-size: 13px; color: #999; cursor: pointer; border-left: 3px solid transparent; font-weight: 500; transition: all 0.15s; }
.week-day.active { color: #6366f1; font-weight: 700; border-left-color: #6366f1; background: linear-gradient(90deg, #f5f3ff, transparent); }
.cat-sidebar { width: 72px; background: white; border-right: 1px solid #f0f0f5; flex-shrink: 0; overflow-y: auto; padding: 6px 0; }
.cat-item { padding: 10px 6px; text-align: center; font-size: 11px; color: #888; cursor: pointer; border-left: 3px solid transparent; font-weight: 500; transition: all 0.15s; line-height: 1.3; }
.cat-item:hover { background: #f8f9fa; color: #333; }
.cat-item.active { color: var(--cat-color, #6366f1); font-weight: 700; border-left-color: var(--cat-color, #6366f1); background: color-mix(in srgb, var(--cat-color, #6366f1) 8%, transparent); }
.week-content { flex: 1; padding: 14px; overflow-y: auto; }
.meal-section { margin-bottom: 20px; }
.meal-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.dish-list { display: flex; flex-direction: column; gap: 8px; }

/* 申请 */
.apply-tabs { display: flex; padding: 16px 16px 0; gap: 10px; }
.apply-tab { flex: 1; padding: 10px; text-align: center; border-radius: 10px; font-size: 13px; color: #999; background: white; cursor: pointer; font-weight: 500; box-shadow: 0 1px 4px rgba(0,0,0,0.04); transition: all 0.2s; }
.apply-tab.active { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
.apply-list { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.apply-item { background: white; border-radius: 12px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.apply-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.apply-date { font-weight: 600; font-size: 14px; }
.apply-status { padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.status-pending { background: #fef3c7; color: #d97706; }
.status-approved { background: #d1fae5; color: #059669; }
.status-rejected { background: #fee2e2; color: #dc2626; }
.status-packaged { background: #dbeafe; color: #2563eb; }
.apply-info { font-size: 12px; color: #888; line-height: 1.6; }
.apply-progress { margin-top: 10px; }
.progress-bar { height: 4px; background: #f0f0f5; border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6); border-radius: 2px; transition: width 0.5s ease; }
.progress-steps { display: flex; justify-content: space-between; margin-top: 6px; }
.step { font-size: 9px; color: #ccc; font-weight: 500; }
.step.active { color: #6366f1; font-weight: 600; }
.apply-remark { margin-top: 8px; font-size: 12px; color: #059669; background: #f0fdf4; padding: 6px 10px; border-radius: 6px; }
.apply-pickup { margin-top: 8px; font-size: 12px; color: #2563eb; background: #eff6ff; padding: 6px 10px; border-radius: 6px; font-weight: 500; }

/* 我的 */
.profile-header { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%); padding: 40px 20px 30px; display: flex; align-items: center; gap: 16px; color: white; }
.avatar { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 28px; border: 2px solid rgba(255,255,255,0.3); }
.profile-info h3 { font-size: 18px; font-weight: 700; }
.profile-info p { font-size: 12px; opacity: 0.75; margin-top: 3px; }
.menu-list { background: white; margin: 16px; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.menu-item { padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f5f5f8; cursor: pointer; transition: background 0.15s; }
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: #fafafe; }

/* 底部导航 */
.tab-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: white; display: flex; border-top: 1px solid #f0f0f5; padding: 6px 0; padding-bottom: calc(6px + env(safe-area-inset-bottom)); z-index: 100; box-shadow: 0 -2px 12px rgba(0,0,0,0.04); }
.tab { flex: 1; text-align: center; padding: 4px 0; cursor: pointer; transition: all 0.15s; }
.tab-icon { font-size: 20px; display: block; margin-bottom: 2px; }
.tab span:last-child { font-size: 10px; color: #bbb; font-weight: 500; }
.tab.active span:last-child { color: #6366f1; font-weight: 600; }

/* 弹窗 */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.45); display: none; align-items: flex-end; justify-content: center; z-index: 200; backdrop-filter: blur(2px); }
.modal-content { background: white; width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; max-height: 85vh; overflow-y: auto; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header { padding: 20px 20px 16px; border-bottom: 1px solid #f0f0f5; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: white; z-index: 1; border-radius: 20px 20px 0 0; }
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close { font-size: 24px; color: #ccc; cursor: pointer; padding: 0 4px; line-height: 1; }
.modal-body { padding: 20px; }
.modal-footer { padding: 16px 20px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid #f0f0f5; display: flex; gap: 10px; position: sticky; bottom: 0; background: white; }
.btn-cancel { flex: 1; padding: 12px; border: 1.5px solid #e5e5ea; border-radius: 12px; background: white; font-size: 14px; cursor: pointer; font-weight: 500; color: #666; transition: all 0.15s; }
.btn-cancel:active { background: #f5f5f5; }
.btn-submit { flex: 1; padding: 12px; border: none; border-radius: 12px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; font-size: 14px; cursor: pointer; font-weight: 600; box-shadow: 0 4px 12px rgba(99,102,241,0.3); transition: all 0.15s; }
.btn-submit:active { transform: scale(0.98); box-shadow: 0 2px 6px rgba(99,102,241,0.2); }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 11px 14px; border: 1.5px solid #e8e8ee; border-radius: 10px; font-size: 14px; outline: none; background: #fafafa; transition: all 0.2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #6366f1; background: white; box-shadow: 0 0 0 3px rgba(99,102,241,0.08); }
.form-group textarea { resize: vertical; }

/* 角色入口卡片 */
.entry-icon.purple {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.page-header h2 {
    margin: 0;
    font-size: 18px;
}

.back-btn {
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

/* 申请卡片 */
.apply-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin: 8px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.apply-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
}

.apply-meta {
    color: #666;
    font-size: 13px;
    margin-bottom: 4px;
}

.apply-reason {
    color: #888;
    font-size: 12px;
    margin-top: 6px;
}

.apply-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-approve {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.btn-reject {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.admin-entries {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
}

.empty-tip {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 14px;
}

/* 撤销按钮 */
.btn-cancel-apply {
    width: 100%;
    padding: 10px;
    border: 1px solid #e74c3c;
    border-radius: 8px;
    background: white;
    color: #e74c3c;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}
.btn-cancel-apply:active {
    background: #e74c3c;
    color: white;
}

/* 已撤销状态 */
.apply-cancelled {
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 8px;
    margin-top: 8px;
    background: #f5f5f5;
    border-radius: 8px;
}

