/* ============================================================
   给宝贝的专属菜单 —— 可爱浪漫风
   ============================================================ */

:root {
  --bg: #fff6f7;
  --card: #ffffff;
  --primary: #ff6f9c;
  --primary-dark: #f05183;
  --primary-soft: #ffd9e4;
  --accent: #ffb3c6;
  --cream: #fff0f3;
  --text: #5a3d4a;
  --text-muted: #b08498;
  --shadow: 0 6px 20px rgba(255, 111, 156, 0.12);
  --radius: 22px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  background: linear-gradient(180deg, #ffe4ec 0%, var(--bg) 28%);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 110px;
}

/* ---------------- Hero ---------------- */
.hero {
  text-align: center;
  padding: 34px 20px 22px;
}

.hero-hearts span {
  display: inline-block;
  font-size: 20px;
  margin: 0 4px;
  animation: float 2.6s ease-in-out infinite;
}
.hero-hearts span:nth-child(2) {
  animation-delay: 0.4s;
}
.hero-hearts span:nth-child(3) {
  animation-delay: 0.8s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 8px 0 6px;
  letter-spacing: 1px;
}

.hero-sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------------- 分类 Tab ---------------- */
.tabs {
  display: flex;
  gap: 10px;
  padding: 8px 16px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 6px 16px rgba(240, 81, 131, 0.35);
}

/* ---------------- 菜品卡片 ---------------- */
.menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 4px 16px 20px;
  max-width: 560px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .menu {
    grid-template-columns: 1fr 1fr;
    max-width: 720px;
  }
}

.dish-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
  animation: rise 0.3s ease both;
}

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

.dish-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.dish-emoji {
  font-size: 34px;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  border-radius: 18px;
}

.dish-info {
  min-width: 0;
}

.dish-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.dish-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dish-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.dish-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-dark);
}

.dish-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dish-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
}

/* 加减按钮 */
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(240, 81, 131, 0.3);
  transition: transform 0.1s ease;
}
.step-btn:active {
  transform: scale(0.9);
}

.step-add {
  font-size: 20px;
}

.step-num {
  min-width: 16px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}

/* ---------------- 购物车栏 ---------------- */
.cart-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 560px;
  margin: 0 auto;
  background: linear-gradient(135deg, #ff7fa5, var(--primary-dark));
  border-radius: 999px;
  padding: 10px 12px 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(240, 81, 131, 0.4);
  z-index: 20;
}

.cart-info {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #fff;
}

.cart-label {
  font-size: 13px;
  opacity: 0.9;
}

.cart-count {
  background: #fff;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 13px;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.cart-total {
  font-size: 20px;
  font-weight: 800;
}

.cart-submit {
  border: none;
  background: #fff;
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cart-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.cart-submit:not(:disabled):active {
  transform: scale(0.96);
}

/* ---------------- 弹层 ---------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(90, 61, 74, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
  animation: fade 0.2s ease;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--card);
  border-radius: 26px;
  padding: 24px 22px;
  width: 100%;
  max-width: 380px;
  position: relative;
  box-shadow: 0 20px 60px rgba(90, 61, 74, 0.3);
  animation: pop 0.25s ease;
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: none;
  background: none;
  font-size: 26px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 14px;
}

.modal-summary {
  background: var(--cream);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 3px 0;
  color: var(--text);
}

.summary-total {
  border-top: 1px dashed var(--accent);
  margin-top: 6px;
  padding-top: 8px;
  font-weight: 800;
  color: var(--primary-dark);
  font-size: 16px;
}

.modal-note {
  width: 100%;
  border: 2px solid var(--primary-soft);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  height: 72px;
  outline: none;
  color: var(--text);
  margin-bottom: 14px;
}
.modal-note:focus {
  border-color: var(--primary);
}

.modal-confirm {
  width: 100%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  padding: 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(240, 81, 131, 0.35);
}
.modal-confirm:disabled {
  opacity: 0.6;
}

/* 成功弹层 */
.success-card {
  background: var(--card);
  border-radius: 26px;
  padding: 34px 26px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(90, 61, 74, 0.3);
  animation: pop 0.3s ease;
}

.success-hearts {
  font-size: 40px;
  animation: float 1.6s ease-in-out infinite;
}

.success-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 12px 0 8px;
}

.success-text {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.success-close {
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 12px 40px;
  border-radius: 999px;
  cursor: pointer;
}

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  background: rgba(90, 61, 74, 0.92);
  color: #fff;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  z-index: 60;
  animation: fade 0.2s ease;
}

/* ============================================================
   管理页
   ============================================================ */
.admin-body {
  padding-bottom: 40px;
}

.admin-hero {
  padding-bottom: 12px;
}

.login-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 24px;
  max-width: 380px;
  margin: 8px auto;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.login-input {
  width: 100%;
  border: 2px solid var(--primary-soft);
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 15px;
  outline: none;
  margin-bottom: 14px;
  text-align: center;
}
.login-input:focus {
  border-color: var(--primary);
}

.login-btn {
  width: 100%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  padding: 13px;
  border-radius: 999px;
  cursor: pointer;
}
.login-btn:disabled {
  opacity: 0.6;
}

.login-error {
  color: #e5484d;
  font-size: 13px;
  margin-top: 12px;
}

.orders {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px;
}

.orders-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.ghost-btn {
  flex: 1;
  border: 2px solid var(--primary-soft);
  background: var(--card);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
  padding: 10px;
  border-radius: 999px;
  cursor: pointer;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.order-head {
  margin-bottom: 10px;
}

.order-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

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

.order-total {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
}

.order-items {
  list-style: none;
}

.order-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  padding: 4px 0;
}

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

.order-price {
  margin-left: auto;
  font-weight: 700;
}

.order-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--accent);
  font-size: 14px;
  color: var(--text);
}

.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 15px;
}
