/* ==========================================
   NiraiDesk レンタル管理スタイル (rental.css)
   css/ ディレクトリに配置
   ========================================== */

/* --- ページ共通 --- */
.rental-page {
  padding: 0;
}

.rental-loading {
  text-align: center;
  padding: 40px;
  color: #94a3b8;
  font-size: 14px;
}

.rental-empty {
  text-align: center;
  padding: 40px;
  color: #94a3b8;
  font-size: 14px;
}

/* --- フィルタバー --- */
.rental-filters {
  background: var(--card, #fff);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.rf-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.rf-sep {
  color: #94a3b8;
  font-size: 13px;
  flex-shrink: 0;
}

.rf-input {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: white;
  min-width: 0;
}

.rf-input:focus {
  outline: none;
  border-color: #0891b2;
}

.rf-actions {
  display: flex;
  gap: 8px;
}

.rf-btn-filter {
  padding: 10px 16px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  font-family: inherit;
}

.rf-btn-filter:active {
  background: #e2e8f0;
}

.rf-btn-add {
  flex: 1;
  padding: 10px 16px;
  background: #0891b2;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.rf-btn-add:active {
  background: #0e7490;
}

/* --- 予約カードリスト --- */
.rental-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rental-card {
  background: var(--card, #fff);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
}

.rental-card:active {
  transform: scale(0.98);
}

.rc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.rc-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.rc-date {
  font-size: 12px;
  color: #94a3b8;
}

.rc-body {
  margin-bottom: 8px;
}

.rc-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.rc-meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.rc-items {
  font-size: 13px;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.rc-period {
  font-size: 12px;
  color: #94a3b8;
}

.rc-total {
  font-size: 16px;
  font-weight: 700;
  color: #0891b2;
}

.rc-badge-signed {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  color: #10b981;
  background: #f0fdf4;
  padding: 2px 8px;
  border-radius: 10px;
}

/* --- モーダル（詳細・作成共通） --- */
.rental-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.rental-modal {
  background: white;
  border-radius: 16px 16px 0 0;
  max-height: 92vh;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.rm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.rm-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.rm-close {
  width: 32px; height: 32px;
  border: none;
  background: #f1f5f9;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rm-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  -webkit-overflow-scrolling: touch;
}

.rm-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
}

.rm-status-select {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.rm-section {
  margin-bottom: 20px;
}

.rm-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 10px;
}

.rm-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rm-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}

.rm-info .lbl {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

/* --- 品目詳細 --- */
.rd-item {
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 8px;
}

.rd-item-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.rd-size {
  background: #e0f2fe;
  color: #0284c7;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  margin-left: 6px;
}

.rd-item-detail {
  font-size: 13px;
  color: #64748b;
}

.rd-item-returned {
  font-size: 12px;
  color: #10b981;
  margin-top: 4px;
}

/* --- 料金 --- */
.rm-price-grid {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px;
}

.rm-price-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
}

.rm-price-row.ext {
  color: #ef4444;
}

.rm-price-total {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 0;
  margin-top: 8px;
  border-top: 2px solid #0891b2;
  font-size: 16px;
  font-weight: 700;
  color: #0891b2;
}

.rm-payment {
  margin-top: 8px;
  font-size: 13px;
  color: #64748b;
}

/* --- 申込書 --- */
.rm-badge-ok {
  color: #10b981;
  font-size: 14px;
  font-weight: 600;
}

.rm-badge-pending {
  color: #f59e0b;
  font-size: 14px;
  margin-bottom: 8px;
}

.rm-btn-link {
  background: #f1f5f9;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

/* --- メモ --- */
.rm-memo {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.rm-memo:focus {
  outline: none;
  border-color: #0891b2;
}

/* --- フッターボタン --- */
.rm-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid #f1f5f9;
  flex-shrink: 0;
  background: white;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.rm-footer-row {
  display: flex;
  gap: 8px;
}

.rm-footer-row .rm-btn {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.rm-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: #f1f5f9;
  color: #475569;
}

.rm-btn:active { opacity: 0.8; }

.rm-btn-save {
  background: #0891b2;
  color: white;
}

.rm-btn-return {
  background: #10b981;
  color: white;
}

.rm-btn-extend {
  background: #f59e0b;
  color: white;
}

.rm-btn-delete {
  background: #fef2f2;
  color: #ef4444;
}

.rm-btn-customer {
  background: #e0f2f1;
  color: #00695c;
}

/* --- ダイアログ（返却/延長） --- */
.rental-dialog-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rental-dialog {
  background: white;
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  animation: popIn 0.25s ease;
}

@keyframes popIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.rental-dialog h3 {
  font-size: 17px;
  margin-bottom: 16px;
}

.rd-field {
  margin-bottom: 14px;
}

.rd-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

.rd-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.rd-actions .rm-btn {
  flex: 1;
}

/* --- 在庫マトリクス --- */
.inventory-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inv-category {
  background: var(--card, #fff);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.inv-cat-header {
  padding: 10px 14px;
  background: #f8fafc;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.inv-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f8fafc;
}

.inv-item:last-child { border: none; }

.inv-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.inv-name {
  font-size: 14px;
  font-weight: 600;
}

.inv-price {
  font-size: 12px;
  color: #94a3b8;
}

.inv-stock {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inv-bar-bg {
  flex: 1;
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.inv-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.inv-count {
  font-size: 13px;
  white-space: nowrap;
  min-width: 80px;
  text-align: right;
}

.inv-reserved {
  color: #f59e0b;
  font-size: 11px;
}

/* --- 新規予約 商品選択 --- */
.rc-category {
  margin-bottom: 12px;
}

.rc-cat-label {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
}

.rc-product-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
}

.rc-product-item:has(input:checked) {
  border-color: #0891b2;
  background: #ecfeff;
}

.rc-product-item input[type="checkbox"] {
  accent-color: #0891b2;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.rc-prod-name {
  flex: 1;
}

.rc-prod-price {
  color: #0891b2;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

/* ==========================================
   売上レポート (RentalReportPage) — ★ v44
   ========================================== */

.rr-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.rr-summary-card {
  background: var(--card-bg, #fff);
  padding: 14px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.rr-summary-num {
  font-size: 20px;
  font-weight: 800;
}

.rr-summary-label {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.rr-section-card {
  background: var(--card-bg, #fff);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.rr-section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
}

.rr-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.rr-breakdown-card {
  background: var(--card-bg, #fff);
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.rr-breakdown-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
}

/* --- ナイトテーマ対応 --- */
[data-theme="night"] .rental-card,
[data-theme="night"] .rental-filters,
[data-theme="night"] .inv-category {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="night"] .rf-input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="night"] .rental-modal,
[data-theme="night"] .rental-dialog {
  background: #1e293b;
  color: #e2e8f0;
}

[data-theme="night"] .rm-header,
[data-theme="night"] .rm-footer {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="night"] .rm-close {
  background: #334155;
  color: #e2e8f0;
}

[data-theme="night"] .rm-body {
  background: #1e293b;
}

[data-theme="night"] .rd-item {
  background: #0f172a;
}

[data-theme="night"] .rm-price-grid {
  background: #0f172a;
}

[data-theme="night"] .rc-product-item {
  border-color: #334155;
}

[data-theme="night"] .rc-product-item:has(input:checked) {
  background: #164e63;
  border-color: #0891b2;
}

[data-theme="night"] .inv-cat-header {
  background: #0f172a;
}

[data-theme="night"] .inv-bar-bg {
  background: #334155;
}

[data-theme="night"] .rm-memo {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="night"] .rc-name {
  color: #f1f5f9;
}

[data-theme="night"] .rm-btn-link {
  background: #334155;
  color: #e2e8f0;
}


/* ==========================================
   レンタルダッシュボード (RentalDashboardPage)
   ========================================== */

.rdash-loading {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 14px;
}

.rdash-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 8px;
  flex-wrap: wrap;
  gap: 4px;
}

.rdash-date-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.rdash-dow {
  margin-left: 6px;
  font-size: 15px;
  font-weight: 700;
  color: #0891b2;
}

.rdash-badge-online {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  background: #dcfce7;
  color: #16a34a;
}

/* --- サマリーカード --- */
.rdash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.rdash-stat {
  background: var(--card, #fff);
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.rdash-stat-num {
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.rdash-stat-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  margin-top: 2px;
}

.rdash-stat-revenue {
  background: linear-gradient(135deg, #ecfeff, #e0f7fa);
}

.rdash-stat-revenue .rdash-stat-num {
  color: #0891b2;
}

.rdash-stat-alert {
  background: #fef2f2;
}

.rdash-stat-alert .rdash-stat-num {
  color: #ef4444;
}

/* --- 超過アラート --- */
.rdash-alert-card {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}

.rdash-alert-title {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #dc2626;
  border-bottom: 1px solid #fecaca;
}

.rdash-alert-row {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #fee2e2;
}

.rdash-alert-row:last-child { border: none; }
.rdash-alert-row:active { background: #fee2e2; }

.rdash-alert-name {
  font-size: 14px;
  font-weight: 700;
}

.rdash-alert-detail {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.rdash-alert-phone {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

/* --- セクションカード --- */
.rdash-section-card {
  background: var(--card, #fff);
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}

.rdash-section-title {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}

/* --- タイムライン行 --- */
.rdash-timeline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f8fafc;
  cursor: pointer;
}

.rdash-timeline-row:last-child { border: none; }
.rdash-timeline-row:active { background: #f1f5f9; }

.rdash-timeline-time {
  font-size: 14px;
  font-weight: 700;
  color: #0891b2;
  min-width: 44px;
  text-align: center;
}

.rdash-timeline-body {
  flex: 1;
  min-width: 0;
}

.rdash-timeline-name {
  font-size: 14px;
  font-weight: 600;
}

.rdash-timeline-items {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rdash-timeline-price {
  font-size: 14px;
  font-weight: 700;
  color: #0891b2;
  white-space: nowrap;
}

/* --- 在庫サマリ --- */
.rdash-stock-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid #f8fafc;
}

.rdash-stock-row:last-child { border: none; }

.rdash-stock-name {
  font-size: 13px;
  font-weight: 600;
  min-width: 100px;
}

.rdash-stock-bar-bg {
  flex: 1;
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.rdash-stock-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.rdash-stock-count {
  font-size: 12px;
  min-width: 50px;
  text-align: right;
  white-space: nowrap;
}

/* --- ナイトテーマ対応 --- */
[data-theme="night"] .rdash-stat {
  background: #1e293b;
}

[data-theme="night"] .rdash-stat-revenue {
  background: linear-gradient(135deg, #0f2027, #164e63);
}

[data-theme="night"] .rdash-stat-alert {
  background: #2d1a1a;
}

[data-theme="night"] .rdash-section-card {
  background: #1e293b;
}

[data-theme="night"] .rdash-section-title {
  background: #0f172a;
  border-color: #334155;
}

[data-theme="night"] .rdash-timeline-row {
  border-color: #334155;
}

[data-theme="night"] .rdash-timeline-row:active {
  background: #334155;
}

[data-theme="night"] .rdash-timeline-name {
  color: #f1f5f9;
}

[data-theme="night"] .rdash-stock-bar-bg {
  background: #334155;
}

[data-theme="night"] .rdash-stock-row {
  border-color: #334155;
}

[data-theme="night"] .rdash-alert-card {
  background: #2d1a1a;
  border-color: #7f1d1d;
}

[data-theme="night"] .rdash-alert-title {
  color: #fca5a5;
  border-color: #7f1d1d;
}

[data-theme="night"] .rdash-alert-row {
  border-color: #451a1a;
}

[data-theme="night"] .rdash-alert-row:active {
  background: #451a1a;
}

/* --- レポート ナイトテーマ --- */
[data-theme="night"] .rr-summary-card,
[data-theme="night"] .rr-section-card,
[data-theme="night"] .rr-breakdown-card {
  background: #1e293b;
}

[data-theme="night"] .rr-summary-label {
  color: #94a3b8;
}

/* ==========================================
   ★ v44: レスポンシブ対応（スマホ最適化）
   ブレイクポイント: style.css に合わせて 768px
   ========================================== */

@media (max-width: 768px) {

  /* --- ページ共通 --- */
  .rental-page {
    padding: 0 2px;
  }

  /* --- フィルタバー --- */
  .rf-row {
    flex-wrap: wrap;
  }

  .rf-row .rf-input[type="date"] {
    flex: 0 0 calc(50% - 16px);
    font-size: 13px;
    padding: 8px 10px;
  }

  .rf-row .rf-input[type="text"] {
    flex: 1 1 100%;
    order: 1;
  }

  .rf-sep {
    flex: 0 0 auto;
  }

  .rf-actions {
    flex-direction: row;
  }

  .rf-btn-filter,
  .rf-btn-add {
    font-size: 13px;
    padding: 10px 12px;
    flex: 1;
  }

  /* --- ステータスタブ --- */
  .rb-status-tabs {
    gap: 4px !important;
    padding: 0 0 6px !important;
    margin-bottom: 6px !important;
  }

  .rb-tab {
    font-size: 11px !important;
    padding: 6px 10px !important;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .rb-tab-count {
    font-size: 10px !important;
  }

  /* --- 予約カード --- */
  .rental-card {
    padding: 12px;
  }

  .rc-name {
    font-size: 15px;
  }

  .rc-items {
    font-size: 12px;
  }

  .rc-total {
    font-size: 15px;
  }

  .rc-footer {
    flex-wrap: wrap;
    gap: 4px;
  }

  /* --- ワンタップ操作ボタン --- */
  .rb-actions {
    flex-wrap: wrap;
    gap: 4px;
  }

  .rb-actions button {
    font-size: 11px !important;
    padding: 5px 8px !important;
  }

  /* --- モーダル --- */
  .rental-modal {
    max-width: 100%;
    border-radius: 14px 14px 0 0;
    max-height: 95vh;
  }

  .rm-header {
    padding: 14px 16px;
  }

  .rm-header h3 {
    font-size: 16px;
  }

  .rm-body {
    padding: 14px 16px;
  }

  .rm-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .rm-section-title {
    font-size: 13px;
  }

  .rm-info .lbl {
    font-size: 10px;
  }

  .rm-info {
    font-size: 13px;
  }

  /* --- モーダルフッター --- */
  .rm-footer {
    padding: 10px 16px;
    gap: 6px;
  }

  .rm-footer-row {
    gap: 6px;
  }

  .rm-btn {
    padding: 10px 10px;
    font-size: 12px;
  }

  /* --- ダイアログ（返却/延長） --- */
  .rental-dialog-overlay {
    padding: 12px;
  }

  .rental-dialog {
    padding: 20px;
  }

  /* --- 在庫マトリクス --- */
  .inv-item-header {
    flex-wrap: wrap;
    gap: 4px;
  }

  .inv-count {
    min-width: 60px;
    font-size: 12px;
  }

  /* --- 新規予約 商品選択 --- */
  .rc-product-item {
    font-size: 13px;
    padding: 8px;
    gap: 6px;
  }

  .rc-prod-price {
    font-size: 12px;
  }

  /* --- ダッシュボード サマリーカード --- */
  .rdash-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .rdash-stat {
    padding: 10px 6px;
  }

  .rdash-stat-num {
    font-size: 18px;
  }

  .rdash-stat-label {
    font-size: 9px;
  }

  /* --- ダッシュボード 日付ヘッダー --- */
  .rdash-date-header h2 {
    font-size: 18px;
  }

  .rdash-dow {
    font-size: 14px;
  }

  /* --- ダッシュボード タイムライン --- */
  .rdash-timeline-row {
    gap: 8px;
    padding: 8px 12px;
  }

  .rdash-timeline-time {
    font-size: 13px;
    min-width: 38px;
  }

  .rdash-timeline-name {
    font-size: 13px;
  }

  .rdash-timeline-items {
    font-size: 11px;
  }

  .rdash-timeline-price {
    font-size: 13px;
  }

  /* --- ダッシュボード 在庫サマリ --- */
  .rdash-stock-name {
    font-size: 12px;
    min-width: 80px;
  }

  .rdash-stock-count {
    font-size: 11px;
    min-width: 40px;
  }

  /* --- セクションカード --- */
  .rdash-section-title {
    font-size: 12px;
    padding: 8px 12px;
  }

  /* --- 超過アラート --- */
  .rdash-alert-title {
    font-size: 13px;
    padding: 8px 12px;
  }

  .rdash-alert-row {
    padding: 8px 12px;
  }

  .rdash-alert-name {
    font-size: 13px;
  }

  .rdash-alert-detail {
    font-size: 11px;
  }

  /* --- 売上レポート --- */
  .rr-summary-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }

  .rr-summary-card {
    padding: 10px 6px;
  }

  .rr-summary-num {
    font-size: 16px;
  }

  .rr-summary-label {
    font-size: 10px;
  }

  .rr-section-card {
    padding: 12px;
  }

  .rr-section-title {
    font-size: 14px;
    margin: 0 0 10px;
  }

  .rr-breakdown-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .rr-breakdown-card {
    padding: 12px;
  }
}

/* --- 極小画面（375px以下 = iPhone SE等） --- */
@media (max-width: 375px) {
  .rf-row .rf-input[type="date"] {
    flex: 1 1 100%;
    font-size: 12px;
  }

  .rf-sep {
    display: none;
  }

  .rdash-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .rdash-stat-num {
    font-size: 16px;
  }

  .rm-btn {
    padding: 8px 6px;
    font-size: 11px;
  }

  .rental-card {
    padding: 10px;
  }

  .rc-name {
    font-size: 14px;
  }

  .rr-summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }

  .rr-summary-grid .rr-summary-card:last-child {
    grid-column: span 2;
  }

  .rr-summary-num {
    font-size: 14px;
  }
}
