/* ==============================================
   PasoFlow デザイントークン
   スマホ優先。PCでは同レイアウトを中央寄せで拡大。
   ============================================== */
:root {
  --cyan: #00A9E0;
  --gray: #2D2D2D;
  --light-gray: #F4F4F4;
  --white: #FFFFFF;
  --magenta: #DA1884;
  --purple: #8031A7;
  --turquoise: #00B2A9;
  --green: #78BE20;
  --yellow: #EEDC00;
  --orange: #FF6A13;

  --text: var(--gray);
  --text-muted: #6B6B6B;
  --surface: var(--white);
  --bg: var(--light-gray);
  --border: #E2E2E2;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;

  --shadow: 0 2px 10px rgba(45, 45, 45, 0.08);

  --gap-xs: 6px;
  --gap-s: 10px;
  --gap-m: 16px;
  --gap-l: 24px;
  --gap-xl: 36px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: var(--gap-m) var(--gap-m) 80px;
}
.container--wide { max-width: 760px; }

/* ------- 見出し帯（シグネチャー要素：細いグラデーションバー） ------- */
.page-header {
  padding: var(--gap-l) var(--gap-m) var(--gap-m);
  background: var(--surface);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--cyan), var(--turquoise), var(--purple), var(--magenta)) 1;
  margin-bottom: var(--gap-l);
}
.page-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: 0.02em;
}
.page-header .subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ------- カード ------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow);
  padding: var(--gap-m);
  margin-bottom: var(--gap-m);
}
.card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 var(--gap-s);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h2::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  display: inline-block;
}
.card p.hint { font-size: 0.8rem; color: var(--text-muted); margin: 4px 0 0; }

/* ------- フォーム ------- */
label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 4px; color: var(--text-muted); }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--text);
  margin-bottom: var(--gap-s);
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
  border-color: var(--cyan);
}
.field-row { display: flex; gap: var(--gap-s); }
.field-row > * { flex: 1; }

/* ------- ボタン ------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: var(--radius-s);
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease, opacity 0.15s ease;
  width: 100%;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 3px solid var(--gray); outline-offset: 2px; }
.btn-primary { background: var(--cyan); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--gray); border: 1px solid var(--border); }
.btn-success { background: var(--green); color: var(--white); }
.btn-danger { background: var(--magenta); color: var(--white); }
.btn-ghost { background: transparent; color: var(--cyan); font-weight: 600; }
.btn-small { width: auto; padding: 7px 12px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ------- ピル / バッジ（状態は色で意味を持たせる） ------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}
.pill-unpaid { background: var(--orange); }
.pill-reported { background: var(--cyan); }
.pill-confirmed { background: var(--green); }
.pill-cancelled { background: #A6A6A6; }
.pill-charge { background: var(--magenta); }
.pill-refund { background: var(--turquoise); }
.pill-pending { background: var(--yellow); color: var(--gray); }
.pill-approved { background: var(--green); }
.pill-rejected { background: #A6A6A6; }
.pill-driver { background: var(--purple); }

/* ------- リスト行 ------- */
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-s);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }
.list-row.is-me { background: rgba(0, 169, 224, 0.08); border-radius: var(--radius-s); padding: 10px 8px; }
.list-row .name { font-weight: 600; }
.list-row .meta { font-size: 0.78rem; color: var(--text-muted); }

/* ------- バナー（調整中お知らせなど） ------- */
.banner {
  background: #FFF4EA;
  border: 1px solid var(--orange);
  color: var(--gray);
  border-radius: var(--radius-s);
  padding: var(--gap-s) var(--gap-m);
  font-size: 0.85rem;
  margin-bottom: var(--gap-m);
}
.banner strong { color: var(--orange); }

.alert-error {
  background: #FDECF4;
  border: 1px solid var(--magenta);
  color: var(--gray);
  border-radius: var(--radius-s);
  padding: var(--gap-s) var(--gap-m);
  font-size: 0.85rem;
  margin-bottom: var(--gap-m);
}

/* ------- 合計金額の強調表示 ------- */
.total-amount {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--gray);
}
.total-amount .unit { font-size: 1rem; font-weight: 600; margin-left: 2px; }
.total-caption { font-size: 0.78rem; color: var(--text-muted); }

/* ------- タブ（管理画面） ------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: var(--gap-m); padding-bottom: 2px; }
.tab-btn {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}
.tab-btn.active { background: var(--gray); color: var(--white); border-color: var(--gray); }
.tab-btn.has-pending { background: var(--orange); color: var(--white); border-color: var(--orange); }
.tab-btn.has-pending.active { background: var(--gray); box-shadow: inset 0 0 0 2px var(--orange); }

/* ------- 詳細トグル ------- */
details.detail-box { margin-top: var(--gap-s); }
details.detail-box summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--cyan);
  font-weight: 700;
  list-style: none;
}
details.detail-box summary::-webkit-details-marker { display: none; }

/* ------- ユーティリティ ------- */
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: var(--gap-s); }
.text-muted { color: var(--text-muted); font-size: 0.82rem; }
.text-right { text-align: right; }
.empty-state { text-align: center; padding: var(--gap-l) 0; color: var(--text-muted); font-size: 0.85rem; }
.loading { text-align: center; padding: var(--gap-l) 0; color: var(--text-muted); }
img.receipt-thumb { max-width: 100%; border-radius: var(--radius-s); margin-top: var(--gap-s); }

@media (min-width: 640px) {
  .container { padding-top: var(--gap-l); }
  .card { padding: var(--gap-l); }
}
