/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #059669;
  --primary-light: #10b981;
  --primary-dark: #047857;
  --secondary: #34d399;
  --accent: #0FC6C2;
  --warning: #F59E0B;
  --danger: #F53F3F;
  --info: #165DFF;
  --girl: #F53F3F;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1D2129;
  --text-secondary: #4E5969;
  --text-tertiary: #86909C;
  --border: #e5e6eb;
  --shadow: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Navigation Bar */
.nav-bar {
  height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  padding: 0 14px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-back {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-back.visible {
  opacity: 1;
}

.nav-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: white;
}

.nav-right {
  width: 34px;
}

/* Main Content */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px;
}

/* Pages */
.page {
  display: none;
  padding: 12px 16px;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Child Tabs */
.child-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.child-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--card);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.child-tab.active {
  background: #f0fdf4;
  border-color: var(--primary);
}

.tab-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.tab-avatar.boy {
  background: var(--info);
}

.tab-avatar.girl {
  background: var(--girl);
}

.tab-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tab-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.tab-grade {
  font-size: 12px;
  color: var(--text-tertiary);
}

.tab-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 600;
  margin-left: 4px;
}

.tab-badge.boy {
  background: var(--info);
  color: white;
}

.tab-badge.girl {
  background: var(--girl);
  color: white;
}

/* Section Title */
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 16px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
}

/* Menu Section */
.menu-section {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.tag.primary {
  background: #f0fdf4;
  color: var(--primary);
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #F2F3F5;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-icon {
  font-size: 28px;
}

.menu-info {
  flex: 1;
}

.menu-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.menu-tags {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.menu-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 600;
}

/* 首页菜单营养标签 */
.menu-tag.tag-protein {
  background: linear-gradient(135deg, #FFF0E8, #FFE4D6);
  color: #F53F3F;
}

.menu-tag.tag-fiber {
  background: linear-gradient(135deg, #F0FFF4, #E6FFED);
  color: #00B42A;
}

.menu-tag.tag-lowcal {
  background: linear-gradient(135deg, #E8FFEA, #D9F5DC);
  color: #059669;
}

.menu-tag.tag-calcium {
  background: linear-gradient(135deg, #FFF7E8, #FFEFD6);
  color: #F59E0B;
}

.menu-tag.tag-vitamin {
  background: linear-gradient(135deg, #E8F3FF, #D6E8FF);
  color: #165DFF;
}

.menu-tag.tag-energy {
  background: linear-gradient(135deg, #FFF0F0, #FFE8E8);
  color: #F53F3F;
}

.menu-tag.tag-staple {
  background: linear-gradient(135deg, #F5F0E8, #EDE6D8);
  color: #8B5A2B;
}

.menu-tag.tag-fruit {
  background: linear-gradient(135deg, #FFF0F5, #FFE8F2);
  color: #D4387A;
}

.menu-tag.tag-children {
  background: linear-gradient(135deg, #FFF8E8, #FFF0D6);
  color: #F7BA1E;
}

.menu-tag.tag-digest {
  background: linear-gradient(135deg, #F0F9FF, #E6F4FF);
  color: #0FC6C2;
}

.menu-tag.tag-eye {
  background: linear-gradient(135deg, #F0FFF0, #E8FFE8);
  color: #52C41A;
}

.menu-tag:not([class*="tag-"]) {
  background: #E8FFEA;
  color: #00B42A;
}

.menu-cal {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.menu-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  margin-top: 2px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}

.menu-footer strong {
  color: var(--text);
  font-weight: 700;
}

.status.success {
  color: var(--primary);
  font-weight: 600;
}

/* Quick Actions */
.quick-actions {
  margin-bottom: 16px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.action-item {
  background: var(--card);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.action-item:active {
  transform: scale(0.98);
}

.action-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.action-item span:last-child {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Copyright */
.copyright {
  text-align: center;
  padding: 20px 0 8px;
  margin-top: 8px;
}

.copyright-brand {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 1px;
}

.copyright-slogan {
  font-size: 11px;
  color: #C9CDD4;
  margin-top: 4px;
  letter-spacing: 2px;
}

/* Week Tabs */
.week-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.week-tab {
  flex: 1;
  padding: 10px 4px;
  text-align: center;
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.week-tab.active {
  background: var(--primary);
  color: white;
}

.week-tab.active .day-date {
  color: rgba(255,255,255,0.8);
}

.week-tab.ordered {
  border-color: var(--primary);
  background: #f0fdf4;
}

.week-tab.ordered.active {
  background: var(--primary);
}

.day-name {
  font-size: 14px;
  font-weight: 600;
}

.day-date {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Meal Cards */
.meal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meal-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.meal-card.selected {
  border-color: var(--primary);
  background: #f0fdf4;
}

.meal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.meal-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.meal-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--warning);
}

.meal-items {
  margin-bottom: 12px;
}

.meal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.item-icon {
  font-size: 22px;
}

.item-info {
  flex: 1;
}

.item-name {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.item-tags {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.item-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #E8FFEA;
  color: #00B42A;
}

.item-cal {
  font-size: 12px;
  color: var(--text-tertiary);
}

.meal-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.meal-tags .tag {
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 营养标签类型样式 */
.tag-protein {
  background: linear-gradient(135deg, #FFF0E8, #FFE4D6);
  color: #F53F3F;
  border: 1px solid rgba(245, 63, 63, 0.15);
}

.tag-fiber {
  background: linear-gradient(135deg, #F0FFF4, #E6FFED);
  color: #00B42A;
  border: 1px solid rgba(0, 180, 42, 0.15);
}

.tag-lowcal {
  background: linear-gradient(135deg, #E8FFEA, #D9F5DC);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.15);
}

.tag-calcium {
  background: linear-gradient(135deg, #FFF7E8, #FFEFD6);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.tag-vitamin {
  background: linear-gradient(135deg, #E8F3FF, #D6E8FF);
  color: #165DFF;
  border: 1px solid rgba(22, 93, 255, 0.15);
}

.tag-energy {
  background: linear-gradient(135deg, #FFF0F0, #FFE8E8);
  color: #F53F3F;
  border: 1px solid rgba(245, 63, 63, 0.15);
}

.tag-staple {
  background: linear-gradient(135deg, #F5F0E8, #EDE6D8);
  color: #8B5A2B;
  border: 1px solid rgba(139, 90, 43, 0.15);
}

.tag-fruit {
  background: linear-gradient(135deg, #FFF0F5, #FFE8F2);
  color: #D4387A;
  border: 1px solid rgba(212, 56, 122, 0.15);
}

.tag-children {
  background: linear-gradient(135deg, #FFF8E8, #FFF0D6);
  color: #F7BA1E;
  border: 1px solid rgba(247, 186, 30, 0.15);
}

.tag-digest {
  background: linear-gradient(135deg, #F0F9FF, #E6F4FF);
  color: #0FC6C2;
  border: 1px solid rgba(15, 198, 194, 0.15);
}

.tag-eye {
  background: linear-gradient(135deg, #F0FFF0, #E8FFE8);
  color: #52C41A;
  border: 1px solid rgba(82, 196, 26, 0.15);
}

.tag-halal {
  background: linear-gradient(135deg, #F6FFED, #EDFFE6);
  color: #389E0D;
  border: 1px solid rgba(56, 158, 13, 0.15);
}

.tag-balanced {
  background: linear-gradient(135deg, #F0F5FF, #E8EFFF);
  color: #2F54EB;
  border: 1px solid rgba(47, 84, 235, 0.15);
}

.tag-lowfat {
  background: linear-gradient(135deg, #E6FFFB, #D9FFF7);
  color: #13C2C2;
  border: 1px solid rgba(19, 194, 194, 0.15);
}

.tag-warm {
  background: linear-gradient(135deg, #FFF2E8, #FFE8D6);
  color: #FA8C16;
  border: 1px solid rgba(250, 140, 22, 0.15);
}

.tag-rich {
  background: linear-gradient(135deg, #F9F0FF, #F0E6FF);
  color: #722ED1;
  border: 1px solid rgba(114, 46, 209, 0.15);
}

/* 默认标签样式 */
.meal-tags .tag:not([class*="tag-"]) {
  background: #F2F3F5;
  color: var(--text-tertiary);
}

.meal-card.selected .meal-tags .tag {
  opacity: 0.9;
}

/* 菜品项内的营养标签 */
.item-tags {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.item-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.meal-stats {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
  font-size: 13px;
}

.stat-cal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #FFF7E8, #FFEFD6);
  border-radius: 10px;
  color: #D46B08;
  font-weight: 600;
}

.stat-protein {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #FFF0E8, #FFE4D6);
  border-radius: 10px;
  color: #CF1322;
  font-weight: 600;
}

.select-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 2px solid var(--primary);
  background: white;
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
}

.select-btn.selected {
  background: var(--primary);
  color: white;
}

/* Ordered Summary */
.ordered-summary {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-top: 16px;
}

.ordered-summary.hidden {
  display: none;
}

.summary-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.ordered-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ordered-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.ordered-item:last-child {
  border-bottom: none;
}

.ordered-day {
  font-size: 14px;
  color: var(--text-tertiary);
  min-width: 50px;
}

.ordered-meal {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.ordered-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--warning);
}

/* Checkout Bar */
.checkout-bar {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--card);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  border-radius: 16px 16px 0 0;
  z-index: 90;
}

.checkout-bar.hidden {
  display: none;
}

.checkout-total {
  font-size: 14px;
  color: var(--text-secondary);
}

.total-amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.total-days {
  font-size: 13px;
  color: var(--text-tertiary);
}

.checkout-btn {
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* Tab Bar */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 60px;
  background: rgba(255,255,255,0.95);
  display: flex;
  box-shadow: 0 -1px 0 rgba(0,0,0,0.04);
  z-index: 100;
  backdrop-filter: blur(10px);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #9ca3b8;
  cursor: pointer;
  gap: 2px;
  transition: all 0.2s;
}

.tab-item.active {
  color: var(--primary);
}

.tab-item svg {
  width: 22px;
  height: 22px;
}

/* Report Page */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.report-tabs {
  display: flex;
  background: var(--card);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.report-tab {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
}

.report-tab.active {
  background: var(--primary);
  color: white;
}

.history-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--card);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
}

.score-card {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 16px;
  padding: 20px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.score-info {
  flex: 1;
}

.score-label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.score-desc {
  font-size: 13px;
  opacity: 0.8;
  line-height: 1.5;
  margin-bottom: 12px;
}

.ai-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.key-nutrients {
  display: flex;
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.nutrient-item {
  flex: 1;
  text-align: center;
}

.nutrient-divider {
  width: 1px;
  background: var(--border);
  margin: 0 16px;
}

.nutrient-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.nutrient-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.nutrient-unit {
  font-size: 12px;
  color: var(--text-tertiary);
}

.nutrient-target {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.nutrition-detail {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
}

.nutrition-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nutrition-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nutrition-name {
  width: 60px;
  font-size: 13px;
  color: var(--text-secondary);
}

.nutrition-bar {
  flex: 1;
  height: 8px;
  background: #F2F3F5;
  border-radius: 4px;
  overflow: hidden;
}

.nutrition-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.nutrition-pct {
  width: 40px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Survey Page */
.survey-list {
  margin-bottom: 16px;
}

.survey-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.2s;
}

.survey-card:active {
  transform: scale(0.98);
}

.survey-card.completed {
  opacity: 0.7;
}

.survey-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.survey-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.survey-reward {
  font-size: 14px;
  font-weight: 600;
  color: var(--warning);
}

.survey-completed {
  font-size: 14px;
  font-weight: 600;
  color: #00B42A;
}

.survey-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.survey-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.status-tag {
  color: var(--primary);
  font-weight: 600;
}

.feedback-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 12px;
}

.feedback-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #E8F3FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.feedback-info {
  flex: 1;
}

.feedback-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.feedback-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.feedback-arrow {
  font-size: 20px;
  color: var(--text-tertiary);
}

/* Survey Questions */
.survey-questions {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin-top: 16px;
}

.survey-questions.hidden {
  display: none;
}

.survey-progress {
  margin-bottom: 20px;
}

.progress-bar {
  height: 4px;
  background: #F2F3F5;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
  transition: width 0.3s;
}

.survey-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.question-num {
  font-size: 14px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #F2F3F5;
  color: var(--text-tertiary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 8px;
}

.question-type {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
  display: block;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.survey-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #F9FAFB;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.survey-option:hover {
  background: #F2F3F5;
}

.survey-option.selected {
  background: #F6FEF9;
  border-color: var(--primary);
}

.option-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #C9CDD4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.survey-option.selected .option-radio {
  border-color: var(--primary);
  background: var(--primary);
}

.radio-inner {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.option-text {
  font-size: 15px;
  color: var(--text);
  flex: 1;
}

.survey-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.btn-prev, .btn-next {
  flex: 1;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-prev {
  background: #F2F3F5;
  color: var(--text-secondary);
}

.btn-prev.hidden {
  display: none;
}

.btn-next {
  background: #C9CDD4;
  color: white;
}

.btn-next:not(:disabled) {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.btn-next:disabled {
  cursor: not-allowed;
}

/* My Page */
.profile-card {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 16px;
  padding: 20px;
  color: white;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  border: 2px solid rgba(255,255,255,0.4);
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
}

.profile-phone {
  font-size: 14px;
  opacity: 0.9;
  margin-top: 4px;
}

.children-section {
  margin-bottom: 16px;
}

.child-info-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.child-header {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.child-meta {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.metric-item {
  text-align: center;
  padding: 14px 8px;
  border-radius: 12px;
}

.metric-item.boy {
  background: linear-gradient(135deg, #e8f3ff, #f0f7ff);
}

.metric-item.girl {
  background: linear-gradient(135deg, #ffece8, #fff0ed);
}

.metric-value {
  font-size: 22px;
  font-weight: 800;
}

.metric-value.boy {
  color: var(--info);
}

.metric-value.girl {
  color: var(--girl);
}

.metric-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.allergen-tags, .preference-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.allergen-tag {
  padding: 8px 12px;
  background: #f4f6fb;
  border-radius: 10px;
  font-size: 13px;
}

.allergen-tag .level {
  font-weight: 600;
}

.allergen-tag .level.severe {
  color: var(--danger);
}

.allergen-tag .level.moderate {
  color: var(--warning);
}

.allergen-tag .level.mild {
  color: #F7BA1E;
}

.preference-tag {
  padding: 6px 12px;
  background: #f0fdf4;
  border-radius: 12px;
  font-size: 12px;
  color: var(--primary);
}

.more-functions {
  margin-bottom: 16px;
}

.function-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.function-item {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.function-item:active {
  transform: scale(0.98);
}

.function-icon {
  font-size: 28px;
}

.function-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Allergy Page */
.child-simple-info {
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.simple-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--info);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.simple-name {
  font-size: 16px;
  font-weight: 600;
}

.simple-class {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.allergy-section {
  margin-bottom: 16px;
}

.allergen-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.allergen-item {
  background: var(--card);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.allergen-icon {
  font-size: 22px;
}

.allergen-name {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}

.allergen-level {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.allergen-level.severe {
  background: #FFECE8;
  color: var(--danger);
}

.allergen-level.moderate {
  background: #FFF7E8;
  color: var(--warning);
}

.allergen-level.mild {
  background: #FFFCE8;
  color: #F7BA1E;
}

.allergen-remove {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: #F2F3F5;
  font-size: 16px;
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.allergen-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.allergen-add-item {
  background: var(--card);
  border-radius: 8px;
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.allergen-add-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.allergen-add-item:active:not(.disabled) {
  transform: scale(0.95);
}

.add-icon {
  font-size: 24px;
  display: block;
}

.add-name {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: block;
}

.setting-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-item {
  background: var(--card);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setting-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.setting-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.toggle {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #C9CDD4;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle.active {
  background: #00B42A;
}

.toggle-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle.active .toggle-dot {
  transform: translateX(20px);
}

/* Evaluate Page */
.evaluate-section {
  margin-bottom: 16px;
}

.order-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.order-card.completed {
  opacity: 0.8;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.order-date {
  font-size: 14px;
  color: var(--text-tertiary);
}

.order-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--warning);
}

.order-stars {
  display: flex;
  gap: 2px;
}

.star {
  color: var(--warning);
}

.order-meal {
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 12px;
}

.order-items {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.item-tag {
  padding: 4px 10px;
  background: #f4f6fb;
  border-radius: 8px;
  font-size: 12px;
}

.order-comment {
  font-size: 13px;
  color: var(--text-secondary);
}

.btn-evaluate {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--card);
  border-radius: 20px;
  width: 100%;
  max-width: 360px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
}

.btn-cancel, .btn-confirm {
  flex: 1;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-cancel {
  background: #F2F3F5;
  color: var(--text-secondary);
}

.btn-confirm {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

/* Confirm Modal */
.confirm-day {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.confirm-meal {
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
}

.confirm-meal-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.confirm-meal-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--warning);
  margin-bottom: 12px;
}

.confirm-meal-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.confirm-meal-items span {
  padding: 4px 10px;
  background: #f0fdf4;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Checkout Modal */
.checkout-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.checkout-day {
  font-size: 14px;
  color: var(--text-tertiary);
  min-width: 50px;
}

.checkout-meal {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.checkout-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--warning);
}

.checkout-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 16px 0;
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.checkout-total-row span:first-child {
  font-size: 15px;
  color: var(--text-secondary);
}

.checkout-total-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--warning);
}

.payment-section {
  margin-bottom: 16px;
}

.payment-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.payment-option.active {
  border-color: var(--primary);
  background: #f0fdf4;
}

.payment-icon {
  font-size: 24px;
}

.payment-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
}

.payment-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.payment-option:not(.active) .payment-check {
  display: none;
}

/* Success Modal */
.success-content {
  text-align: center;
  padding: 40px 24px;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 20px;
}

.success-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.success-desc {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
}

.success-detail {
  background: #f9fafb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.success-detail p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.success-reward {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.reward-label {
  font-size: 13px;
  color: #92400E;
  margin-bottom: 4px;
}

.reward-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--warning);
}

/* Exit Confirm Modal */
.exit-confirm {
  text-align: center;
  padding: 32px 24px;
}

.exit-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.exit-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.exit-desc {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.exit-actions {
  display: flex;
  gap: 12px;
}

/* Feedback Modal */
.feedback-types {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.feedback-type {
  padding: 8px 16px;
  background: #f4f6fb;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.feedback-type.active {
  background: var(--primary);
  color: white;
}

.feedback-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  min-height: 120px;
  resize: none;
  font-family: inherit;
}

.feedback-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Evaluate Modal */
.star-rating-section {
  text-align: center;
  margin-bottom: 20px;
}

.rating-label {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 12px;
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 32px;
}

.star-rating .star {
  color: #E5E6EB;
  cursor: pointer;
  transition: color 0.2s;
}

.star-rating .star.active {
  color: var(--warning);
}

.quick-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.quick-tag {
  padding: 6px 12px;
  background: #f4f6fb;
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.quick-tag.active {
  background: var(--primary);
  color: white;
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #C9CDD4;
  border-radius: 2px;
}
