/* ==========================================
   UmiDesk style.css — マリン専用版
   ========================================== */

/* --- Reset & Variables --- */
:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-light: #e0f2fe;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,.1);
  --header-h: 52px;
  --nav-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
}

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

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--gray-800);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}

/* --- Header --- */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center;
  padding: 0 12px;
  box-shadow: var(--shadow);
}
.header-left { display: flex; align-items: center; gap: 12px; }
.app-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.shop-select {
  background: rgba(255,255,255,.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  padding: 4px 8px;
  font-size: 13px;
  outline: none;
}
.shop-select option { color: var(--gray-800); background: #fff; }

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: #fff;
  border-top: 1px solid var(--gray-200);
  display: flex;
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none;
  color: var(--gray-400);
  font-size: 10px;
  transition: color .15s;
}
.nav-item.active { color: var(--primary); }
.nav-icon { font-size: 22px; margin-bottom: 2px; }
.nav-label { font-weight: 500; }

/* --- Main Content --- */
.main-content {
  margin-top: var(--header-h);
  margin-bottom: var(--nav-h);
  padding: 12px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Card --- */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 15px; margin-bottom: 12px; color: var(--gray-700); }
.card h4 { font-size: 14px; margin: 16px 0 8px; color: var(--gray-700); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px;
  border: none; border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-small { padding: 6px 12px; font-size: 12px; }
.btn-icon { background: none; border: none; font-size: 18px; cursor: pointer; padding: 4px 8px; }
.btn-group { display: flex; gap: 8px; margin-top: 12px; }

/* --- Form elements --- */
input[type="text"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; }

/* --- Confirm Grid --- */
.confirm-grid { display: grid; gap: 8px; }
.confirm-row {
  display: flex; align-items: center; gap: 8px;
}
.confirm-row label {
  min-width: 80px;
  font-size: 12px; font-weight: 600;
  color: var(--gray-500);
  flex-shrink: 0;
}
.confirm-row input,
.confirm-row select {
  flex: 1; max-width: 300px;
}

/* --- Status Badge --- */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

/* --- LINE Input --- */
#line-input {
  width: 100%;
  font-size: 13px;
  line-height: 1.6;
  font-family: monospace, var(--font);
  background: var(--gray-50);
  margin-bottom: 8px;
}

/* --- Participants Table --- */
.participants-table-wrap { overflow-x: auto; margin: 8px -16px; padding: 0 16px; }
.participants-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}
.participants-table th {
  background: var(--gray-100);
  padding: 6px 4px;
  font-size: 11px;
  color: var(--gray-500);
  text-align: center;
  position: sticky; top: 0;
}
.participants-table td {
  padding: 4px;
  border-bottom: 1px solid var(--gray-100);
  text-align: center;
}
.p-input {
  padding: 4px 6px !important;
  font-size: 12px !important;
  text-align: center;
}
.p-name { width: 90px; text-align: left !important; }
.p-num { width: 50px; }
.p-gender { width: 55px; }
.p-vision { width: 70px; }
.eq-cell {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 12px;
}

/* --- Options --- */
.option-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-100);
}
.option-row label { flex: 1; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.qty-input { width: 60px !important; text-align: center; }

/* --- Price Summary --- */
.price-summary {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 12px;
  margin: 12px 0;
}
.price-row {
  display: flex; justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}
.price-total {
  font-weight: 700;
  font-size: 16px;
  border-top: 2px solid var(--primary);
  padding-top: 8px;
  margin-top: 4px;
  color: var(--primary-dark);
}

/* --- Done --- */
.done-message { text-align: center; padding: 24px 0; }
.done-icon { font-size: 48px; }
.done-message h3 { margin: 12px 0 8px; }

/* --- Page Header --- */
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.page-header h2 { font-size: 18px; }
.header-actions { display: flex; gap: 4px; }
.header-actions .btn.active { background: var(--primary); color: #fff; }

/* --- Date Navigation --- */
.date-nav {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
  background: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.date-nav input[type="date"] { flex: 1; max-width: 180px; }

/* --- Time Group --- */
.time-group { margin-bottom: 16px; }
.time-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 8px;
}
.time-header h3 { font-size: 16px; color: var(--primary-dark); }
.slot-info { font-size: 12px; color: var(--gray-500); }
.slot-low { color: var(--danger); font-weight: 600; }

/* --- Booking Card --- */
.booking-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 6px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow .15s;
  border-left: 3px solid var(--primary);
}
.booking-card:hover { box-shadow: var(--shadow-md); }
.card-header {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 6px;
}
.shop-tag {
  font-size: 10px; padding: 1px 6px;
  border: 1px solid; border-radius: 8px;
}
.course-name { font-size: 12px; color: var(--gray-500); }
.card-body { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-main { flex: 1; }
.rep-name { font-weight: 600; font-size: 15px; margin-right: 6px; }
.people-count { font-size: 13px; color: var(--gray-500); }
.card-sub { display: flex; gap: 4px; }
.tag-pickup, .tag-local, .tag-medical, .tag-option {
  font-size: 11px; padding: 1px 6px;
  border-radius: 6px;
  background: var(--gray-100);
}
.tag-medical { background: #fef3c7; color: #92400e; }
.card-price { font-weight: 700; color: var(--primary-dark); font-size: 14px; }

/* --- Calendar --- */
.calendar { background: #fff; border-radius: var(--radius-lg); padding: 12px; box-shadow: var(--shadow); }
.cal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-dow {
  text-align: center; font-size: 11px; font-weight: 600;
  color: var(--gray-400); padding: 4px 0;
}
.cal-cell {
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .1s;
  position: relative;
}
.cal-cell:hover { background: var(--gray-100); }
.cal-empty { cursor: default; }
.cal-day { font-size: 13px; font-weight: 500; }
.cal-count { font-size: 9px; color: var(--primary-dark); }
.cal-selected { background: var(--primary-light) !important; }
.cal-today .cal-day {
  background: var(--primary); color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cal-has-booking { background: #ecfdf5; }

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--gray-400);
}
.empty-state p { margin-bottom: 16px; font-size: 15px; }

/* --- Equipment Table --- */
.equipment-table-wrap { overflow-x: auto; }
.equipment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}
.equipment-table th {
  background: var(--primary);
  color: #fff;
  padding: 8px 6px;
  font-size: 12px;
  text-align: center;
}
.equipment-table td {
  padding: 6px;
  border-bottom: 1px solid var(--gray-200);
  text-align: center;
}
.equipment-table tr:nth-child(even) { background: var(--gray-50); }

/* --- Settings --- */
.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.settings-table th {
  background: var(--gray-100);
  padding: 6px 10px;
  text-align: left;
  font-size: 12px;
  color: var(--gray-500);
}
.settings-table td { padding: 8px 10px; border-bottom: 1px solid var(--gray-100); }
.hint { font-size: 11px; color: var(--gray-400); margin-top: 8px; }

/* --- Modal --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-content {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 480px; width: 100%;
  max-height: 80vh; overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200);
}
.modal-header h3 { font-size: 15px; }
.btn-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--gray-400); }
.modal-body { padding: 16px; }
.modal-body p { margin-bottom: 6px; font-size: 13px; }
.modal-body h4 { font-size: 14px; margin: 12px 0 6px; }
.modal-body ul { margin-left: 16px; font-size: 13px; }
.modal-body li { margin-bottom: 4px; }

/* --- Utility --- */
.text-warning { color: var(--warning); font-weight: 600; }
.date-label { font-size: 14px; color: var(--gray-500); }

/* --- Responsive: Tablet+ --- */
@media (min-width: 768px) {
  .main-content { padding: 16px 24px; }
  .confirm-row label { min-width: 120px; }
  .booking-card { padding: 12px 16px; }
  .cal-cell { aspect-ratio: auto; padding: 8px 4px; min-height: 60px; }
  .cal-day { font-size: 14px; }
  .cal-count { font-size: 10px; }
}

/* --- Responsive: Desktop --- */
@media (min-width: 1024px) {
  .bottom-nav {
    position: fixed; top: var(--header-h); left: 0; bottom: 0;
    width: 72px; height: auto;
    flex-direction: column;
    border-top: none; border-right: 1px solid var(--gray-200);
    padding-top: 8px;
    box-shadow: none;
  }
  .nav-item {
    padding: 12px 0;
    border-radius: 0;
  }
  .main-content {
    margin-left: 72px;
    margin-bottom: 0;
    max-width: 1000px;
  }
}

/* ==========================================
   Step 2 追加スタイル
   ========================================== */

/* --- 拡張モーダル --- */
.modal-large { max-width: 680px; }
.detail-section { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-100); }
.detail-section:last-of-type { border-bottom: none; }
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.detail-item { font-size: 13px; }
.detail-label { font-size: 11px; color: var(--gray-400); display: block; }
.detail-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.detail-row label { min-width: 80px; font-size: 12px; font-weight: 600; color: var(--gray-500); }
.detail-row select, .detail-row input { flex: 1; max-width: 220px; }
.alert-box {
  background: #fef3c7; color: #92400e;
  padding: 8px 12px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  margin-top: 8px;
}

/* --- チーム分け --- */
.team-suggestion {
  background: var(--gray-50); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 8px;
}
.team-row {
  display: flex; justify-content: space-between;
  padding: 4px 0; font-size: 13px;
}
.team-note { font-size: 12px; color: var(--primary-dark); margin-top: 4px; }
.team-assign { margin-top: 8px; }

/* --- テンプレート --- */
.template-buttons { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.template-output {
  width: 100%; font-size: 12px; line-height: 1.6;
  font-family: var(--font); background: var(--gray-50);
  margin-bottom: 4px;
}

/* --- 詳細アクション --- */
.detail-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-200); }
.btn-danger-outline {
  background: none; border: 1px solid var(--danger); color: var(--danger);
  border-radius: var(--radius); padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-danger-outline:hover { background: #fef2f2; }
.text-success { color: var(--success); font-weight: 600; }

/* --- 器材準備リスト拡張 --- */
.eq-time-card { margin-bottom: 16px; }
.eq-time-card h3 { color: var(--primary-dark); border-bottom: 2px solid var(--primary); padding-bottom: 6px; }
.group-first td { border-top: 2px solid var(--gray-300); }
.equipment-table td small { color: var(--gray-400); font-size: 10px; }

/* --- サイズ集計 --- */
.summary-grid { display: grid; gap: 8px; }
.summary-item { display: flex; align-items: flex-start; gap: 8px; }
.summary-item label { min-width: 90px; font-size: 12px; font-weight: 600; color: var(--gray-500); padding-top: 2px; }
.count-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px; font-weight: 600;
  margin: 2px;
}

/* --- 印刷用 --- */
@media print {
  .app-header, .bottom-nav, .page-header, #btn-print-invoice, #btn-print-eq, .btn-group, .billing-actions, .billing-add-option { display: none !important; }
  .main-content { margin: 0; padding: 0; }
  .card, .invoice-section { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
  .invoice-table, .equipment-table { font-size: 11px; }
  .invoice-table th, .equipment-table th { background: #333 !important; color: #fff !important; -webkit-print-color-adjust: exact; }
  .tab-bar { display: none !important; }
}

/* ==========================================
   Step 3 追加スタイル
   ========================================== */

/* --- タブバー --- */
.tab-bar {
  display: flex; gap: 2px;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 3px;
  margin-bottom: 12px;
}
.tab-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 4px;
  border: none; border-radius: var(--radius);
  background: transparent;
  color: var(--gray-400);
  font-size: 10px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.tab-btn.tab-active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow);
}
.tab-icon { font-size: 18px; margin-bottom: 2px; }

/* --- 帳票テーブル --- */
.invoice-section { margin-bottom: 16px; }
.invoice-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; white-space: nowrap;
}
.invoice-table th {
  background: var(--gray-700); color: #fff;
  padding: 6px 8px; font-size: 11px; text-align: center;
}
.invoice-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--gray-100);
  text-align: center;
}
.invoice-table.compact td { padding: 4px 6px; font-size: 12px; }
.invoice-table tr:nth-child(even) { background: var(--gray-50); }
.total-row td { border-top: 2px solid var(--gray-700); font-weight: 700; }
.text-right { text-align: right !important; }
.time-title { color: var(--primary-dark); border-bottom: 2px solid var(--primary); padding-bottom: 4px; margin-bottom: 8px; font-size: 15px; }
.brand-sub { color: var(--gray-400); font-size: 10px; }
.date-input-sm { width: 140px !important; font-size: 13px; }
.inline-input { border: 1px solid var(--gray-200) !important; padding: 4px 6px !important; font-size: 12px !important; width: 120px !important; }

/* --- サイズ集計（帳票内） --- */
.summary-section { background: var(--gray-50); border-radius: var(--radius); padding: 12px; }
.summary-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.summary-row label { min-width: 90px; font-size: 12px; font-weight: 600; color: var(--gray-500); }

/* --- 送迎 --- */
.pickup-summary {
  display: flex; gap: 16px; align-items: center;
  padding: 8px 12px;
  background: var(--primary-light);
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 14px;
}
.tag-full { background: var(--danger); color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }

/* --- 段取り --- */
.op-overview {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.op-stat {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 12px 16px;
  text-align: center; min-width: 70px;
}
.op-num { display: block; font-size: 24px; font-weight: 700; color: var(--primary-dark); }
.op-label { font-size: 11px; color: var(--gray-400); }
.time-block { margin-bottom: 12px; }
.time-block h4 { font-size: 14px; color: var(--primary-dark); margin-bottom: 4px; }

/* --- 精算カード --- */
.billing-card {
  background: #fff; border-radius: var(--radius-lg);
  margin-bottom: 12px; box-shadow: var(--shadow);
  border-left: 4px solid var(--warning);
  overflow: hidden;
}
.billing-card.billing-paid { border-left-color: var(--success); opacity: 0.85; }
.billing-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
}
.billing-time { color: var(--gray-400); font-size: 12px; margin: 0 8px; }
.billing-people { font-size: 12px; color: var(--gray-500); }
.billing-course { font-size: 12px; color: var(--primary-dark); margin-left: 4px; }
.billing-status { font-size: 12px; font-weight: 600; }
.billing-status.paid { color: var(--success); }
.billing-status.unpaid { color: var(--warning); }
.billing-body { padding: 12px 14px; }
.billing-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0; font-size: 13px;
}
.billing-row label { font-size: 12px; color: var(--gray-500); font-weight: 600; }
.billing-total-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; margin: 4px 0;
  border-top: 2px solid var(--gray-300);
  font-weight: 700; font-size: 15px;
}
.billing-total { color: var(--primary-dark); }
.billing-local { background: var(--primary-light); padding: 6px 8px; border-radius: var(--radius); margin: 4px 0; }
.billing-add-option { padding: 4px 0; }
.billing-actions { display: flex; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--gray-100); }
.prepaid-input { width: 120px !important; text-align: right; }

/* --- お釣り計算 --- */
.change-calc {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 13px;
}
.change-calc label { font-size: 12px; color: var(--gray-500); font-weight: 600; }
.change-calc input { width: 100px !important; text-align: right; }
.change-ok { color: var(--success); font-weight: 600; }
.change-ng { color: var(--danger); font-weight: 600; }

/* --- 日次締め --- */
.close-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.close-stat {
  background: var(--primary-light); border-radius: var(--radius);
  padding: 16px 20px; text-align: center; min-width: 80px; flex: 1;
}
.close-num { display: block; font-size: 22px; font-weight: 700; color: var(--primary-dark); }
.success-box {
  background: #ecfdf5; color: #065f46;
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  margin-bottom: 12px;
}

/* --- 日報 --- */
.report-field { margin-bottom: 12px; }
.report-field label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-500); margin-bottom: 4px; }

/* --- 8タブ対応ナビ --- */
.bottom-nav .nav-item { padding: 4px 0; }
.nav-icon { font-size: 18px; }
.nav-label { font-size: 8px; }

@media (min-width: 1024px) {
  .bottom-nav { width: 76px; }
  .main-content { margin-left: 76px; }
  .nav-label { font-size: 9px; }
}

/* ==========================================
   Step 4 追加スタイル
   ========================================== */

/* --- 海況ダッシュボード --- */
.chart-container { min-height: 200px; }
.chart-container canvas { width: 100%; height: auto; border-radius: var(--radius); }
.weather-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.weather-card {
  background: var(--gray-50); border-radius: var(--radius);
  padding: 16px 20px; text-align: center; min-width: 100px; flex: 1;
}
.weather-card.weather-warning { background: #fef3c7; border: 1px solid #f59e0b; }
.weather-value { font-size: 22px; font-weight: 700; color: var(--gray-800); }
.weather-label { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.weather-alert {
  width: 100%; background: #fef3c7; color: #92400e;
  padding: 8px 12px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; margin-top: 8px;
}
.tide-info { display: flex; gap: 12px; margin-bottom: 8px; }
.tide-type { font-size: 16px; font-weight: 700; color: var(--primary-dark); }
.lunar-day { font-size: 13px; color: var(--gray-400); }
.tide-times { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.tide-high { color: #ef4444; font-size: 13px; font-weight: 600; }
.tide-low { color: #22c55e; font-size: 13px; font-weight: 600; }
.sea-notes { background: var(--gray-50); border-radius: var(--radius); padding: 10px; margin-top: 8px; }
.sea-notes p { font-size: 12px; margin-bottom: 4px; }
.loading { color: var(--gray-400); font-size: 13px; }
.error { color: var(--danger); font-size: 13px; }

/* --- 予約枠 --- */
.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.slot-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 12px; text-align: center;
  box-shadow: var(--shadow); border: 2px solid transparent;
}
.slot-card.slot-ok { border-color: var(--success); }
.slot-card.slot-few { border-color: var(--warning); }
.slot-card.slot-full { border-color: var(--danger); background: #fef2f2; }
.slot-card.slot-closed { opacity: 0.5; }
.slot-time { font-size: 16px; font-weight: 700; color: var(--gray-800); }
.slot-bar { height: 6px; background: var(--gray-200); border-radius: 3px; margin: 6px 0; overflow: hidden; }
.slot-bar-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width .3s; }
.slot-full .slot-bar-fill { background: var(--danger); }
.slot-few .slot-bar-fill { background: var(--warning); }
.slot-numbers { font-size: 12px; color: var(--gray-500); }
.slot-remaining { font-size: 14px; font-weight: 700; color: var(--primary-dark); }
.slot-closed-label { font-size: 10px; color: var(--danger); font-weight: 600; margin-top: 2px; }
.slot-pickup-info { font-size: 14px; color: var(--gray-700); }

/* --- 設定ページ拡張 --- */
.settings-input { padding: 6px 8px !important; font-size: 13px !important; }
.settings-price { width: 100px !important; text-align: right; }
.settings-num { width: 60px !important; text-align: center; }
.settings-field { margin-bottom: 12px; }
.settings-field label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-500); margin-bottom: 4px; }
.btn-icon-sm { background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px; }
.btn-icon-sm:hover { opacity: 0.7; }
.template-edit-section { margin-bottom: 16px; }
.template-edit-section h4 { font-size: 13px; color: var(--gray-700); margin-bottom: 4px; }
.template-textarea { width: 100%; font-size: 12px; line-height: 1.6; font-family: var(--font); }

/* ==========================================
   ダッシュボード（ホーム）
   ========================================== */

/* --- 日付ヘッダー --- */
.dash-date-header {
  text-align: center;
  padding: 16px 0 8px;
}
.dash-date {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.02em;
}
.dash-dow {
  display: inline-block;
  margin-left: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}

/* --- 今日のサマリー4カード --- */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.dash-stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}
.dash-stat-num {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.2;
}
.dash-stat-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  margin-top: 2px;
}
.dash-stat-revenue { background: linear-gradient(135deg, #e0f2fe, #f0f9ff); }
.dash-stat-revenue .dash-stat-num { color: var(--primary-dark); }

/* --- 重要なお知らせ --- */
.dash-notices { padding: 12px 14px; }
.dash-notices h3 { font-size: 14px; margin-bottom: 8px; }
.dash-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  margin-bottom: 6px;
  background: var(--gray-50);
  border-left: 3px solid var(--gray-300);
}
.dash-notice-equipment { border-left-color: var(--primary); background: #f0f9ff; }
.dash-notice-medical { border-left-color: var(--warning); background: #fffbeb; }
.dash-notice-pickup { border-left-color: #8b5cf6; background: #f5f3ff; }
.dash-notice-unpaid { border-left-color: var(--danger); background: #fef2f2; }
.dash-notice-stale { border-left-color: var(--gray-500); background: var(--gray-50); }
.dash-notice-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.dash-notice-body { flex: 1; min-width: 0; }
.dash-notice-text { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.dash-notice-detail { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.dash-notice-empty {
  text-align: center;
  padding: 12px;
  color: var(--success);
  font-size: 14px;
  font-weight: 600;
}

/* --- 海況スナップ --- */
.dash-sea-snap { padding: 12px 14px; }
.dash-sea-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.dash-sea-header h3 { font-size: 14px; margin-bottom: 0; }
.dash-sea-toggle {
  display: flex;
  gap: 2px;
  background: var(--gray-100);
  border-radius: 6px;
  padding: 2px;
}
.dash-sea-btn {
  padding: 4px 12px;
  border: none;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--gray-400);
  transition: all 0.15s;
}
.dash-sea-btn-active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow);
}
.dash-sea-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dash-sea-item {
  flex: 1;
  min-width: 60px;
  text-align: center;
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 10px 6px;
}
.dash-sea-item.dash-sea-warn { background: #fef3c7; border: 1px solid var(--warning); }
.dash-sea-val {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.2;
}
.dash-sea-max {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
}
.dash-sea-lbl {
  display: block;
  font-size: 10px;
  color: var(--gray-400);
  margin-top: 2px;
}
.dash-sea-sub {
  display: block;
  font-size: 9px;
  color: var(--gray-300);
  margin-top: 1px;
}

/* --- 今週の予約推移 --- */
.dash-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 160px;
  padding: 8px 0;
}
.dash-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.dash-bar-today { }
.dash-bar-today .dash-bar-fill { background: var(--primary) !important; }
.dash-bar-today .dash-bar-label { color: var(--primary); font-weight: 700; }
.dash-bar-nums {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 4px;
}
.dash-bar-nums small { font-size: 9px; color: var(--gray-400); }
.dash-bar-track {
  flex: 1;
  width: 100%;
  max-width: 32px;
  background: var(--gray-100);
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.dash-bar-fill {
  width: 100%;
  background: var(--gray-300);
  border-radius: 4px;
  transition: height 0.3s ease;
  min-height: 2px;
}
.dash-bar-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  margin-top: 4px;
}
.dash-bar-date {
  font-size: 9px;
  color: var(--gray-400);
}

/* --- 直近の予約 --- */
.dash-upcoming-group { margin-bottom: 12px; }
.dash-upcoming-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  padding: 4px 0;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 6px;
}
.dash-upcoming-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.1s;
}
.dash-upcoming-item:hover { background: var(--gray-50); }
.dash-upcoming-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  min-width: 48px;
}
.dash-upcoming-name {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-upcoming-people {
  font-size: 12px;
  color: var(--gray-500);
}
.dash-upcoming-course {
  font-size: 11px;
  color: var(--gray-400);
  display: none;
}
.dash-tag-sm { font-size: 12px; }
.dash-upcoming-empty {
  text-align: center;
  padding: 12px;
  color: var(--gray-400);
  font-size: 13px;
}

/* --- 今月の実績 --- */
.dash-month-stats {
  display: flex;
  gap: 12px;
}
.dash-month-item {
  flex: 1;
  text-align: center;
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 14px 8px;
}
.dash-month-num {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
}
.dash-month-label {
  display: block;
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 2px;
}

/* --- 予約枠状況 --- */
.dash-slots { display: flex; flex-direction: column; gap: 6px; }
.dash-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.dash-slot-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  min-width: 48px;
}
.dash-slot-bar {
  flex: 1;
  height: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  overflow: hidden;
}
.dash-slot-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s;
}
.dash-slot-full .dash-slot-fill { background: var(--danger); }
.dash-slot-few .dash-slot-fill { background: var(--warning); }
.dash-slot-nums {
  font-size: 12px;
  color: var(--gray-500);
  min-width: 40px;
  text-align: right;
}
.dash-slot-remain {
  font-size: 12px;
  font-weight: 600;
  min-width: 36px;
}
.dash-slot-ok .dash-slot-remain { color: var(--success); }
.dash-slot-few .dash-slot-remain { color: var(--warning); }
.dash-slot-full .dash-slot-remain { color: var(--danger); }

/* --- モバイル調整 --- */
@media (max-width: 480px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-stat-num { font-size: 18px; }
  .dash-sea-item { min-width: 55px; }
  .dash-sea-val { font-size: 15px; }
  .dash-bars { height: 130px; }
  .dash-upcoming-course { display: none; }
}

@media (min-width: 481px) {
  .dash-upcoming-course { display: inline; }
}

/* --- 8タブ対応ナビ --- */
.bottom-nav .nav-item { padding: 4px 0; }
.nav-icon { font-size: 18px; }
.nav-label { font-size: 8px; }
