:root {
  --primary: #2d6e9e;
  --primary-dark: #1f5277;
  --primary-light: #c6d8e6;
  --bg: #f4f1ea;
  --bg-card: #ffffff;
  --text: #2a3138;
  --text-light: #6e7680;
  --text-white: #ffffff;
  --border: #e3ddd1;
  --success: #2d8a4e;
  --success-light: #e6f4ea;
  --danger: #c14a3a;
  --danger-light: #fee2e2;
  --warning: #d69e2e;
  --warning-light: #fefce8;
  --shadow: 0 2px 8px rgba(42,49,56,0.1);
  --shadow-lg: 0 4px 16px rgba(42,49,56,0.15);
  --radius: 12px;
  --radius-sm: 8px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  padding-top: calc(52px + env(safe-area-inset-top, 0px));
  padding-bottom: 0;
  min-height: 100vh;
}
#app-header {
  position: fixed; top: 0; left: 0; right: 0; height: 52px;
  background: linear-gradient(135deg, #3a8ab8, #2d6e9e);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  padding-top: env(safe-area-inset-top, 0px);
  box-sizing: content-box;
}
.header-title { color: var(--text-white); font-size: 18px; font-weight: 700; }
#header-clock { color: white; font-size: 18px; font-weight: 700; letter-spacing: 0.05em; text-shadow: 0 1px 4px rgba(0,0,0,0.2); }
#app-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: 64px;
  background: var(--bg-card); display: flex;
  border-top: 1px solid var(--border); z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: content-box;
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border: none; background: none; color: var(--text-light);
  font-size: 11px; cursor: pointer; position: relative;
}
.nav-btn.active { color: var(--primary); }
.nav-icon { font-size: 22px; }
.nav-label { font-weight: 600; }
.nav-badge {
  position: absolute; top: 6px; right: calc(50% - 22px);
  background: var(--danger); color: white; font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* 会計一覧モーダル */
.checkout-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; cursor: pointer;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin: 8px 16px;
  transition: border-color 0.15s, background 0.15s;
}
.checkout-list-item:last-child { border-bottom: 2px solid var(--border); }
.checkout-list-item:hover { background: #f0ebe0; border-color: var(--primary); }
.checkout-list-main { flex: 1; min-width: 0; }
.checkout-list-header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.checkout-list-table { font-size: 1.05rem; font-weight: 700; color: var(--text-main); }
.checkout-list-meta { font-size: 0.8rem; color: var(--text-light); }
.checkout-item-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.checkout-item-tag {
  font-size: 0.78rem; padding: 2px 8px;
  background: #ece6da; color: #4a5158;
  border-radius: 10px; white-space: nowrap;
}
.checkout-list-bottom { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.checkout-list-total { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.checkout-price-subtotal { font-size: 0.88rem; color: var(--text-light); text-decoration: line-through; }
.checkout-list-discount { font-size: 0.85rem; font-weight: 600; color: #c0392b; }
.checkout-arrow-sep { font-size: 0.8rem; color: var(--text-light); }


.page { display: none; padding: 16px; padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); animation: fadeIn 0.2s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-top-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.page-title { font-size: 18px; font-weight: 700; flex: 1; }

/* タブ */
.order-tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 2px solid var(--border); }
.order-tab {
  flex: 1; padding: 10px; text-align: center; font-size: 15px; font-weight: 700;
  background: none; border: none; color: var(--text-light); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all 0.2s;
}
.order-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* FAB */
.fab {
  position: fixed; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); right: 20px;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--primary); color: white; border: none;
  font-size: 28px; font-weight: 700;
  box-shadow: var(--shadow-lg); cursor: pointer; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
}
.fab:active { transform: scale(0.9); }
.fab.hidden { display: none; }

.sales-tabs {
  display: flex; gap: 0; margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
  position: relative; z-index: 60;
}
.sales-tab {
  flex: 1; padding: 12px 4px; text-align: center; font-size: 14px; font-weight: 700;
  background: none; border: none; color: var(--text-light); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all 0.2s;
  min-height: 44px; -webkit-tap-highlight-color: transparent;
  position: relative; z-index: 61;
  text-decoration: none; display: flex; align-items: center; justify-content: center;
  user-select: none; -webkit-user-select: none;
}
.sales-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.sales-tab-content { display: none; }
.sales-tab-content.active { display: block; }

/* 日付ピッカー */
.orders-date-picker { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.orders-date-picker input[type="date"],
.sales-date-picker input[type="date"] {
  font-size: 15px; font-weight: 600; padding: 6px 10px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); background: white;
}
.sales-date-picker { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.btn-today, .btn-nav-date {
  background: var(--primary); color: white; border: 2px solid var(--primary);
  font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: var(--radius-sm);
  cursor: pointer;
}
.btn-nav-date { background: white; color: var(--primary); }
.btn-nav-jump { font-size: 11px; }
.date-weekday { font-size: 15px; font-weight: 700; color: var(--primary); min-width: 2em; text-align: center; }

/* テーブルグリッド */
.table-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
/* Step 8: 卓カテゴリのグルーピング (テーブル / テラス 等の接頭辞ごとに枠で囲む) */
.table-groups { display: flex; flex-direction: column; gap: 14px; }
.table-group {
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px 14px;
}
.table-group-header {
  font-size: 15px; font-weight: 700; color: var(--primary);
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.03em;
}
.table-card {
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 20px 16px; text-align: center;
  cursor: pointer; box-shadow: var(--shadow); transition: all 0.15s;
  position: relative;
}
.table-card:active { transform: scale(0.97); }
/* 使用中: ふんわり薄くしてクリック不可を示す (JS 側で onTableCardClick も弾く) */
.table-card.occupied {
  border-color: var(--primary); background: linear-gradient(135deg, #edf2f7, #dce7f1);
  opacity: 0.55; cursor: not-allowed;
}
.table-card.occupied:active { transform: none; }
/* 多選択中: 緑系で 使用中(オレンジ) と明確に区別。右上にチェックマーク */
.table-card.selected {
  border-color: var(--success); background: var(--success-light);
  box-shadow: 0 0 0 3px rgba(45,138,78,0.15), var(--shadow);
}
.table-card.selected::after {
  content: "✓"; position: absolute; top: 6px; right: 10px;
  font-size: 22px; font-weight: 900; color: var(--success); line-height: 1;
}
.table-card-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.table-card-status { font-size: 12px; color: var(--text-light); }
.table-card.occupied .table-card-status { color: var(--primary); font-weight: 600; }
.table-card-capacity { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* 注文カード */
.order-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
  box-shadow: var(--shadow); cursor: pointer; transition: all 0.15s;
}
.order-card:active { transform: scale(0.99); background: #f7f3ec; }
.order-card.paid { opacity: 0.5; }
.order-card.active.status-ready-card { background: #f0faf4; border-color: #a8d5b5; }
.order-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.order-card-table { font-size: 16px; font-weight: 700; color: var(--primary); }
.order-card-time { font-size: 12px; color: var(--text-light); margin-left: 8px; }
.order-card-status { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 10px; }
.status-active { background: var(--danger-light); color: var(--danger); }
.status-ready { background: var(--warning-light); color: var(--warning); }
.status-paid { background: var(--success-light); color: var(--success); }
.order-card-summary {
  font-size: 13px; color: var(--text-light); margin-bottom: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.order-card-footer { display: flex; align-items: center; justify-content: space-between; }
.order-card-total { font-size: 18px; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.order-card-subtotal { font-size: 13px; font-weight: 400; color: var(--text-light); text-decoration: line-through; }
.order-card-discount { font-size: 13px; font-weight: 600; color: #c0392b; }
.order-card-arrow { font-size: 13px; color: var(--text-light); }
.order-card-served { font-size: 12px; color: var(--text-light); }
.order-card-served .served-count { color: var(--success); font-weight: 600; }
.order-card-paid-time { font-size: 12px; color: var(--success); font-weight: 600; }

/* 注文詳細 */
.detail-status { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 10px; margin-left: auto; }
.order-item-row {
  display: flex; align-items: center; padding: 10px 0;
  border-bottom: 1px solid #ece6da; gap: 8px;
}
.order-item-row:last-child { border-bottom: none; }
.serve-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--border); background: white;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0; transition: all 0.15s;
}
.serve-btn.served { background: var(--success); border-color: var(--success); color: white; }
.order-item-name { flex: 1; font-size: 14px; }
.order-item-name.served { text-decoration: line-through; color: var(--text-light); }
.order-item-info { flex: 1; display: flex; flex-direction: column; }
.order-item-time { font-size: 11px; color: var(--text-light); }
.order-item-qty-price { font-size: 13px; color: var(--text-light); white-space: nowrap; }
/* 未会計の明細: 数量+金額をタップして数量変更モーダルを開く。
   枠線を持たせるとフォーム入力欄に見えてしまうので、枠は付けず
   数量だけをピルで立て、押下時のみ淡い背景を出す。 */
.order-item-qty-btn {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: none; border-radius: 999px;
  padding: 4px 6px; cursor: pointer; font-family: inherit; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.order-item-qty-btn:active { background: #ece6da; }
.order-item-qty-btn .qty-chip {
  min-width: 34px; text-align: center; padding: 3px 10px; border-radius: 999px;
  background: var(--primary-light); color: var(--primary-dark);
  font-size: 13px; font-weight: 700; line-height: 1.4; white-space: nowrap;
}
.order-item-qty-btn .qty-price {
  min-width: 46px; text-align: right;
  font-size: 13px; color: var(--text-light); white-space: nowrap;
}
/* 数量変更モーダル */
.item-qty-edit-name {
  text-align: center; font-weight: 700; font-size: 15px;
  color: var(--text); padding: 14px 20px 0;
}
.item-qty-edit-hint {
  text-align: center; font-size: 12px; color: var(--text-light); padding: 0 20px 4px;
}
/* 数量 0 = 削除 のときの警告表示 */
.item-qty-edit-hint-danger { color: var(--danger); font-weight: 700; }
.btn-primary.btn-danger-solid { background: var(--danger); }
.btn-primary.btn-danger-solid:active { background: var(--danger); opacity: 0.8; }
.item-delete-btn {
  width: 26px; height: 26px; border-radius: 50%; border: none;
  background: var(--danger-light); color: var(--danger);
  font-size: 13px; font-weight: 700; cursor: pointer; flex-shrink: 0;
  margin-left: 4px; display: flex; align-items: center; justify-content: center;
}
.item-delete-btn:active { background: var(--danger); color: white; }
.detail-footer {
  position: sticky; bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  background: var(--bg); padding: 16px 0;
  border-top: 2px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.detail-total { font-size: 20px; font-weight: 700; color: var(--primary); }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-subtotal { font-size: 14px; color: var(--text-light); text-align: right; margin-bottom: 4px; }
.detail-discount { font-size: 14px; color: var(--success); font-weight: 600; text-align: right; margin-bottom: 4px; }
.detail-paid-info { font-size: 13px; color: var(--text-light); text-align: right; margin-top: 8px; }

/* メニュー */
.menu-category { margin-bottom: 20px; }
.menu-category-title {
  font-size: 14px; font-weight: 700; color: var(--primary);
  padding: 8px 0; border-bottom: 2px solid var(--primary-light); margin-bottom: 8px;
}
.menu-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; margin-bottom: 6px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.menu-item:active { background: var(--primary-light); }
.menu-item.in-cart { border-color: var(--primary); background: #f7f3ec; }
.menu-item-info { flex: 1 1 auto; min-width: 0; }
.menu-item-name { font-size: 15px; font-weight: 600; }
.menu-item-name .recommended { color: var(--danger); font-size: 12px; margin-left: 4px; }
.menu-item-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.menu-item-price { font-size: 16px; font-weight: 700; color: var(--primary); white-space: nowrap; margin-left: 12px; }
.menu-item-cart-entries { display: flex; flex-direction: column; gap: 4px; margin-left: 8px; flex-shrink: 0; max-width: 55%; min-width: 0; }
.menu-item-qty { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.menu-item-qty .note-tag { max-width: 100%; word-break: break-word; }
.qty-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--primary); background: white; color: var(--primary);
  font-size: 18px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.qty-btn:active { background: var(--primary); color: white; }
.qty-value { font-size: 18px; font-weight: 700; min-width: 24px; text-align: center; }

/* カートバー */
.cart-bar {
  position: fixed; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); left: 12px; right: 12px;
  background: var(--primary); color: white; border-radius: var(--radius);
  padding: 14px 20px; display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 16px;
  box-shadow: var(--shadow-lg); cursor: pointer; z-index: 50;
}
.cart-bar:active { transform: scale(0.98); }
.cart-bar-action { font-size: 14px; opacity: 0.9; }
.cart-bar-modal { position: relative; bottom: auto; left: auto; right: auto; margin-top: 12px; }
/* バー全体クリック無効版 (Step 6: 内部の人数± / 確定ボタンを別個にクリックさせるため) */
.cart-bar-static { cursor: default; gap: 10px; padding: 12px 14px; }
.cart-bar-static:active { transform: none; }
.bar-info { flex: 1; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 人数ステッパー (新規注文 確定バー内) */
.party-size-stepper {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.18); padding: 4px 8px; border-radius: 8px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.party-size-label { font-size: 12px; opacity: 0.85; }
.party-step-btn {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: white; color: var(--primary);
  font-weight: 900; font-size: 17px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.party-step-btn:active { transform: scale(0.9); }
#new-table-party-size { min-width: 18px; text-align: center; font-weight: 700; }
.bar-confirm-btn {
  background: white; color: var(--primary);
  border: none; border-radius: 8px;
  padding: 8px 14px; font-weight: 700; font-size: 14px;
  cursor: pointer; white-space: nowrap;
}
.bar-confirm-btn:active { transform: scale(0.97); }
/* 人数編集モーダル (Step 6) */
.party-size-edit-body {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; padding: 28px 20px;
}
.party-step-btn-large {
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--primary);
  background: white; color: var(--primary);
  font-weight: 900; font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.party-step-btn-large:active { transform: scale(0.92); }
.party-size-display { min-width: 80px; text-align: center; display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.party-size-display #edit-party-size-value { font-size: 42px; font-weight: 800; color: var(--text); }
.party-size-unit { font-size: 16px; color: var(--text-light); font-weight: 600; }
/* 詳細画面の人数編集ボタン */
.btn-edit-party { background: white; border: 2px solid var(--primary); color: var(--primary); border-radius: 8px; padding: 8px 14px; font-weight: 700; cursor: pointer; }
.btn-edit-party:active { transform: scale(0.97); }
#page-new-menu, #page-new-confirm { padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px)); }

/* カートアイテム */
.cart-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; margin-bottom: 6px;
}
.cart-item-name { font-weight: 600; flex: 1; }
.cart-item-qty { color: var(--text-light); margin: 0 12px; }
.cart-item-price { font-weight: 700; color: var(--primary); }
.cart-item-remove { margin-left: 12px; color: var(--danger); cursor: pointer; font-size: 18px; padding: 4px; }
.cart-item-drink { flex-direction: column; align-items: stretch; gap: 10px; }
.cart-item-drink-row { display: flex; align-items: center; }
.cart-item-drink-row .cart-item-name { flex: 1; }
.drink-timing-split {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px; background: var(--primary-light); border-radius: var(--radius-sm);
}
.dts-shortcuts { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 4px; }
.dts-shortcuts .btn-small-text { padding: 4px 10px; font-size: 11px; }
.dts-cell {
  display: flex; align-items: center; gap: 10px; justify-content: flex-start;
}
.dts-cell .timing-tag { min-width: 44px; text-align: center; }
.dts-cell .qty-btn { width: 28px; height: 28px; font-size: 16px; }
.dts-cell .qty-value { min-width: 20px; font-size: 16px; text-align: center; }
.cart-summary {
  background: var(--primary-light); border-radius: var(--radius-sm);
  padding: 16px; margin: 16px 0; font-size: 14px;
}
.cart-summary-total {
  display: flex; justify-content: space-between;
  font-size: 20px; font-weight: 700; color: var(--primary);
  border-top: 2px solid var(--primary); padding-top: 8px; margin-top: 8px;
}

/* 会計 */
.bill-section { margin-bottom: 16px; }
.bill-section-title { font-size: 13px; font-weight: 700; color: var(--text-light); margin-bottom: 6px; }
.bill-item { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.bill-set {
  background: var(--success-light); border: 1px solid #c6f0c6;
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 6px;
}
.bill-set-name { font-weight: 700; color: var(--success); margin-bottom: 4px; }
.bill-set-items { font-size: 13px; color: var(--text-light); }
.bill-set-saving { font-size: 12px; color: var(--success); font-weight: 600; margin-top: 4px; }
.bill-total-section { background: var(--primary-light); border-radius: var(--radius-sm); padding: 16px; margin-top: 16px; }
.bill-total-row { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 14px; }
.bill-discount-row { color: var(--success); font-weight: 600; }
.bill-grand-total {
  display: flex; justify-content: space-between;
  font-size: 24px; font-weight: 700; color: var(--primary);
  margin-top: 8px; padding-top: 8px; border-top: 2px solid var(--primary);
}
/* 会計明細: 「ご注文内容」「会計の内訳」をそれぞれ枠で囲む */
.bill-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.bill-block:last-child { margin-bottom: 0; }
.bill-block-title {
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--text-white); background: var(--primary);
  padding: 8px 14px;
}
.bill-block-body { padding: 12px 14px; }
.bill-block-body > .bill-section:last-child { margin-bottom: 0; }
.bill-block-body > .bill-total-section:first-child { margin-top: 0; }

/* 売上 */
.sales-summary {
  background: linear-gradient(135deg, #3a8ab8, #2d6e9e); color: white;
  border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow-lg);
}
.sales-summary-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; opacity: 0.9; }
.sales-summary-total {
  display: flex; justify-content: space-between; font-size: 24px; font-weight: 700;
  margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.3);
}
.sales-pending-row { opacity: 1 !important; margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.2); font-style: italic; }
.sales-forecast-total { font-size: 18px !important; opacity: 0.85; margin-top: 4px; padding-top: 4px; border-top: 1px dashed rgba(255,255,255,0.35); }
.sales-section-title { font-size: 15px; font-weight: 700; margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--primary-light); }
.sales-category-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 12px; margin: 12px 0 4px;
  font-size: 13px; font-weight: 700; color: var(--primary);
  background: var(--primary-light); border-radius: var(--radius-sm);
}
.sales-category-header:first-of-type { margin-top: 4px; }
.sales-menu-item {
  display: grid; grid-template-columns: 1fr 60px 80px;
  align-items: center;
  padding: 10px 12px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 4px;
}
.sales-menu-name { font-weight: 600; }
.sales-menu-qty { color: var(--text-light); font-size: 13px; text-align: right; }
.sales-menu-amount { font-weight: 700; color: var(--primary); text-align: right; }

/* モーダル */
.modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}
.modal-content {
  background: var(--bg); border-radius: 20px 20px 0 0;
  width: 100%; max-height: 85vh; overflow-y: auto;
  padding: 20px 16px;
  animation: modalSlideUp 0.3s ease;
}
.modal-large { max-height: 90vh; }
@keyframes modalSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h2 { font-size: 18px; font-weight: 700; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--border); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-footer { display: flex; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ボタン類 */
.btn-primary {
  background: var(--primary); color: white; border: none; border-radius: var(--radius-sm);
  padding: 12px 24px; font-size: 15px; font-weight: 700; cursor: pointer; flex: 1;
}
.btn-primary:active { background: var(--primary-dark); transform: scale(0.98); }
.btn-primary:disabled, .btn-primary.btn-disabled { opacity: 0.4; cursor: not-allowed; }
.btn-secondary {
  background: white; color: var(--text); border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 24px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-small { padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: white; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-success { background: var(--success); color: white; border: none; border-radius: var(--radius-sm); padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-success.btn-disabled { background: #ccc; color: #888; cursor: not-allowed; }
.btn-back { background: none; border: none; color: var(--primary); font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-large { width: 100%; padding: 16px; font-size: 17px; border-radius: var(--radius); }
.btn-reload { padding: 6px 14px; border-radius: 20px; border: 2px solid var(--primary); background: white; font-size: 13px; font-weight: 700; color: var(--primary); cursor: pointer; }
.btn-reload:active { background: var(--primary); color: white; }
.btn-add-order { background: var(--primary-light); color: var(--primary); border: 2px solid var(--primary); border-radius: var(--radius-sm); padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-move-table { background: #e8f4f8; color: #2d6a7a; border: 2px solid #6db5ca; border-radius: var(--radius-sm); padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-send-order { background: var(--primary); color: #fff; border: 2px solid var(--primary); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-send-order:active { opacity: 0.85; }
.btn-send-order:disabled { opacity: 0.6; cursor: progress; }
.btn-verify { background: #eef2ff; color: #3a47a6; border: 2px solid #9aa6e8; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-verify:active { opacity: 0.85; }
/* 照合モーダル */
.compare-cols { display: flex; gap: 12px; }
.compare-col { flex: 1; min-width: 0; }
.compare-col h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; padding-bottom: 4px; border-bottom: 2px solid var(--border); }
.compare-row { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; padding: 3px 0; }
.compare-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-total { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--border); font-weight: 700; text-align: right; }
.compare-banner { padding: 10px; border-radius: var(--radius-sm); font-weight: 700; text-align: center; margin-bottom: 12px; }
.compare-ok { background: #e6f7ec; color: #1e7e44; }
.compare-ng { background: #fdecec; color: #c0392b; }
.compare-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.compare-actions button:disabled { opacity: 0.4; cursor: default; }
.compare-hint { font-size: 12px; color: var(--text-light); text-align: center; margin-top: 8px; }
.move-table-item { display: flex; align-items: center; padding: 16px 20px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background 0.15s; gap: 10px; }
.move-table-item:last-child { border-bottom: none; }
.move-table-item:hover { background: #f0f8fb; }
/* 多選択中: 緑 (.table-card.selected と同系統で視覚的整合) */
.move-table-item.selected { background: var(--success-light); border-left: 4px solid var(--success); padding-left: 16px; }
.move-table-item.selected:hover { background: var(--success-light); }
.move-table-name { flex: 1; font-size: 1.05rem; font-weight: 700; color: var(--text); }
/* 「現在」バッジ: この注文が今使っている卓であることを示す */
.move-table-badge { display: inline-block; margin-left: 6px; padding: 2px 8px; font-size: 0.7rem; font-weight: 600; background: var(--primary-light); color: var(--primary-dark); border-radius: 999px; vertical-align: middle; }
.move-table-check { font-size: 1.2rem; font-weight: 900; color: var(--success); min-width: 18px; text-align: right; }
/* 確定バー: 左にプレビュー (テーブル3,4,5 へ移動)、右にキャンセル/確定 */
.move-table-footer { display: flex; align-items: center; gap: 8px; }
.move-table-preview { flex: 1; font-size: 0.92rem; color: var(--text); font-weight: 600; }
.btn-danger-outline { background: white; color: var(--danger); border: 2px solid var(--danger); border-radius: var(--radius-sm); padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-danger-outline:active { background: var(--danger); color: white; }
.btn-small-text { padding: 8px 16px; font-size: 13px; font-weight: 700; border-radius: 8px; background: var(--primary); color: white; border: none; cursor: pointer; }
.btn-small-text:active { opacity: 0.8; }
.btn-logout { padding: 6px 14px; font-size: 12px; font-weight: 600; background: white; color: var(--danger); border: 1px solid var(--danger); border-radius: 8px; cursor: pointer; }
.btn-logout:active { background: var(--danger-light); }
.btn-danger-sm { padding: 8px 16px; font-size: 13px; font-weight: 700; background: var(--danger); color: white; border: none; border-radius: 8px; cursor: pointer; }
.btn-danger-sm:active { opacity: 0.8; }
.btn-success-sm { padding: 8px 16px; font-size: 13px; font-weight: 700; background: var(--success); color: white; border: none; border-radius: 8px; cursor: pointer; }
.btn-success-sm:active { opacity: 0.8; }

/* トースト */
.toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: white; padding: 12px 24px;
  border-radius: var(--radius); font-size: 14px; font-weight: 600;
  z-index: 300; box-shadow: var(--shadow-lg); display: none;
}

/* 空状態 */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-light); }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-text { font-size: 15px; }

/* ローディング */
.loading-state { text-align: center; padding: 60px 20px; color: var(--text-light); font-size: 15px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.loading-spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* キッチンタブ */
.kitchen-tabs {
  display: flex; gap: 0; margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.kitchen-tab {
  flex: 1; padding: 12px 4px; text-align: center; font-size: 14px; font-weight: 700;
  background: none; border: none; color: var(--text-light); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  min-height: 44px; -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.kitchen-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.kitchen-tab-content { display: none; }
.kitchen-tab-content.active { display: block; }

.uncooked-category-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 12px; margin: 12px 0 4px;
  font-size: 13px; font-weight: 700; color: var(--primary);
  background: var(--primary-light); border-radius: var(--radius-sm);
}
.uncooked-item {
  padding: 10px 12px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 4px;
  font-size: 15px; font-weight: 600;
}

/* キッチン */
.kitchen-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.kitchen-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.kitchen-table { font-size: 18px; font-weight: 700; color: var(--primary); }
.kitchen-time { font-size: 13px; color: var(--text-light); }
.kitchen-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #ece6da; }
.kitchen-item:last-child { border-bottom: none; }
.kitchen-item-urgent { background: var(--danger-light); margin: 0 -16px; padding: 10px 16px; border-radius: 6px; }
.kitchen-item-name { flex: 1; font-size: 16px; font-weight: 600; }
.kitchen-item-elapsed { font-size: 14px; font-weight: 700; color: var(--text-light); min-width: 40px; text-align: right; }
.kitchen-item-urgent .kitchen-item-elapsed { color: var(--danger); }
.kitchen-item-waiting .kitchen-item-elapsed { color: var(--text-light); }
.kitchen-item-served { opacity: 0.45; }
.kitchen-item-served .kitchen-item-name { text-decoration: line-through; }
.kitchen-item-served .kitchen-item-elapsed { color: var(--success); }
.kitchen-card-complete { background: var(--success-light); border-color: var(--success); }
.kitchen-card-complete .kitchen-item-served { opacity: 0.6; }
.kitchen-item-check { width: 24px; height: 24px; color: var(--success); font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kitchen-complete-icon { font-size: 22px; }
.kitchen-complete-msg { font-size: 16px; font-weight: 700; color: var(--success); padding: 12px 0; }
.kitchen-complete-actions { display: flex; gap: 12px; justify-content: center; padding-top: 8px; }
.kitchen-btn-done { background: var(--success); color: white; border: none; border-radius: 8px; padding: 10px 32px; font-size: 15px; font-weight: 700; cursor: pointer; }
.kitchen-btn-done:active { opacity: 0.8; }
.kitchen-btn-undo { background: white; color: var(--text-light); border: 2px solid var(--border); border-radius: 8px; padding: 10px 24px; font-size: 15px; font-weight: 600; cursor: pointer; }
.kitchen-btn-undo:active { background: #f5f5f5; }

/* タイミング・ノートタグ */
.timing-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 300; display: flex; align-items: center; justify-content: center; }
.timing-popup { background: white; border-radius: 16px; padding: 24px; width: 280px; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.timing-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.timing-subtitle { font-size: 13px; color: var(--text-light); margin-bottom: 20px; }
.timing-buttons { display: flex; gap: 12px; margin-bottom: 16px; }
.timing-btn { flex: 1; padding: 14px; border-radius: 10px; font-size: 16px; font-weight: 700; cursor: pointer; border: 2px solid; transition: all 0.15s; }
.timing-before { background: #e8f4fd; color: #2563eb; border-color: #93c5fd; }
.timing-before:active { background: #2563eb; color: white; }
.timing-anytime { background: #e6f4ea; color: #2d8a4e; border-color: #86efac; }
.timing-anytime:active { background: #2d8a4e; color: white; }
.timing-after { background: #edf2f7; color: #2d6e9e; border-color: #c6d8e6; }
.timing-after:active { background: #2d6e9e; color: white; }
/* Step 9: バックアップエクスポートダイアログ専用の主/副ボタン。
   .backup-btn-primary は「通常モード」= 既定 → 塗りつぶし主色でクリック誘導。
   .backup-btn-secondary は「互換モード」= 副 → 白背景/枠線の控えめな見た目。 */
.backup-btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.backup-btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.backup-btn-primary:active { background: var(--primary-dark); border-color: var(--primary-dark); opacity: 0.9; }
.backup-btn-primary:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.backup-btn-secondary { background: white; color: var(--primary); border-color: var(--border); }
.backup-btn-secondary:hover { border-color: var(--primary-light); background: #f7f3ec; }
.backup-btn-secondary:active { background: var(--primary-light); }
.timing-cancel { background: none; border: none; color: var(--text-light); font-size: 14px; cursor: pointer; }
.timing-tag { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 4px; display: inline-block; vertical-align: middle; margin-left: 4px; }
.timing-tag-before { background: #2563eb; color: white; }
.timing-tag-anytime { background: #2d8a4e; color: white; }
.timing-tag-after { background: #2d6e9e; color: white; }
.note-tag { font-size: 11px; font-weight: 600; color: #7b5ea7; background: #f0e8f7; padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.cake-type-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.cake-type-btn { padding: 12px 16px; font-size: 15px; font-weight: 600; background: white; color: var(--text); border: 2px solid var(--border); border-radius: 10px; cursor: pointer; text-align: left; transition: all 0.15s; }
.cake-type-btn:active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* サンキュー画面 */
.ty-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ty-card { background: white; border-radius: 16px; padding: 32px 24px; max-width: 420px; width: 100%; box-shadow: 0 4px 24px rgba(0,0,0,0.1); text-align: center; }
.ty-header { font-size: 22px; font-weight: 700; color: var(--primary); margin-bottom: 24px; }
.ty-items { text-align: left; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.ty-item { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: var(--text); }
.ty-total-section { margin-bottom: 16px; }
.ty-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; color: var(--text-light); }
.ty-discount { color: var(--success); font-weight: 600; }
.ty-total { display: flex; justify-content: space-between; padding: 8px 0; font-size: 20px; font-weight: 700; color: var(--primary); border-top: 2px solid var(--primary-light); margin-top: 8px; }
.ty-divider { height: 1px; background: var(--border); margin: 8px 0 20px; }
.ty-message { font-size: 15px; color: var(--text); line-height: 1.8; margin-bottom: 28px; }
.ty-close-btn { width: 100%; padding: 14px; font-size: 16px; font-weight: 700; background: var(--primary); color: white; border: none; border-radius: 12px; cursor: pointer; }
.ty-close-btn:active { opacity: 0.8; }

/* ログアウト */
.logout-popup { background: white; border-radius: 16px; padding: 32px 24px; max-width: 320px; width: 90%; text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.15); }
.logout-icon { font-size: 36px; margin-bottom: 12px; }
.logout-msg { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 24px; }
.logout-actions { display: flex; gap: 12px; }
.logout-btn-cancel { flex: 1; padding: 12px; font-size: 15px; font-weight: 600; background: white; color: var(--text-light); border: 2px solid var(--border); border-radius: 10px; cursor: pointer; }
.logout-btn-cancel:active { background: #f0ebe0; }
.logout-btn-ok { flex: 1; padding: 12px; font-size: 15px; font-weight: 700; background: var(--danger); color: white; border: none; border-radius: 10px; cursor: pointer; }
.logout-btn-ok:active { opacity: 0.8; }

/* 設定 */
.settings-tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 2px solid var(--border); }
.settings-tab { flex: 1; padding: 10px; text-align: center; font-size: 14px; font-weight: 700; background: none; border: none; color: var(--text-light); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.settings-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.settings-content { display: none; }
.settings-content.active { display: block; }
.settings-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.toggle-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-light); cursor: pointer; }
.toggle-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
.settings-category { margin-bottom: 20px; }
.settings-category-title { font-size: 15px; font-weight: 700; color: var(--primary); padding: 8px 0; border-bottom: 2px solid var(--primary-light); margin-bottom: 8px; }
.settings-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 6px; gap: 12px; }
.settings-item-hidden { opacity: 0.5; background: #f0ebe0; }
.settings-item-info { flex: 1; min-width: 0; }
.settings-item-name { font-size: 15px; font-weight: 600; }
.settings-item-meta { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.settings-hidden-badge { font-size: 10px; font-weight: 700; background: #999; color: white; padding: 1px 6px; border-radius: 4px; margin-left: 6px; }
.settings-set-badge { font-size: 10px; font-weight: 600; color: var(--primary); background: var(--primary-light); padding: 1px 5px; border-radius: 3px; }
.settings-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.settings-btn-edit { padding: 6px 12px; font-size: 12px; font-weight: 600; border-radius: 6px; background: white; color: var(--primary); border: 1px solid var(--primary); cursor: pointer; }
.settings-btn-edit:active { background: var(--primary-light); }
.settings-btn-hide { padding: 6px 12px; font-size: 12px; font-weight: 600; border-radius: 6px; background: white; color: var(--danger); border: 1px solid var(--danger); cursor: pointer; }
.settings-btn-hide:active { background: var(--danger-light); }
.settings-btn-restore { padding: 6px 12px; font-size: 12px; font-weight: 600; border-radius: 6px; background: var(--success); color: white; border: none; cursor: pointer; }
.settings-btn-restore:active { opacity: 0.8; }

/* フォーム */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-light); margin-bottom: 4px; }
.required { color: var(--danger); }
.form-input, .form-select { width: 100%; padding: 10px 12px; font-size: 15px; border: 2px solid var(--border); border-radius: 8px; background: white; color: var(--text); box-sizing: border-box; }
.form-input:focus, .form-select:focus { outline: none; border-color: var(--primary); }
.form-select { appearance: auto; }
.note-input { width: 100%; padding: 12px; font-size: 16px; border: 2px solid var(--border); border-radius: 8px; margin: 12px 0; box-sizing: border-box; color: var(--text); }
.note-input:focus { outline: none; border-color: var(--primary); }

/* バックアップ */
.backup-section { display: flex; flex-direction: column; gap: 16px; }
.backup-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.backup-card-icon { font-size: 36px; margin-bottom: 8px; }
.backup-card-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.backup-card-desc { font-size: 13px; color: var(--text-light); margin-bottom: 16px; }
/* 他機からコピー: 接続設定に未保存の変更があるときのバッジ (Step 9 追加) */
.peer-dirty-badge {
    display: inline-block;
    background: #fdf3d5;
    color: #b45309;
    border: 1px solid #f0c869;
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}
.restore-result { padding: 16px; border-radius: var(--radius); margin-top: 16px; }
.restore-success { background: var(--success-light); border: 1px solid var(--success); }
.restore-error { background: var(--danger-light); border: 1px solid var(--danger); color: var(--danger); }
.restore-result-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.restore-result-detail { font-size: 13px; color: var(--text-light); line-height: 1.8; }

/* 注文管理 */
.admin-select-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--primary-light); border-radius: 8px; margin-bottom: 12px; font-size: 13px; }
#admin-selected-count { font-weight: 600; color: var(--primary); }
.admin-order-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 6px; }
.admin-order-check { flex-shrink: 0; padding-top: 2px; }
.admin-order-check input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; }
.admin-order-info { flex: 1; min-width: 0; }
.admin-order-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.admin-order-table { font-size: 15px; font-weight: 700; }
.admin-order-time { font-size: 12px; color: var(--text-light); }
.admin-order-items { font-size: 13px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.admin-order-total { font-size: 14px; font-weight: 600; color: var(--primary); }

/* 会計済みカード */
.paid-order-card { padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; }
.paid-order-card:active { background: #f0ebe0; }
.paid-order-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.paid-order-table { font-size: 16px; font-weight: 700; color: var(--text); }
.paid-order-time { font-size: 13px; color: var(--text-light); }
.paid-order-items { font-size: 14px; color: #4a5158; line-height: 1.5; margin-bottom: 8px; }
.paid-order-footer { display: flex; align-items: baseline; justify-content: space-between; }
.paid-order-total { font-size: 18px; font-weight: 700; color: var(--primary); }
.paid-order-paid-time { font-size: 13px; color: var(--text-light); }

/* ユーティリティ */
.text-muted { color: var(--text-light); }
.text-sm { font-size: 13px; }
.mt-8 { margin-top: 8px; }

/* HTMX インジケータ */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.htmx-request.htmx-indicator { display: inline; }

/* ============================================
   日替わりメニュー管理
   ============================================ */
.daily-today-card {
  display: flex; align-items: center; justify-content: space-between;
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 4px;
}
.daily-today-set {
  background: var(--success-light); border: 2px solid var(--success);
}
.daily-today-unset {
  background: #f0ebe0; border: 2px dashed var(--border);
  color: var(--text-light); font-size: 14px;
}
.daily-today-name { font-size: 16px; font-weight: 700; color: var(--text); }
.daily-today-badge {
  font-size: 11px; font-weight: 700;
  background: var(--success); color: white;
  padding: 2px 8px; border-radius: 10px;
}
.daily-set-btn {
  padding: 8px 14px; border-radius: 20px; font-size: 14px; font-weight: 600;
  background: white; color: var(--text); border: 2px solid var(--border);
  cursor: pointer; transition: all 0.15s;
}
.daily-set-btn:active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.daily-set-btn-active {
  background: var(--primary); color: white; border-color: var(--primary);
}
.daily-set-btn-active:active { opacity: 0.85; }
