/* SUNNY BENTO & DELI テイクアウトWeb注文システム - デザインシステム */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

:root {
  --primary-color: #2e5b44; /* セージグリーン */
  --primary-hover: #1e3f2f;
  --secondary-color: #334155; /* スレート */
  --accent-gold: #c98a2c; /* アンバーゴールド */
  --bg-warm: #f7f5f0; /* ウォームクリーム */
  --card-bg: #ffffff;
  --text-main: #1c2826;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --success-color: #16a34a;
  --warning-color: #d97706;
  --danger-color: #dc2626;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(46, 91, 68, 0.08);
  --shadow-lg: 0 10px 25px rgba(46, 91, 68, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans JP', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-warm);
  color: var(--text-main);
  line-height: 1.6;
  padding-bottom: 90px;
}

/* ヘッダーエリア */
.store-header {
  background: linear-gradient(135deg, #1c3628 0%, #2e5b44 100%);
  color: #ffffff;
  padding: 2.8rem 1rem 2.2rem;
  text-align: center;
  position: relative;
  border-bottom: 4px solid var(--accent-gold);
  box-shadow: var(--shadow-md);
}

.store-badge {
  display: inline-block;
  background: var(--accent-gold);
  color: #fff;
  font-weight: bold;
  font-size: 0.82rem;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.store-title {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.store-tagline {
  font-size: 0.95rem;
  color: #e2e8f0;
  margin-bottom: 1.4rem;
}

.info-cards {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.info-chip {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f1f5f9;
}

.info-chip i {
  color: var(--accent-gold);
}

/* コンテナ */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* セクションタイトル */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 1.3rem;
  background-color: var(--primary-color);
  border-radius: 3px;
}

.price-flat-tag {
  background-color: #fee2e2;
  color: var(--primary-color);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* メニューグリッド */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.menu-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid #f1f5f9;
}

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

.menu-thumb-wrapper {
  width: 100%;
  height: 200px;
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.menu-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.menu-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.menu-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.menu-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.menu-price span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: normal;
}

.menu-options-preview {
  font-size: 0.8rem;
  color: #475569;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border-left: 3px solid var(--accent-gold);
  line-height: 1.4;
}

.add-btn {
  margin-top: auto;
  width: 100%;
  padding: 10px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.add-btn:hover {
  background: var(--primary-hover);
}

/* スマホ表示最適化 */
@media (max-width: 640px) {
  .container {
    padding: 1rem 0.5rem;
  }

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

  .menu-thumb-wrapper {
    height: 130px;
    padding: 4px;
  }

  .menu-body {
    padding: 0.75rem 0.5rem;
  }

  .menu-name {
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 4px;
    min-height: 2.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .menu-price {
    font-size: 1rem;
    margin-bottom: 6px;
  }

  .menu-options-preview {
    font-size: 0.72rem;
    padding: 5px 6px;
    margin-bottom: 8px;
  }

  .add-btn {
    padding: 8px 4px;
    font-size: 0.8rem;
  }

  .store-title {
    font-size: 1.7rem;
  }

  .info-cards {
    gap: 6px;
  }

  .info-chip {
    font-size: 0.78rem;
    padding: 4px 10px;
  }
}

/* 注文入力フォーム */
.order-form-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: #334155;
}

.form-label span.req {
  color: var(--danger-color);
  font-size: 0.8rem;
  margin-left: 4px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.15);
}

/* 固定ボトムカートバー */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f172a;
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.cart-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cart-count-badge {
  background: var(--primary-color);
  color: #fff;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.cart-total {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fbbf24;
}

.checkout-btn {
  background: var(--primary-color);
  color: #fff;
  padding: 10px 24px;
  border-radius: 30px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease;
}

.checkout-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.03);
}

.checkout-btn:disabled {
  background: #64748b;
  cursor: not-allowed;
  transform: none;
}

/* モーダル */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #fff;
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  background: #f8fafc;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  line-height: 1;
}

.modal-body {
  padding: 1.2rem;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* 全画面中央 音声・通知スタート 巨大赤ボタンデザイン */
.audio-start-big-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: none;
  width: 100%;
  padding: 24px 20px;
  border-radius: 16px;
  font-weight: 900;
  font-size: 1.8rem;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.4), 0 4px 0 #991b1b;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  animation: pulse-button 1.8s infinite;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes pulse-button {
  0% {
    transform: scale(1);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.4), 0 4px 0 #991b1b;
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 16px 35px rgba(220, 38, 38, 0.6), 0 6px 0 #991b1b;
  }
  100% {
    transform: scale(1);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.4), 0 4px 0 #991b1b;
  }
}

.audio-start-big-btn:hover, .audio-start-big-btn:active {
  transform: translateY(2px) scale(1.01);
  box-shadow: 0 6px 15px rgba(220, 38, 38, 0.5), 0 2px 0 #991b1b;
  background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
}

@media (max-width: 640px) {
  .audio-start-big-btn {
    font-size: 1.35rem;
    padding: 20px 14px;
  }
}

/* トッピング選択 */
.option-group {
  margin-bottom: 1.2rem;
}

.option-group-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 8px;
}

.option-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.option-label:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.option-label input:checked + .option-text {
  font-weight: 700;
  color: var(--primary-color);
}

/* サンクスページアナウンススタイル */
.thanks-alert-box {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  color: #1e3a8a;
  font-size: 0.95rem;
  line-height: 1.6;
}

.summary-list {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

.summary-item:last-child {
  border-bottom: none;
}

/* 店舗管理画面専用スタイル */
.admin-navbar {
  background: #0f172a;
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.admin-brand {
  font-size: 1.3rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-toggle-btn {
  background: var(--accent-gold);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.audio-toggle-btn.active {
  background: var(--success-color);
}

.line-config-btn {
  background: #06c755;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #fff;
  padding: 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  border-top: 3px solid var(--border-color);
}

.stat-card.new { border-top-color: var(--danger-color); }
.stat-card.preparing { border-top-color: var(--warning-color); }
.stat-card.ready { border-top-color: var(--secondary-color); }
.stat-card.completed { border-top-color: var(--success-color); }
.stat-card.cancelled { border-top-color: #64748b; }

.stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: #0f172a;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
}

/* 店舗用注文カード */
.admin-order-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
  border-left: 6px solid #cbd5e1;
}

.admin-order-card.status-new {
  border-left-color: var(--danger-color);
  background-color: #fef2f2;
  animation: pulse-border 2s infinite;
}

.admin-order-card.status-preparing { border-left-color: var(--warning-color); }
.admin-order-card.status-ready { border-left-color: var(--secondary-color); }
.admin-order-card.status-completed { border-left-color: var(--success-color); opacity: 0.75; }

.admin-order-card.status-cancelled {
  border-left-color: #64748b;
  background-color: #f8fafc;
  opacity: 0.8;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.order-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #cbd5e1;
}

.order-id-badge {
  font-weight: 800;
  font-size: 1.1rem;
  color: #0f172a;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.status-badge.new { background: var(--danger-color); }
.status-badge.preparing { background: var(--warning-color); }
.status-badge.ready { background: var(--secondary-color); }
.status-badge.completed { background: var(--success-color); }
.status-badge.cancelled { background: #64748b; }

.customer-detail {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: #334155;
}

.customer-detail strong {
  color: #0f172a;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.items-table th, .items-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.action-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 10px;
}

.btn-action {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-accept {
  background: var(--danger-color);
  color: #fff;
}
.btn-accept:hover { background: #b91c1c; }

.btn-ready {
  background: var(--secondary-color);
  color: #fff;
}
.btn-ready:hover { background: #1e40af; }

.btn-complete {
  background: var(--success-color);
  color: #fff;
}
.btn-complete:hover { background: #15803d; }

.btn-cancel-danger {
  background: #fef2f2;
  color: var(--danger-color);
  border: 1px solid #fca5a5;
}
.btn-cancel-danger:hover {
  background: var(--danger-color);
  color: #fff;
}

.alarm-banner {
  background: var(--danger-color);
  color: #fff;
  padding: 12px;
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: blink 1s infinite;
}

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

/* 日付選択ボタン */
.date-quick-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.15s ease;
}

.date-quick-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.date-quick-btn.active {
  background: #1e3a8a;
  color: #ffffff;
  border-color: #1e3a8a;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.2);
}

