:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #d97706;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.7; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.site-header { background: #0f172a; color: white; display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; }
.site-header a { color: white; margin-left: 16px; }
.site-header .brand a { margin-left: 0; font-weight: 700; font-size: 18px; }
.site-header .user-name { color: #cbd5e1; margin-left: 16px; }
.container { width: min(1120px, calc(100% - 32px)); margin: 24px auto 56px; }
.site-footer { color: var(--muted); text-align: center; padding: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 8px 20px rgba(15,23,42,.04); margin-bottom: 18px; }
.card h1, .card h2, .card h3 { margin-top: 0; line-height: 1.35; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.menu-card { display: block; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-height: 112px; color: var(--text); }
.menu-card:hover { text-decoration: none; border-color: var(--primary); box-shadow: 0 8px 24px rgba(37,99,235,.12); }
.menu-card.disabled { opacity: .55; pointer-events: none; }
.menu-card strong { display: block; font-size: 18px; margin-bottom: 6px; }
.btn { display: inline-block; border: 0; border-radius: 10px; background: var(--primary); color: white; padding: 10px 16px; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn.secondary { background: #64748b; }
.btn.danger { background: var(--danger); }
.btn.light { background: white; color: var(--primary); border: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.form-row { margin-bottom: 16px; }
label { display: block; font-weight: 700; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea { width: 100%; border: 1px solid #d1d5db; border-radius: 10px; padding: 10px 12px; font: inherit; background: white; }
textarea { min-height: 120px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.help { color: var(--muted); font-size: 13px; margin-top: 4px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
th { color: #475569; background: #f8fafc; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; background: #e5e7eb; color: #374151; }
.badge.ok { background: #dcfce7; color: #166534; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.badge.muted { background: #e5e7eb; color: #374151; }
.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; background: #e0f2fe; color: #075985; }
.flash.error { background: #fee2e2; color: #991b1b; }
.flash.success { background: #dcfce7; color: #166534; }
.flash.info { background: #e0f2fe; color: #075985; }
.detail-grid { display: grid; grid-template-columns: 180px 1fr; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.detail-grid dt, .detail-grid dd { margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.detail-grid dt { background: #f8fafc; font-weight: 700; color: #475569; }
.detail-grid dd { background: white; }
.detail-grid dt:last-of-type, .detail-grid dd:last-of-type { border-bottom: 0; }
@media (max-width: 640px) {
  .site-header { display: block; }
  .site-header nav { margin-top: 8px; }
  .site-header a { margin-left: 0; margin-right: 12px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid dt { border-bottom: 0; }
}

/* v1.7: form readability and master table helpers */
.form-grid.two-col { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.password-stack { max-width: 560px; }
.password-stack .form-row { margin-bottom: 14px; }
.section-line { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.highlight-card { border-color: #bfdbfe; box-shadow: 0 8px 24px rgba(37,99,235,.10); }
.table-responsive { width: 100%; overflow-x: auto; }
.btn.small { padding: 6px 10px; font-size: 13px; }
/* v1.8 追加 */
.normal-list { margin: 12px 0 0 1.4em; line-height: 1.8; }
.danger-card { border: 1px solid #f3b8b8; background: #fff7f7; }
.danger-card pre { white-space: pre-wrap; background: #fff; padding: 12px; border-radius: 8px; overflow: auto; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.table-responsive { overflow-x: auto; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.danger-card { border-color: #fecaca; background: #fff7f7; }
.warn-card { border-color: #fde68a; background: #fffbeb; }
.highlight-card { border-color: #bfdbfe; background: #eff6ff; }
.section-line { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.password-stack { max-width: 520px; }
.normal-list { margin: 0; padding-left: 1.5rem; }
pre { white-space: pre-wrap; background: #f8fafc; padding: 12px; border-radius: 10px; border: 1px solid var(--line); }

/* v1.10: 申請フォームの入力例・差戻し再申請 */
input::placeholder,
textarea::placeholder {
  color: #9ca3af;
  opacity: 1;
}
textarea {
  line-height: 1.65;
}
.reapply-note {
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 12px;
  padding: 12px 14px;
  color: #92400e;
  margin: 12px 0;
}
select[multiple] { min-height: 130px; }
.route-note { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--muted); }
