/* ============================================================
   NannyPO! — Main Stylesheet
   Primary: #E8829A  Deep: #3D0C26  Rose: #C2185B  Blush: #FCE4EC
   ============================================================ */

:root {
  --pink:     #E8829A;
  --deep:     #3D0C26;
  --rose:     #C2185B;
  --blush:    #FCE4EC;
  --blush2:   #F8BBD9;
  --white:    #FFFFFF;
  --gray-50:  #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #EEEEEE;
  --gray-400: #BDBDBD;
  --gray-600: #757575;
  --gray-800: #424242;
  --text:     #3D0C26;
  --text-sub: #9E7A85;
  --success:  #4CAF50;
  --warning:  #FF9800;
  --danger:   #F44336;
  --info:     #2196F3;
  --radius:   12px;
  --radius-sm:8px;
  --shadow:   0 2px 12px rgba(61,12,38,.10);
  --shadow-md:0 4px 20px rgba(61,12,38,.14);
  --nav-h:    60px;
  --header-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN',
               'Noto Sans JP', 'Yu Gothic UI', sans-serif;
  background: var(--gray-100);
  color: var(--text);
  overscroll-behavior: none;
  min-height: 100dvh;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ── Utility ── */
.hidden  { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.screen-login {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}
.login-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(145deg, var(--blush) 0%, #F8BBD9 50%, #F48FB1 100%);
  z-index: 0;
}
.login-bg::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.25);
  border-radius: 50%;
  top: -80px; right: -80px;
}
.login-bg::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.18);
  border-radius: 50%;
  bottom: -60px; left: -60px;
}
.login-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 36px 28px 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(194,24,91,.18);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  margin: 0 auto 12px;
  box-shadow: 0 4px 16px rgba(232,130,154,.4);
}
.login-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--deep);
  letter-spacing: .04em;
}
.login-sub { font-size: .75rem; color: var(--text-sub); margin-top: 2px; }

/* ── Form ── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--deep);
  margin-bottom: 6px;
}
.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--blush2);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}
/* チェックボックス・ラジオボタンは appearance を無効化しない */
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
  width: auto;
  padding: 0;
  border: none;
  background: transparent;
  appearance: auto;
  -webkit-appearance: auto;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(232,130,154,.2);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 44px; }
.btn-eye {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 1rem; opacity: .6;
  padding: 4px;
}
.error-msg {
  background: #FFEBEE;
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: .82rem;
  margin-bottom: 12px;
}
.login-footer {
  text-align: center;
  font-size: .72rem;
  color: var(--text-sub);
  margin-top: 20px;
  line-height: 1.6;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, var(--pink) 0%, var(--rose) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 13px 24px;
  font-size: .9rem; font-weight: 700;
  box-shadow: 0 4px 12px rgba(232,130,154,.4);
  transition: opacity .2s, transform .1s, box-shadow .2s;
  position: relative;
}
.btn-primary:active { opacity: .9; transform: scale(.98); }
.btn-primary:disabled { opacity: .5; pointer-events: none; }
.btn-block { width: 100%; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--white);
  color: var(--rose);
  border: 1.5px solid var(--pink);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: .85rem; font-weight: 600;
  transition: background .2s;
}
.btn-secondary:active { background: var(--blush); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent;
  color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: .82rem;
  transition: background .2s;
}
.btn-ghost:active { background: var(--gray-100); }

.btn-danger {
  background: linear-gradient(135deg, #EF9A9A, var(--danger));
  color: #fff;
  border-radius: var(--radius);
  padding: 11px 20px;
  font-size: .85rem; font-weight: 700;
}

.btn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--deep);
  transition: background .2s;
  position: relative;
}
.btn-icon:active { background: rgba(232,130,154,.15); }

.btn-sm { padding: 8px 14px !important; font-size: .78rem !important; }

/* ============================================================
   APP HEADER
   ============================================================ */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: linear-gradient(135deg, var(--deep) 0%, #6D2A4A 100%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px;
  z-index: 210; /* メニューオーバーレイ(200)より上 */
  box-shadow: 0 2px 8px rgba(61,12,38,.3);
}
.header-left, .header-right {
  display: flex; align-items: center; gap: 4px;
  min-width: 80px;
}
.header-right { justify-content: flex-end; }
.app-header .btn-icon { color: rgba(255,255,255,.9); }

/* 管理メニューボタン: 田(閉じた状態) / ×(開いた状態) の切り替え */
.admin-icon-close { display: none; }
#btn-admin.is-open .admin-icon-menu { display: none; }
#btn-admin.is-open .admin-icon-close { display: block; }

/* メニューを開いている間: ×ボタン以外をフェードアウト（btn-adminを除く全要素を個別に指定） */
#btn-back, #page-title, #btn-settings, #btn-notif {
  transition: opacity .22s ease;
}
.app-header.menu-open #btn-back,
.app-header.menu-open #page-title,
.app-header.menu-open #btn-settings,
.app-header.menu-open #btn-notif {
  opacity: 0;
  pointer-events: none;
}
.header-title {
  font-size: .95rem; font-weight: 700;
  color: #fff;
  letter-spacing: .06em;
  flex: 1; text-align: center;
}

/* ============================================================
   BOTTOM NAV
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--white);
  display: flex;
  border-top: 1px solid var(--blush2);
  box-shadow: 0 -2px 12px rgba(61,12,38,.08);
  z-index: 100;
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  color: var(--gray-400);
  font-size: .65rem; font-weight: 600;
  transition: color .2s;
  padding-top: 4px;
}
.nav-item.active {
  color: var(--rose);
}
.nav-item.active svg { stroke: var(--rose); }
.nav-item span { letter-spacing: .02em; }

/* ============================================================
   PAGE CONTAINER
   ============================================================ */
.page-container {
  margin-top: var(--header-h);
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  min-height: calc(100dvh - var(--header-h));
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: .8rem; font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.card + .card { margin-top: 12px; }

/* ============================================================
   HOME PAGE
   ============================================================ */
.home-wrap { padding: 16px; }

.step-hero {
  background: linear-gradient(135deg, var(--deep) 0%, #7B2D5E 100%);
  border-radius: 18px;
  padding: 22px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 6px 24px rgba(61,12,38,.25);
}
.step-hero::after {
  content: '✨';
  position: absolute;
  font-size: 5rem;
  right: -10px; top: -10px;
  opacity: .12;
}
.step-hero-name { font-size: .85rem; opacity: .8; margin-bottom: 4px; }
.step-hero-step {
  font-size: 1.5rem; font-weight: 800; letter-spacing: .04em;
  display: flex; align-items: center; gap: 8px;
}
.step-badge {
  background: var(--pink);
  border-radius: 8px;
  padding: 2px 10px;
  font-size: .85rem;
  font-weight: 700;
}
.step-rate { font-size: 2.2rem; font-weight: 900; margin: 6px 0 2px; }
.step-rate span { font-size: 1rem; font-weight: 600; opacity: .8; }

.step-progress-wrap { margin-top: 14px; }
.step-progress-label {
  display: flex; justify-content: space-between;
  font-size: .78rem; opacity: .85;
  margin-bottom: 6px;
}
.step-progress-bar {
  background: rgba(255,255,255,.2);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}
.step-progress-fill {
  background: linear-gradient(90deg, var(--pink), #FF80AB);
  border-radius: 20px;
  height: 100%;
  transition: width .6s ease;
}
.step-next-msg {
  margin-top: 8px;
  font-size: .78rem;
  background: rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 6px 10px;
  text-align: center;
  letter-spacing: .04em;
}

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.quick-btn {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 12px;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  box-shadow: var(--shadow);
  font-size: .82rem; font-weight: 600;
  color: var(--deep);
  transition: transform .15s, box-shadow .15s;
}
.quick-btn:active { transform: scale(.97); box-shadow: none; }
.quick-btn svg { stroke: var(--rose); }
.quick-btn.accent { background: linear-gradient(135deg, var(--pink), var(--rose)); color: #fff; }
.quick-btn.accent svg { stroke: #fff; }

/* Recent records */
.record-item {
  display: flex; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
  gap: 12px;
}
.record-item:last-child { border-bottom: none; }
.record-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pink);
  flex-shrink: 0;
}
.record-info { flex: 1; min-width: 0; }
.record-client { font-size: .85rem; font-weight: 600; }
.record-date  { font-size: .75rem; color: var(--text-sub); margin-top: 2px; }
.record-hours { font-size: .82rem; font-weight: 700; color: var(--rose); white-space: nowrap; }

/* ============================================================
   TIMECARD PAGE
   ============================================================ */
.timecard-wrap { padding: 16px; }

.active-job-card {
  background: linear-gradient(135deg, #fff9c4, #fff3e0);
  border: 2px solid var(--warning);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.active-job-header {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; font-weight: 700; color: #E65100;
  margin-bottom: 8px;
}
.pulse-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--warning);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: .7; }
}
.active-job-elapsed { font-size: 2rem; font-weight: 900; color: var(--deep); letter-spacing: .04em; }
.active-job-since   { font-size: .78rem; color: var(--text-sub); }

.client-select-card { margin-bottom: 16px; }
.timecard-punch-area {
  display: flex; flex-direction: column;
  align-items: center; gap: 14px;
  padding: 24px 0;
}
.punch-btn {
  width: 140px; height: 140px;
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  font-size: 1rem; font-weight: 800;
  letter-spacing: .06em;
  box-shadow: 0 8px 24px rgba(232,130,154,.4);
  transition: transform .15s, box-shadow .2s;
}
.punch-btn:active { transform: scale(.95); box-shadow: 0 4px 12px rgba(232,130,154,.3); }
.punch-btn.punch-in  { background: linear-gradient(145deg, var(--pink), var(--rose)); color: #fff; }
.punch-btn.punch-out {
  background: linear-gradient(145deg, #FF7043, #F44336);
  color: #fff;
  box-shadow: 0 8px 24px rgba(244,67,54,.4);
}
.punch-btn.disabled  { background: var(--gray-200); color: var(--gray-400); box-shadow: none; pointer-events: none; }
.punch-btn svg { stroke-width: 2.5; }

.gps-status { font-size: .75rem; color: var(--text-sub); display: flex; align-items: center; gap: 4px; }
.gps-ok   { color: var(--success); }
.gps-wait { color: var(--warning); }
.gps-err  { color: var(--danger); }

.day-limit-msg {
  background: #FFEBEE;
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .8rem;
  text-align: center;
}

/* ============================================================
   REPORT (PHASE 2)
   ============================================================ */
.report-wrap { padding: 16px; }
.section-title {
  font-size: .78rem; font-weight: 700;
  color: var(--text-sub); text-transform: uppercase;
  letter-spacing: .08em;
  margin: 20px 0 10px;
  display: flex; align-items: center; gap: 6px;
}
.section-title::after {
  content: ''; flex: 1;
  height: 1px; background: var(--blush2);
}

.cost-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.cost-row input { flex: 1; }
.cost-row .btn-ghost { padding: 11px 12px; }
.cost-total {
  text-align: right;
  font-size: .85rem; font-weight: 700;
  color: var(--deep);
  padding: 8px 0;
  border-top: 1px solid var(--blush2);
  margin-top: 4px;
}

.checkbox-group { display: flex; flex-direction: column; gap: 8px; }
.checkbox-label {
  display: flex; align-items: center; gap: 10px;
  font-size: .88rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--rose);
}

/* ============================================================
   SHIFT PAGE
   ============================================================ */
.shift-wrap { padding: 16px; }
.tab-bar {
  display: flex; gap: 4px;
  background: var(--blush);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 16px;
}
.tab-btn {
  flex: 1; padding: 9px 8px;
  border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 600;
  color: var(--text-sub);
  transition: all .2s;
  text-align: center;
}
.tab-btn.active {
  background: var(--white);
  color: var(--rose);
  box-shadow: 0 2px 8px rgba(232,130,154,.2);
}

.shift-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.shift-item-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.shift-date { font-size: .95rem; font-weight: 700; }
.shift-time { font-size: .82rem; color: var(--text-sub); }
.shift-client { font-size: .82rem; color: var(--rose); font-weight: 600; }
.shift-client-tap { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.shift-client-tap:active { opacity: .7; }
.shift-notes { font-size: .78rem; color: var(--gray-600); margin-top: 4px; }

/* Status badges */
.badge-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .04em;
}
.badge-pending  { background: #FFF9C4; color: #F57F17; }
.badge-assigned { background: #E8F5E9; color: #388E3C; }
.badge-approved { background: #E8F5E9; color: #388E3C; }
.badge-rejected { background: #FFEBEE; color: #C62828; }
.badge-draft    { background: var(--blush); color: var(--rose); }
.badge-sent     { background: #E3F2FD; color: #1565C0; }
.badge-paid     { background: #E8F5E9; color: #2E7D32; }

/* ============================================================
   INVOICE PAGE
   ============================================================ */
.invoice-wrap { padding: 16px; }
.invoice-month-select {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-bottom: 16px;
}
.month-nav-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--blush);
  color: var(--rose);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  font-weight: 700;
}
.month-label { font-size: 1rem; font-weight: 700; }

.invoice-summary {
  background: linear-gradient(135deg, var(--deep), #7B2D5E);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.invoice-summary-row {
  display: flex; justify-content: space-between;
  font-size: .85rem;
  margin-bottom: 4px;
}
.invoice-summary-row.total {
  font-size: 1.1rem; font-weight: 800;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.3);
}

.invoice-item-row {
  display: flex; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
  gap: 8px;
  font-size: .85rem;
}
.invoice-item-row:last-child { border-bottom: none; }
.invoice-item-date { width: 80px; color: var(--text-sub); flex-shrink: 0; }
.invoice-item-desc { flex: 1; min-width: 0; }
.invoice-item-amt  { font-weight: 700; white-space: nowrap; }

/* ============================================================
   RECORDS PAGE
   ============================================================ */
.records-wrap { padding: 16px; }
.month-select-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.summary-chips {
  display: flex; gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.chip {
  background: var(--blush);
  color: var(--rose);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: .78rem; font-weight: 700;
}

.record-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 10px;
}
.record-card-header {
  background: var(--blush);
  padding: 10px 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.record-card-body { padding: 12px 16px; }
.record-detail-row {
  display: flex; justify-content: space-between;
  font-size: .82rem;
  padding: 4px 0;
}
.record-detail-label { color: var(--text-sub); }
.record-detail-val   { font-weight: 600; }

/* ============================================================
   CLIENTS PAGE
   ============================================================ */
.clients-wrap { padding: 16px; }
.client-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px;
}
.client-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blush), var(--pink));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800;
  color: var(--deep);
  flex-shrink: 0;
}
.client-info { flex: 1; min-width: 0; }
.client-name { font-size: .9rem; font-weight: 700; }
.client-meta { font-size: .75rem; color: var(--text-sub); margin-top: 2px; }
.client-arrow { color: var(--gray-400); }

/* タップ可能なカード */
.client-card--tap { transition: background .12s; }
.client-card--tap:hover { background: var(--blush); }
.client-card--tap:active { background: var(--blush2); }

/* with Nanny 登録ユーザー */
.client-card--app { border-left: 3px solid var(--pink); }

/* ─── 詳細ページ ─── */
.detail-section-title {
  font-size: .82rem; font-weight: 700; color: var(--text-sub);
  letter-spacing: .04em; margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--blush2);
}
.detail-row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 5px 0; font-size: .82rem;
  border-bottom: 1px solid var(--blush2);
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
  flex-shrink: 0; width: 100px; color: var(--text-sub); font-weight: 600;
}
.detail-value { flex: 1; color: var(--text); word-break: break-all; }

/* お子さまカード */
.child-detail-card {
  background: var(--blush); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 10px;
}
.child-detail-name {
  font-weight: 700; font-size: .9rem; margin-bottom: 8px;
}

/* 報告書一覧行 */
.report-summary-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; border-bottom: 1px solid var(--blush2);
  transition: background .1s;
}
.report-summary-row:last-child { border-bottom: none; }
.report-summary-row:hover { background: var(--blush); }
.report-summary-date { font-size: .75rem; color: var(--text-sub); flex-shrink: 0; }
.report-summary-info {
  flex: 1; display: flex; flex-wrap: wrap; gap: 6px;
  font-size: .78rem; color: var(--text);
}

/* 編集ログ */
.edit-log-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid var(--blush2); font-size: .78rem;
}
.edit-log-row:last-child { border-bottom: none; }
.edit-log-who { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.edit-log-note { flex: 1; color: var(--text); }
.edit-log-time { font-size: .72rem; color: var(--text-sub); flex-shrink: 0; }
.edit-log-badge {
  display: inline-block; padding: 1px 7px; border-radius: 10px;
  font-size: .68rem; font-weight: 700;
}
.badge-admin { background: #e8f0fe; color: #1967d2; }
.badge-user  { background: #f0faf0; color: #2a8a2a; }
.client-section-label {
  font-size: .7rem; font-weight: 700; color: var(--text-sub);
  letter-spacing: .06em;
  padding: 8px 4px 4px;
}
.usage-badge {
  display: inline-block; font-size: .65rem; font-weight: 700;
  background: var(--blush); color: var(--rose);
  padding: 1px 7px; border-radius: 10px;
  margin-left: 6px; vertical-align: middle;
}
.btn-link-sm {
  font-size: .75rem; color: var(--pink); font-weight: 600;
  text-decoration: underline; background: none; border: none;
  cursor: pointer; padding: 0;
}
.btn-sm {
  padding: 5px 12px; border-radius: 6px; font-size: .8rem;
  font-weight: 600; cursor: pointer; border: none;
}
.btn-primary-sm { background: var(--pink); color: #fff; }
.btn-ghost-sm   { background: #eee; color: var(--text-sub); }

/* お子さまミニカード */
.child-mini-card {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px; border-radius: 8px;
  background: var(--blush2); margin-bottom: 4px;
  font-size: .8rem;
}
.child-mini-name { font-weight: 700; }
.child-mini-meta { color: var(--text-sub); }

/* ============================================================
   SETTINGS PAGE
   ============================================================ */
.settings-wrap { padding: 16px; }

.settings-section { margin-bottom: 20px; }
.settings-section-title {
  font-size: .75rem; font-weight: 700;
  color: var(--text-sub);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-left: 4px;
}
.settings-list {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background .15s;
}
.settings-item:last-child { border-bottom: none; }
.settings-item:active { background: var(--gray-50); }
.settings-item-left  { display: flex; align-items: center; gap: 12px; }
.settings-item-icon  {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--blush);
  display: flex; align-items: center; justify-content: center;
}
.settings-item-icon svg { stroke: var(--rose); }
.settings-item-label { font-size: .88rem; font-weight: 600; }
.settings-item-sub   { font-size: .72rem; color: var(--text-sub); margin-top: 1px; }
.settings-item-arrow { color: var(--gray-400); font-size: .8rem; }

.user-profile-card {
  background: linear-gradient(135deg, var(--deep), #7B2D5E);
  border-radius: var(--radius);
  padding: 20px;
  color: #fff;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 20px;
}
.user-avatar-lg {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--pink);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800;
  flex-shrink: 0;
}
.user-profile-name  { font-size: 1.1rem; font-weight: 800; }
.user-profile-email { font-size: .75rem; opacity: .75; margin-top: 2px; }
.user-profile-step  { font-size: .8rem; margin-top: 6px; opacity: .9; }

/* ============================================================
   NOTIFICATIONS PAGE
   ============================================================ */
.notif-wrap { padding: 16px; }
.notif-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex; gap: 12px;
}
.notif-item.unread { border-left: 3px solid var(--pink); }
.notif-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blush);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-title { font-size: .88rem; font-weight: 700; }
.notif-body  { font-size: .78rem; color: var(--text-sub); margin-top: 3px; }
.notif-time  { font-size: .7rem; color: var(--gray-400); margin-top: 4px; }

/* ============================================================
   ADMIN PAGES
   ============================================================ */
.admin-wrap { padding: 16px; }

.admin-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  text-align: center;
}
.stat-num {
  font-size: 1.8rem; font-weight: 900;
  color: var(--rose);
}
.stat-label { font-size: .72rem; color: var(--text-sub); margin-top: 2px; }

.admin-table-wrap { overflow-x: auto; border-radius: var(--radius); }
.admin-table {
  width: 100%; border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: .82rem;
}
.admin-table th {
  background: var(--deep);
  color: rgba(255,255,255,.9);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .04em;
  white-space: nowrap;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:active td { background: var(--gray-50); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(61,12,38,.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: flex-end;
  padding: 0;
}
.modal-box {
  background: var(--white);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 20px 20px calc(20px + var(--safe-bottom));
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.modal-title {
  font-size: 1rem; font-weight: 800;
  color: var(--deep);
  margin-bottom: 16px;
  padding-right: 32px;
}
.modal-body { margin-bottom: 16px; }
.modal-footer { display: flex; gap: 8px; }
.modal-footer .btn-primary,
.modal-footer .btn-secondary,
.modal-footer .btn-ghost,
.modal-footer .btn-danger { flex: 1; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  left: 50%; transform: translateX(-50%);
  background: var(--deep);
  color: #fff;
  border-radius: 24px;
  padding: 12px 20px;
  font-size: .85rem; font-weight: 600;
  z-index: 300;
  box-shadow: 0 4px 16px rgba(61,12,38,.35);
  white-space: nowrap;
  animation: fadeInUp .25s ease;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   NOTIFICATION BADGE
   ============================================================ */
.badge {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--danger);
  color: #fff;
  border-radius: 10px;
  font-size: .6rem; font-weight: 800;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-sub);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state-text { font-size: .88rem; }

/* ============================================================
   LOADING
   ============================================================ */
.loading-spinner {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--blush2);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--blush2);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.search-bar svg { stroke: var(--gray-400); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: .88rem;
  background: transparent;
  color: var(--text);
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.text-pink  { color: var(--pink); }
.text-rose  { color: var(--rose); }
.text-deep  { color: var(--deep); }
.text-sub   { color: var(--text-sub); }
.text-small { font-size: .78rem; }
.text-bold  { font-weight: 700; }
.text-center{ text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-16  { padding: 16px; }
.flex  { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }

/* Divider */
.divider { height: 1px; background: var(--gray-200); margin: 12px 0; }

/* ============================================================
   HOME SCHEDULE
   ============================================================ */
.schedule-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background .15s;
  border-radius: var(--radius-sm);
}
.schedule-item:last-child { border-bottom: none; }
.schedule-item:active { background: var(--blush); }
.schedule-item.is-today { background: #FFF9C4; border-radius: var(--radius-sm); }
.schedule-item.is-sat .schedule-date { color: #1565C0; }
.schedule-item.is-sun .schedule-date { color: var(--danger); }
.schedule-date  { font-size: .82rem; font-weight: 700; grid-row: 1; }
.schedule-time  { font-size: .88rem; font-weight: 700; color: var(--deep); grid-row: 1; }
.schedule-client{ font-size: .75rem; color: var(--text-sub); grid-column: 2; grid-row: 2; }
.schedule-change-hint {
  font-size: .68rem; font-weight: 700;
  color: var(--rose); background: var(--blush);
  border-radius: 20px; padding: 2px 8px;
  grid-row: 1; white-space: nowrap;
}

/* ============================================================
   RESERVATION CARDS (admin)
   ============================================================ */
.res-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: box-shadow .15s;
  border-left: 3px solid var(--warning);
}
.res-card:active { box-shadow: none; }
.res-card.confirmed { border-left-color: var(--success); }
.res-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.res-client  { font-size: .92rem; font-weight: 800; }
.res-date    { font-size: .85rem; font-weight: 600; margin-bottom: 2px; }
.res-time    { font-size: .88rem; color: var(--rose); font-weight: 700; }
.res-service { font-size: .78rem; color: var(--text-sub); margin-top: 4px; }
.res-notes   { font-size: .78rem; color: var(--gray-600); margin-top: 4px; }
.res-staff   { font-size: .8rem; color: var(--success); font-weight: 600; margin-top: 4px; }
.res-received{ font-size: .72rem; color: var(--gray-400); margin-top: 6px; }
.res-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--danger); color: #fff;
  border-radius: 10px; font-size: .68rem; font-weight: 800;
  padding: 1px 6px; margin-left: 4px;
}

/* 予約モーダル */
.res-modal-info { margin-bottom: 12px; }
.res-modal-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 6px 0; border-bottom: 1px solid var(--gray-100);
  font-size: .85rem;
}
.res-modal-row:last-child { border-bottom: none; }
.res-modal-row span:first-child { color: var(--text-sub); min-width: 60px; flex-shrink: 0; }
.res-no-staff {
  background: #FFF3E0; border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: .82rem; color: #E65100;
  line-height: 1.6;
}
.res-staff-option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.res-staff-option:has(:checked) {
  border-color: var(--pink); background: var(--blush);
}
.res-staff-option input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--rose); flex-shrink: 0; margin-top: 2px;
}
.res-staff-info { flex: 1; }
.res-staff-name  { font-size: .88rem; font-weight: 700; display: block; }
.res-staff-slots { font-size: .75rem; color: var(--text-sub); }

/* ============================================================
   SHIFT AVAILABILITY (v2)
   ============================================================ */

.period-selector {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.period-tab-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 600;
  background: var(--blush);
  color: var(--text-sub);
  border: 1.5px solid transparent;
  transition: all .2s;
  text-align: center;
}
.period-tab-btn.active {
  background: var(--white);
  color: var(--rose);
  border-color: var(--pink);
  box-shadow: 0 2px 8px rgba(232,130,154,.2);
}
.avail-deadline-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  border-left: 4px solid var(--pink);
}
.avail-deadline-card.deadline-soon   { border-left-color: var(--warning); }
.avail-deadline-card.deadline-urgent { border-left-color: var(--danger); background: #fff8f8; }
.avail-deadline-period { font-size: .8rem; color: var(--text-sub); margin-bottom: 4px; }
.avail-deadline-info   { font-size: .9rem; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.avail-days-left {
  font-size: .75rem; font-weight: 700;
  background: var(--blush); color: var(--rose);
  border-radius: 20px; padding: 2px 10px;
}
.deadline-urgent .avail-days-left { background: #FFEBEE; color: var(--danger); }
.deadline-soon   .avail-days-left { background: #FFF3E0; color: var(--warning); }
.avail-days-left.past {
  background: var(--gray-100); color: var(--text-sub);
}
.submitted-banner {
  background: #E8F5E9; color: #2E7D32;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .85rem; font-weight: 600;
  margin-bottom: 12px; line-height: 1.6;
}
.submitted-banner.submitted-editable {
  background: #E3F2FD; color: #1565C0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 6px;
}
.submitted-edit-hint {
  font-size: .74rem; font-weight: 600;
  background: #1565C0; color: #fff;
  border-radius: 20px; padding: 2px 10px;
  white-space: nowrap;
}
.submitted-banner.submitted-missed {
  background: #FFF3E0; color: #E65100;
}
.period-past-notice {
  text-align: center;
  font-size: .84rem; color: var(--text-sub);
  padding: 14px 16px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

/* 期間ナビゲーション（前の期間 / 次の期間） */
.period-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 4px 12px;
  gap: 8px;
}
.period-nav-label {
  flex: 1; text-align: center;
  font-size: .9rem; font-weight: 700;
  color: var(--text);
}
.period-nav-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%; background: var(--white);
  box-shadow: var(--shadow);
  color: var(--text-sub);
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.period-nav-btn:hover,
.period-nav-btn:active {
  background: var(--blush); color: var(--rose);
}
.avail-days-list {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 16px;
}
.avail-day-row {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.avail-day-row.is-sat .avail-day-header { background: #EFF8FF; }
.avail-day-row.is-sun .avail-day-header { background: #FFF0F0; }
.avail-day-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.avail-day-label { font-size: .88rem; font-weight: 700; }
.is-sat .avail-day-label { color: #1565C0; }
.is-sun .avail-day-label { color: var(--danger); }
.avail-add-btn {
  font-size: .75rem; font-weight: 700;
  color: var(--rose); padding: 4px 10px;
  border-radius: 20px; background: var(--blush);
  transition: background .15s;
}
.avail-add-btn:active { background: var(--blush2); }
.avail-slots-wrap {
  padding: 8px 14px;
  display: flex; flex-wrap: wrap; gap: 6px;
  min-height: 32px;
}
.avail-slot {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blush);
  border-radius: 20px;
  padding: 4px 6px 4px 12px;
}
.avail-slot-time { font-size: .82rem; font-weight: 700; color: var(--deep); }
.avail-slot-del {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(194,24,91,.15);
  color: var(--rose);
  font-size: .75rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avail-none { font-size: .78rem; color: var(--gray-400); padding: 4px 0; }
.avail-slot-form { padding: 10px 14px; border-top: 1px solid var(--gray-100); }
.avail-slot-form-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slot-time-sel {
  padding: 8px 10px;
  border: 1.5px solid var(--blush2);
  border-radius: var(--radius-sm);
  font-size: .88rem; color: var(--text);
  background: var(--white); appearance: none;
  min-width: 80px;
}
.slot-time-sel:focus { outline: none; border-color: var(--pink); }
.avail-form-sep { font-weight: 700; color: var(--text-sub); }
.avail-submit-wrap { padding: 0 0 8px; }
.avail-submit-note {
  text-align: center; font-size: .72rem;
  color: var(--text-sub); margin-top: 8px;
}
/* 管理者: スタッフ希望一覧 */
.av-section-title {
  font-size: .78rem; font-weight: 700;
  color: var(--text-sub); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 8px;
}
.av-not-submitted {
  background: #FFF9C4; border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 12px;
}
.av-not-sub-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.av-not-sub-chip {
  background: var(--white); border: 1px solid #F9A825;
  color: #F57F17; border-radius: 20px;
  padding: 3px 10px; font-size: .78rem; font-weight: 600;
}
.av-submitted-list { display: flex; flex-direction: column; gap: 10px; }
.av-staff-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.av-staff-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--blush); flex-wrap: wrap;
}
.av-staff-name    { font-size: .92rem; font-weight: 800; flex: 1; }
.av-staff-sub-date{ font-size: .72rem; color: var(--text-sub); }
.av-staff-days    { padding: 8px 12px; }
.av-staff-day {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--gray-100);
  font-size: .82rem;
}
.av-staff-day:last-child { border-bottom: none; }
.av-staff-day.is-sat .av-staff-day-label { color: #1565C0; }
.av-staff-day.is-sun .av-staff-day-label { color: var(--danger); }
.av-staff-day-label   { width: 100px; flex-shrink: 0; font-weight: 600; }
.av-staff-day-slots   { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.av-slot-chip {
  background: var(--blush); color: var(--deep);
  border-radius: 20px; padding: 2px 10px;
  font-size: .76rem; font-weight: 700;
}
.av-slot-none { color: var(--gray-400); font-size: .78rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── Small (480px+) ── */
@media (min-width: 480px) {
  .login-card { padding: 48px 40px 36px; }
  .step-rate { font-size: 2.6rem; }
}

/* ── Tablet (768px+) ── */
@media (min-width: 768px) {
  /* Login */
  .login-card {
    max-width: 440px;
    padding: 52px 48px 40px;
  }

  /* Content centering */
  .home-wrap,
  .timecard-wrap,
  .shift-wrap,
  .invoice-wrap,
  .records-wrap,
  .clients-wrap,
  .settings-wrap,
  .notif-wrap,
  .admin-wrap,
  .report-wrap {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px 24px;
  }

  /* Wider quick action grid */
  .quick-actions {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Admin stats: 4 columns */
  .admin-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Modal: a bit wider */
  .modal-box {
    max-width: 520px;
    margin: 0 auto;
  }
}

/* ── Desktop (1024px+): sidebar layout ── */
@media (min-width: 1024px) {
  :root {
    --sidebar-w: 220px;
  }

  /* Header shifts right of sidebar */
  .app-header {
    left: var(--sidebar-w);
  }

  /* Bottom nav → left sidebar */
  .bottom-nav {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    height: 100dvh;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0 12px 24px;
    border-top: none;
    border-right: 1px solid var(--blush2);
    box-shadow: 2px 0 16px rgba(61,12,38,.06);
    gap: 2px;
    overflow-y: auto;
  }

  /* Sidebar logo area */
  .bottom-nav::before {
    content: 'NannyPO!';
    display: block;
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--deep);
    letter-spacing: .06em;
    padding: 20px 12px 20px;
    border-bottom: 1px solid var(--blush2);
    margin-bottom: 8px;
    flex-shrink: 0;
  }

  /* Nav items: horizontal layout */
  .nav-item {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 11px 14px;
    border-radius: var(--radius);
    font-size: .88rem;
    font-weight: 600;
    gap: 12px;
    color: var(--gray-600);
    transition: background .15s, color .15s;
  }
  .nav-item:hover { background: var(--blush); color: var(--rose); }
  .nav-item.active {
    background: var(--blush);
    color: var(--rose);
  }
  .nav-item svg { flex-shrink: 0; }

  /* Page container: margin for sidebar */
  .page-container {
    margin-left: var(--sidebar-w);
    padding-bottom: 32px;
  }

  /* Content area max-width & centering */
  .home-wrap,
  .timecard-wrap,
  .shift-wrap,
  .invoice-wrap,
  .records-wrap,
  .clients-wrap,
  .settings-wrap,
  .notif-wrap,
  .admin-wrap,
  .report-wrap {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    padding: 24px 32px;
  }

  /* Modal: centered dialog (not bottom sheet) */
  .modal-overlay {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .modal-box {
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    max-height: 85dvh;
    padding: 28px 28px 24px;
    animation: fadeInScale .2s ease;
  }
  @keyframes fadeInScale {
    from { opacity: 0; transform: scale(.96); }
    to   { opacity: 1; transform: scale(1); }
  }

  /* Toast above bottom of screen */
  .toast {
    bottom: 32px;
  }

  /* Admin table: less cramped */
  .admin-table th,
  .admin-table td {
    padding: 12px 16px;
    font-size: .85rem;
  }

  /* Step hero: wider layout */
  .step-hero {
    padding: 28px 32px;
  }
  .step-rate { font-size: 3rem; }

  /* Quick actions: up to 4 columns */
  .quick-actions {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Admin stats: 4 columns */
  .admin-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (prefers-color-scheme: dark) {
  /* Keep light theme intentionally for accessibility / brand */
}

/* ============================================================
   ADMIN HAMBURGER MENU
   ============================================================ */
.admin-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  animation: fadeIn .22s ease;
}
.admin-menu-overlay.hidden { display: none; }

/* 閉じるアニメーション */
.admin-menu-overlay.is-closing {
  animation: fadeOut .22s ease forwards;
}
.admin-menu-overlay.is-closing .admin-menu-drawer {
  animation: slideOutLeft .22s ease forwards;
}
@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes slideOutLeft {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

.admin-menu-drawer {
  width: 260px;
  max-width: 80vw;
  background: #fff;
  height: 100%;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0,0,0,.15);
  animation: slideInLeft .22s ease;
  display: flex;
  flex-direction: column;
}
@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

.admin-menu-nav {
  /* アプリヘッダー高さ分を空けて田/×ボタンと重ならないようにする */
  padding: calc(var(--header-h) + 8px) 0 8px;
  flex: 1;
}
.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-size: .9rem;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.admin-menu-item:hover,
.admin-menu-item:active {
  background: var(--blush);
  color: var(--rose);
}
.admin-menu-item svg {
  flex-shrink: 0;
  opacity: .7;
}
