/* ============================================================
   食堂报餐系统 - Design System
   主色: #FF6B35 (暖橙) / 辅色: #FFF8F0 (奶白) / 深色: #1A1A2E
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  --primary: #FF6B35;
  --primary-dark: #E8531C;
  --primary-light: #FF8C5A;
  --primary-glow: rgba(255, 107, 53, 0.15);
  --primary-bg: #FFF3ED;

  --accent: #FFB347;
  --accent-light: #FFD18C;

  --success: #27AE60;
  --success-bg: #E8F8F0;
  --warning: #F39C12;
  --warning-bg: #FEF9E7;
  --danger: #E74C3C;
  --danger-bg: #FDEDEC;
  --info: #3498DB;
  --info-bg: #EBF5FB;

  --dark: #1A1A2E;
  --dark-2: #2D2D44;
  --gray-1: #4A5568;
  --gray-2: #718096;
  --gray-3: #A0AEC0;
  --gray-4: #CBD5E0;
  --gray-5: #E2E8F0;
  --gray-6: #F7FAFC;

  --white: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #FFF8F4;
  --bg: #F5F0EB;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.15);
  --shadow-primary: 0 6px 20px rgba(255,107,53,0.30);
  --shadow-primary-sm: 0 3px 10px rgba(255,107,53,0.22);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================ RESET & BASE */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--dark);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 76px;
  min-height: 100vh;
}

/* 页面背景装饰 */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,107,53,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 100%;
  position: relative;
  z-index: 1;
}

/* ============================================================ TYPOGRAPHY */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
}

a { color: var(--primary); text-decoration: none; transition: opacity var(--transition-fast); }
a:hover { opacity: 0.8; }

/* ============================================================ NAV BAR */
.nav-bar {
  background: var(--white);
  padding: 0 20px;
  height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 0 var(--gray-5), var(--shadow-xs);
  position: sticky;
  top: 0;
  z-index: 200;
}

.nav-bar h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-bar h2::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 20px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-full);
}

.nav-bar a,
.nav-bar .btn-logout {
  color: var(--gray-2);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.nav-bar a:hover,
.nav-bar .btn-logout:hover {
  color: var(--primary);
  background: var(--primary-glow);
}

.nav-bar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================ BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 22px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition-fast);
}

.btn:hover::after { background: rgba(255,255,255,0.12); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  width: 100%;
  box-shadow: var(--shadow-primary-sm);
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  box-shadow: var(--shadow-primary);
  transform: translateY(-1px);
}

.btn-primary:active { transform: scale(0.98) translateY(0); }

.btn-secondary {
  background: var(--gray-6);
  color: var(--gray-1);
  border: 1px solid var(--gray-5);
}

.btn-secondary:hover {
  background: var(--gray-5);
  color: var(--dark);
}

.btn-danger {
  background: linear-gradient(135deg, #FF6B6B 0%, var(--danger) 100%);
  color: var(--white);
  box-shadow: 0 3px 10px rgba(231,76,60,0.25);
}

.btn-danger:hover {
  box-shadow: 0 6px 18px rgba(231,76,60,0.35);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================================ FORM ELEMENTS */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-1);
  letter-spacing: 0.2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--gray-5);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--dark);
  background: var(--white);
  transition: all var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A0AEC0' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-4);
}

textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--gray-5);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  background: var(--white);
  color: var(--dark);
  transition: all var(--transition-fast);
  min-height: 100px;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ============================================================ AUTH PAGES */
.auth-bg {
  min-height: 100vh;
  background: linear-gradient(160deg, #FF6B35 0%, #FF8C5A 35%, #FFB347 70%, #FFF3ED 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

.auth-bg::before {
  content: '';
  position: absolute;
  top: -80px; left: -80px;
  width: 360px; height: 360px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.auth-bg::after {
  content: '';
  position: absolute;
  bottom: -100px; right: -60px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.login-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px 32px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.5);
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 36px;
  box-shadow: var(--shadow-primary);
}

.login-container h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--gray-3);
  margin-bottom: 28px;
  text-align: center;
}

.login-tips {
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--primary-bg);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--gray-2);
  border: 1px solid rgba(255,107,53,0.12);
}

.login-tips p { margin: 3px 0; }
.login-tips a { color: var(--primary); font-weight: 600; }

/* ============================================================ USER HEADER CARD */
.user-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #C0392B 100%);
  padding: 24px 20px 28px;
  position: relative;
  overflow: hidden;
}

.user-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
}

.user-hero::after {
  content: '';
  position: absolute;
  bottom: -30px; left: 30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.user-hero-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  position: relative;
  z-index: 1;
}

.user-hero-greeting {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.user-hero-balance {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 16px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.2);
  position: relative;
  z-index: 1;
}

.user-hero-balance .balance-label {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
}

.user-hero-balance .balance-amount {
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}

.user-hero-balance .balance-unit {
  font-size: 15px;
  color: rgba(255,255,255,0.9);
  margin-right: 2px;
}

/* 旧版 user-info (兼容) */
.user-info {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 20px;
  margin: 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-primary);
  color: white;
}

.user-info p {
  margin: 4px 0;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
}

/* ============================================================ ANNOUNCEMENT */
.announcement {
  background: var(--white);
  margin: 12px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid rgba(255,179,71,0.2);
}

.announcement-header {
  background: linear-gradient(90deg, #FFF3CD 0%, #FFF8E6 100%);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(243,156,18,0.15);
}

.announcement-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: #9A6B00;
  letter-spacing: 0.3px;
}

.announcement-body {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--gray-1);
  line-height: 1.7;
}

/* 旧版 announcement h3::before 兼容 */
.announcement > h3 {
  padding: 14px 16px 0;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--dark);
}

.announcement > h3::before {
  content: "📢";
  margin-right: 8px;
}

.announcement > p {
  padding: 0 16px 14px;
  font-size: 14px;
  color: var(--gray-1);
}

/* ============================================================ SECTIONS */
.section {
  background: var(--white);
  margin: 12px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.04);
}

.section-header {
  padding: 16px 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
}

.section-action {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

.section-body {
  padding: 14px 18px 18px;
}

/* ============================================================ ORDER FORM */
.order-form {
  background: var(--white);
  padding: 18px 18px 20px;
  margin: 12px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

.order-form h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-form h3::before {
  content: '';
  display: block;
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* ============================================================ ORDER CARDS */
.orders-list,
.recent-orders {
  padding: 4px 16px 12px;
}

.recent-orders > h3,
.section-title-standalone {
  font-size: 16px;
  font-weight: 700;
  margin: 16px 0 12px;
  color: var(--dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-card {
  background: var(--white);
  padding: 16px;
  margin-bottom: 10px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
  transition: all var(--transition);
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.order-header > span:first-child {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.status-pending {
  background: var(--warning-bg);
  color: #9A6B00;
  border: 1px solid rgba(243,156,18,0.2);
}

.status-verified {
  background: var(--success-bg);
  color: #1A7A4A;
  border: 1px solid rgba(39,174,96,0.2);
}

.status-cancelled {
  background: var(--danger-bg);
  color: #9B2D2D;
  border: 1px solid rgba(231,76,60,0.15);
}

.order-body p {
  font-size: 13px;
  color: var(--gray-2);
  margin: 4px 0;
  line-height: 1.5;
}

.order-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.order-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--gray-2);
  background: var(--gray-6);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.order-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.order-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.order-actions .btn {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  border-radius: var(--radius);
}

/* ============================================================ WALLET */
.wallet-hero {
  background: linear-gradient(135deg, #2D3748 0%, #1A1A2E 100%);
  padding: 32px 24px 36px;
  position: relative;
  overflow: hidden;
}

.wallet-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  background: rgba(255,107,53,0.12);
  border-radius: 50%;
}

.wallet-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -20px;
  width: 160px; height: 160px;
  background: rgba(255,179,71,0.08);
  border-radius: 50%;
}

.wallet-hero-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.wallet-hero-amount {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 10px 0 0;
  position: relative;
  z-index: 1;
}

.wallet-hero-unit {
  font-size: 20px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  margin-top: 8px;
}

.wallet-hero-number {
  font-size: 52px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -2px;
  line-height: 1;
}

/* 旧版 wallet-balance 兼容 */
.wallet-balance {
  background: linear-gradient(135deg, #2D3748 0%, #1A1A2E 100%);
  color: white;
  padding: 32px 24px;
  margin: 16px;
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: 0 10px 40px rgba(26,26,46,0.25);
  position: relative;
  overflow: hidden;
}

.wallet-balance::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: rgba(255,107,53,0.1);
  border-radius: 50%;
}

.wallet-balance h3 {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.balance {
  font-size: 52px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -2px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

.transactions {
  padding: 8px 16px 16px;
}

.transactions > h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  padding: 12px 0 10px;
}

.transaction-item {
  background: var(--white);
  padding: 14px 16px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(0,0,0,0.04);
  transition: box-shadow var(--transition-fast);
}

.transaction-item:hover { box-shadow: var(--shadow-sm); }

.transaction-type {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.time {
  font-size: 11px;
  color: var(--gray-3);
  margin-top: 2px;
  display: block;
}

.amount {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.3px;
}

.amount.positive { color: var(--success); }
.amount.negative { color: var(--danger); }

/* ============================================================ QR PAGE */
.qr-display {
  padding: 20px 16px;
  text-align: center;
}

.qr-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
  border: 1px solid rgba(0,0,0,0.05);
}

.qr-order-no {
  font-size: 12px;
  color: var(--gray-3);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.qr-order-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
}

.qr-code-wrapper {
  display: inline-block;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--gray-5);
  margin: 0 auto 16px;
}

.qr-display img {
  max-width: 220px;
  border-radius: var(--radius);
  display: block;
  margin: 0 auto;
}

.qr-hint {
  font-size: 13px;
  color: var(--gray-3);
  margin-top: 12px;
}

.qr-order-info {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 12px 0;
}

.qr-info-chip {
  background: var(--gray-6);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 13px;
  color: var(--gray-1);
  font-weight: 500;
}

/* ============================================================ STATS */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 16px;
}

.stat-card {
  background: var(--white);
  padding: 16px 12px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
  transition: all var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-card h3 {
  font-size: 11px;
  color: var(--gray-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-number {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 8px;
  letter-spacing: -0.5px;
  line-height: 1;
}

/* Stats with icons */
.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin: 0 auto 8px;
}

/* ============================================================ ADMIN MENU */
.admin-menu {
  padding: 8px 16px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.menu-item {
  background: var(--white);
  padding: 18px 14px;
  border-radius: var(--radius-lg);
  text-align: center;
  text-decoration: none;
  color: var(--dark);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
  transition: all var(--transition);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.menu-item-icon {
  font-size: 26px;
  line-height: 1;
}

.menu-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: var(--primary-bg);
  color: var(--primary);
  border-color: rgba(255,107,53,0.15);
}

/* ============================================================ SCAN PAGE */
.scan-container {
  padding: 0 16px 16px;
}

#qr-reader {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

#result {
  margin-top: 14px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

.manual-input {
  padding: 16px;
  background: var(--white);
  margin: 0 16px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

.manual-input h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.manual-input .form-group {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
}

.manual-input input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-5);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
}

.manual-input .btn {
  width: auto;
  padding: 11px 20px;
}

/* ============================================================ FILTER FORM */
.filter-form {
  padding: 12px 16px;
  background: var(--white);
  margin: 12px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

.filter-form form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter-form input[type="date"] {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-5);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--dark);
  background: var(--gray-6);
}

.filter-form .btn {
  width: auto;
  padding: 10px 20px;
  font-size: 14px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tabs .btn {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 13px;
}

/* ============================================================ CARD LISTS */
.config-list,
.type-list,
.period-list,
.user-list {
  padding: 4px 16px 16px;
}

.config-item,
.type-card,
.period-card,
.user-card {
  background: var(--white);
  padding: 16px;
  margin-bottom: 10px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

.config-item h3,
.type-card h3,
.period-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--dark);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.card-actions .btn {
  flex: 1;
  min-width: 80px;
  padding: 9px 14px;
  font-size: 13px;
}

/* ============================================================ ANNOUNCEMENT ADMIN */
.announcement-form {
  background: var(--white);
  padding: 18px;
  margin: 12px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

.announcement-form h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--dark);
}

.announcement-list {
  padding: 4px 16px 16px;
}

.announcement-item {
  background: var(--white);
  padding: 16px;
  margin-bottom: 10px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255,179,71,0.15);
  border-left: 3px solid var(--accent);
}

/* ============================================================ FORMS (type/period/recharge/address) */
.recharge-form,
.address-form,
.type-form,
.period-form {
  background: var(--white);
  padding: 18px;
  margin: 12px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

.recharge-form h3,
.address-form h3,
.type-form h3,
.period-form h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.address-list {
  padding: 4px 16px 16px;
}

.address-item {
  background: var(--white);
  padding: 16px;
  margin-bottom: 10px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

/* ============================================================ REPORT TABLE */
.report-table {
  padding: 0 16px 16px;
  overflow-x: auto;
}

.report-table table {
  width: 100%;
  background: var(--white);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

.report-table th {
  background: linear-gradient(90deg, var(--primary-bg) 0%, #FFF8F4 100%);
  padding: 13px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-1);
  letter-spacing: 0.4px;
  border-bottom: 1px solid rgba(255,107,53,0.1);
}

.report-table td {
  padding: 13px 16px;
  font-size: 14px;
  color: var(--gray-1);
  border-bottom: 1px solid var(--gray-5);
}

.report-table tr:last-child td { border-bottom: none; }

.report-table tr:hover td {
  background: var(--gray-6);
}

/* ============================================================ MESSAGES */
.error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--danger);
  background: var(--danger-bg);
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(231,76,60,0.15);
}

.success {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  background: var(--success-bg);
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(39,174,96,0.15);
}

.text-muted {
  color: var(--gray-3);
  font-size: 13px;
}

/* ============================================================ BOTTOM NAV */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 10px;
  box-shadow: 0 -1px 0 var(--gray-5), 0 -4px 20px rgba(0,0,0,0.07);
  z-index: 200;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  color: var(--gray-3);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: all var(--transition-fast);
  border-radius: var(--radius);
  position: relative;
}

.bottom-nav a .nav-icon {
  font-size: 22px;
  line-height: 1;
  transition: transform var(--transition-fast);
}

.bottom-nav a.active {
  color: var(--primary);
}

.bottom-nav a.active .nav-icon {
  transform: scale(1.1);
}

.bottom-nav a.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 var(--radius-full) var(--radius-full);
}

/* ============================================================ EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-3);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.empty-state-text {
  font-size: 14px;
  color: var(--gray-3);
}

/* ============================================================ BADGE */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

/* ============================================================ LOADING */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.7s linear infinite;
}

.skeleton {
  background: linear-gradient(90deg, var(--gray-5) 25%, var(--gray-6) 50%, var(--gray-5) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
  height: 16px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================ UTILS */
.divider {
  height: 1px;
  background: var(--gray-5);
  margin: 16px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--gray-6);
  color: var(--gray-1);
}

/* ============================================================ RESPONSIVE */
@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
    background: var(--bg);
  }

  .container {
    max-width: 680px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    background: rgba(245, 240, 235, 0.5);
    min-height: 100vh;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-menu {
    grid-template-columns: repeat(2, 1fr);
  }

  .bottom-nav {
    display: none;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 720px;
  }

  .admin-menu {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================ PAGE ENTRY ANIMATIONS */
.order-card,
.stat-card,
.menu-item,
.transaction-item,
.user-card,
.type-card,
.period-card,
.config-item,
.announcement-item {
  animation: fadeInUp 0.3s ease both;
}
