/*
 * 画面固有のスタイル。
 *
 * CSP の style-src から 'unsafe-inline' を外したため、ビューやレイアウトの
 * インライン <style> をここへ集約している（nonce 付き <style> は Turbo の
 * 画面遷移でリクエストごとに値が変わり、遷移先で弾かれるため使えない）。
 * サーバー側で値が決まるスタイルは style_controller.js から CSSOM で当てる。
 */

/* ── アプリ共通レイアウト（layouts/application） ───────────────── */
.app-shell-body {
  font-family: "Inter", sans-serif;
  background-color: #f8fafc;
}
.app-shell-body h1,
.app-shell-body h2,
.app-shell-body h3,
.app-shell-body h4,
.app-shell-body .font-display {
  font-family: "Outfit", sans-serif;
}

/* ── オーナー画面（layouts/owner） ─────────────────────────────── */
html.owner-desk {
  scrollbar-gutter: stable;
}

/* ── オーナーダッシュボード ────────────────────────────────────── */
.sh-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  border: 1px solid #f1f5f9;
}

/* 月別収入グラフ（可変値の高さ・位置は style コントローラで当てる） */
.revenue-chart { display: flex; gap: 16px; height: 180px; }
.revenue-chart-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 140px;
  text-align: right;
  min-width: 50px;
}
.revenue-chart-axis-label { font-size: 10px; font-weight: bold; color: #94a3b8; line-height: 1; }
.revenue-chart-plot {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  position: relative;
}
.revenue-chart-gridlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 140px;
  pointer-events: none;
  z-index: 0;
}
.revenue-chart-gridline { position: absolute; width: 100%; border-bottom: 1px dashed #e2e8f0; }
.revenue-chart-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 35px;
  height: 100%;
  z-index: 1;
}
.revenue-chart-slot {
  width: 100%;
  height: 140px;
  position: relative;
  overflow: visible;
  background-color: rgba(241, 245, 249, 0.5);
  border-radius: 8px 8px 0 0;
}
.chart-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, #9333ea, #6366f1);
  background-color: #6366f1;
  border-radius: 4px 4px 0 0;
  z-index: 10;
}
.chart-bar--nonzero { min-height: 2px; }
.bar-tooltip {
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  z-index: 50;
  display: none;
}
.chart-bar:hover .bar-tooltip { display: block !important; }
.revenue-chart-month { font-size: 10px; font-weight: bold; color: #94a3b8; margin-top: 8px; white-space: nowrap; }

/* ── 物件詳細: 設備フィルター ──────────────────────────────────── */
.eq-filter-btn { background: white; border-color: #e2e8f0; color: #64748b; cursor: pointer; }
.eq-filter-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.eq-filter-btn.active { background: #f5f3ff; border-color: #c4b5fd; color: #7c3aed; }

/* ── 契約編集: 未入力フィールドの強調 ──────────────────────────── */
.empty-field-highlight {
  border-color: #fcd34d !important;
  background-color: #fffbeb !important;
  box-shadow: 0 0 0 2px #fde68a !important;
}
@keyframes anchor-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.25); }
}
.anchor-highlight {
  animation: anchor-pulse 1s ease-in-out 2;
  border-radius: 0.75rem;
}

/* ── 入居者: 申請フォーム ──────────────────────────────────────── */
.app-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: #374151;
}
.app-input:focus { outline: none; box-shadow: 0 0 0 2px #99f6e4; }
.app-label { display: block; font-size: 0.8125rem; font-weight: 600; color: #475569; margin-bottom: 0.25rem; }
.app-required { color: #ef4444; margin-left: 2px; }

/* ── 入居者ダッシュボード: 入居完了の演出 ──────────────────────── */
@keyframes celebrationFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes celebrationScaleIn {
  0%   { opacity: 0; transform: scale(0.8) translateY(24px); }
  65%  { transform: scale(1.03) translateY(-3px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.celebration-overlay {
  background: rgba(2, 20, 14, 0.85);
  backdrop-filter: blur(8px);
  animation: celebrationFadeIn 0.4s ease forwards;
}
.celebration-card { animation: celebrationScaleIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both; }
.celebration-ribbon { background: linear-gradient(90deg, #10b981, #34d399, #a7f3d0, #34d399, #10b981); }
.celebration-cta { background: linear-gradient(135deg, #10b981, #059669); }
