/* ═══════════════════════════════════════
   SALON MANAGEMENT — DARK NAVY × GOLD
   ═══════════════════════════════════════ */

/* ── Variables ── */
:root {
  --bg:        #08131F;
  --surface:   #0D1F33;
  --surface2:  #142840;
  --surface3:  #1C3554;
  --gold:      #C9A84C;
  --gold-lt:   #E2C472;
  --gold-dim:  rgba(201,168,76,.15);
  --gold-bdr:  rgba(201,168,76,.25);
  --text:      #E8EFF8;
  --text-dim:  #7A95B5;
  --text-muted:#3E5570;
  --green:     #4ECBA0;
  --red:       #E05C5C;
  --blue:      #5BA3D9;
  --border:    rgba(255,255,255,.06);
  --bnav-h:    64px;
  --topbar-h:  52px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  overflow: hidden;
}
a { text-decoration: none; color: inherit; cursor: pointer; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; color: inherit; }
input, select, textarea {
  font-family: inherit;
  font-size: 13px;
  background: var(--surface3);
  border: 1px solid var(--gold-bdr);
  border-radius: 8px;
  padding: 8px 11px;
  width: 100%;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
input::placeholder { color: var(--text-muted); }
select option { background: var(--surface2); color: var(--text); }
textarea { resize: vertical; min-height: 70px; }

/* ── Layout ── */
#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

/* ── Top bar ── */
#top-bar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--gold-bdr);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  z-index: 20;
}
#tb-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .1em;
  white-space: nowrap;
}
#tb-filter {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: center;
}
.sf {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--gold-bdr);
  color: var(--text-dim);
  transition: all .15s;
}
.sf:hover { border-color: var(--gold); color: var(--text); }
.sf.active { background: var(--gold); color: #0A1628; border-color: var(--gold); }
#tb-date {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: right;
}

/* ── Main content ── */
#content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 0;
  padding-bottom: calc(var(--bnav-h) + 8px);
}

/* ── Bottom nav ── */
#bottom-nav {
  height: var(--bnav-h);
  background: var(--surface);
  border-top: 1px solid var(--gold-bdr);
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
}
.bnav {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color .15s;
}
.bnav:hover { color: var(--text-dim); }
.bnav.active { color: var(--gold); }
.bi { font-size: 20px; }
.bl { font-size: 10px; font-weight: 500; letter-spacing: .02em; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
}
.card-gold {
  background: linear-gradient(135deg, #0F2640 0%, #1A3558 100%);
  border: 1px solid var(--gold-bdr);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.card-gold::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.card-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 10px;
}
.card-value { font-size: 26px; font-weight: 700; }

/* ── Hero — 次の予約 ── */
.next-appt-card {
  background: linear-gradient(135deg, #0F2640 0%, #1C3A5E 100%);
  border: 1px solid var(--gold-bdr);
  border-radius: 18px;
  padding: 22px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.next-appt-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-lt), var(--gold));
}
.next-appt-card::after {
  content: '✂';
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 80px;
  opacity: .04;
  pointer-events: none;
}
.nac-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nac-label::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(1.4); }
}
.nac-time {
  font-size: 34px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .02em;
  line-height: 1;
  margin-bottom: 4px;
}
.nac-time span { font-size: 18px; color: var(--text-dim); margin: 0 4px; }
.nac-customer {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.nac-meta { font-size: 13px; color: var(--text-dim); }
.nac-salon { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.nac-countdown {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--gold-dim);
  font-size: 12px;
  color: var(--gold-lt);
  font-weight: 600;
}
.nac-empty {
  text-align: center;
  padding: 20px 0;
  color: var(--text-dim);
  font-size: 14px;
}

/* ── KPI Grid ── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
}
.kpi-l { font-size: 10px; color: var(--text-muted); margin-bottom: 5px; font-weight: 600; letter-spacing: .05em; }
.kpi-v { font-size: 18px; font-weight: 700; color: var(--text); }
.kpi-v.gold { color: var(--gold); }
.kpi-v.green { color: var(--green); }
.kpi-v.red { color: var(--red); }
.kpi-sub { font-size: 10px; color: var(--text-muted); margin-top: 3px; }

/* Progress */
.progress-wrap { background: var(--surface3); border-radius: 99px; height: 5px; margin-top: 8px; overflow: hidden; }
.progress-bar  { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--gold-lt)); transition: width .5s; }

/* ── Today's list ── */
.appt-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.appt-list-item:last-child { border-bottom: none; }
.ali-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  min-width: 42px;
  text-align: center;
}
.ali-bar {
  width: 3px;
  height: 36px;
  border-radius: 99px;
  flex-shrink: 0;
}
.ali-info { flex: 1; min-width: 0; }
.ali-name { font-size: 14px; font-weight: 600; color: var(--text); }
.ali-menu { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ali-status { flex-shrink: 0; }

/* ── Section header ── */
.sec-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sec-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: .04em;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all .15s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-lt));
  color: #0A1628;
  border: none;
}
.btn-gold:hover { filter: brightness(1.1); }
.btn-secondary {
  background: var(--surface3);
  color: var(--text-dim);
  border: 1px solid var(--gold-bdr);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--text); }
.btn-primary { background: var(--gold); color: #0A1628; border: none; }
.btn-primary:hover { background: var(--gold-lt); }
.btn-danger { background: rgba(224,92,92,.15); color: var(--red); border: 1px solid rgba(224,92,92,.3); }
.btn-danger:hover { background: rgba(224,92,92,.25); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }

/* ── Badge ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-gold   { background: var(--gold-dim); color: var(--gold-lt); }
.badge-green  { background: rgba(78,203,160,.15); color: var(--green); }
.badge-red    { background: rgba(224,92,92,.15); color: var(--red); }
.badge-gray   { background: var(--surface3); color: var(--text-muted); }
.badge-blue   { background: rgba(91,163,217,.15); color: var(--blue); }

/* ── Salon dot ── */
.salon-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }

/* ── Toolbar ── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.toolbar-right { margin-left: auto; display: flex; gap: 8px; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left;
  padding: 8px 12px;
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--gold-bdr);
  white-space: nowrap;
}
tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
tbody tr.clickable { cursor: pointer; }

/* ── Forms ── */
.form-section { margin-bottom: 20px; }
.form-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gold-bdr);
}
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-full   { grid-column: 1 / -1; }
.field { margin-bottom: 10px; }
.field label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 5px;
  font-weight: 600;
  letter-spacing: .04em;
}
.field-row { display: flex; gap: 8px; align-items: flex-end; }
.required::after { content: " *"; color: var(--red); }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ── Tabs ── */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--gold-bdr);
  margin-bottom: 16px;
  gap: 0;
}
.tab-btn {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
  letter-spacing: .02em;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Info grid ── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.info-item label { font-size: 10px; color: var(--text-muted); display: block; margin-bottom: 3px; font-weight: 600; letter-spacing: .05em; }
.info-item span  { font-size: 14px; color: var(--text); }

/* ── Customer ── */
.customer-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.customer-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--surface3);
  border: 2px solid var(--gold-bdr);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.customer-name { font-size: 18px; font-weight: 700; color: var(--text); }
.customer-kana { font-size: 12px; color: var(--text-dim); }
.customer-meta { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }

/* ── Photo ── */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-item {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--gold-bdr);
  cursor: pointer;
  position: relative;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item .photo-category {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: 10px; padding: 3px 6px;
}
.photo-add-btn {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1.5px dashed var(--gold-bdr);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted); font-size: 12px; gap: 6px;
  transition: all .15s;
}
.photo-add-btn:hover { border-color: var(--gold); color: var(--gold); }
.photo-add-btn .icon { font-size: 24px; }

/* ── Ticket ── */
.ticket-card {
  background: var(--surface2);
  border: 1px solid var(--gold-bdr);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px;
}
.ticket-name { font-weight: 600; flex: 1; }
.ticket-remaining { font-size: 22px; font-weight: 700; color: var(--gold); }
.ticket-expire { font-size: 11px; color: var(--text-muted); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 36px; margin-bottom: 10px; opacity: .5; }
.empty-state p { font-size: 13px; }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 14px; }
.page-btn {
  padding: 5px 10px;
  border: 1px solid var(--gold-bdr);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  background: var(--surface);
  color: var(--text-dim);
  transition: all .15s;
}
.page-btn:hover { border-color: var(--gold); color: var(--text); }
.page-btn.active { background: var(--gold); color: #0A1628; border-color: var(--gold); }

/* ── Retail row ── */
.retail-list { margin-bottom: 8px; }
.retail-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.retail-row input { flex: 1; }
.retail-row input.qty   { max-width: 60px; flex: none; }
.retail-row input.price { max-width: 90px; flex: none; }

/* ── Stat row ── */
.stat-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 13px; color: var(--text-dim); flex: 1; }
.stat-value { font-size: 13px; font-weight: 700; color: var(--text); }

/* ── More page ── */
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.more-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color .15s;
}
.more-item:hover { border-color: var(--gold-bdr); }
.more-item .mi-icon { font-size: 28px; }
.more-item .mi-label { font-size: 13px; font-weight: 600; color: var(--text-dim); }

/* ── Toast ── */
#toast-root {
  position: fixed;
  bottom: calc(var(--bnav-h) + 16px);
  right: 16px;
  z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--surface3);
  color: var(--text);
  border: 1px solid var(--gold-bdr);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
  animation: slideIn .2s ease;
  max-width: 300px;
}
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red); }
@keyframes slideIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }

/* ── Modal ── */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 100;
  overflow-y: auto;
  backdrop-filter: blur(4px);
}
#modal-overlay.hidden { display: none; }
#modal-box {
  background: var(--surface);
  border: 1px solid var(--gold-bdr);
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
  flex-shrink: 0;
}
#modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--gold-bdr);
}
#modal-title { font-size: 16px; font-weight: 700; color: var(--text); }
#modal-close { font-size: 18px; color: var(--text-muted); padding: 4px 8px; border-radius: 6px; transition: color .15s; }
#modal-close:hover { color: var(--text); }
#modal-body { padding: 20px; max-height: 72vh; overflow-y: auto; }

/* ── Calendar v2 (dark) ── */
.appt-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.view-switch { display: flex; border: 1px solid var(--gold-bdr); border-radius: 8px; overflow: hidden; }
.vsw-btn {
  padding: 7px 16px; font-size: 13px; font-weight: 600;
  color: var(--text-muted); background: var(--surface);
  border: none; border-right: 1px solid var(--gold-bdr);
  cursor: pointer; transition: all .15s;
}
.vsw-btn:last-child { border-right: none; }
.vsw-btn:hover { color: var(--text); background: var(--surface2); }
.vsw-btn.active { background: var(--gold); color: #0A1628; }
.ml-auto { margin-left: auto; }

.tl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tl-header {
  display: flex;
  border-bottom: 1px solid var(--gold-bdr);
  background: var(--surface2);
  flex-shrink: 0;
}
.tl-axis-head { width: 50px; flex-shrink: 0; border-right: 1px solid var(--border); }
.tl-day-head {
  flex: 1; text-align: center; padding: 8px 2px;
  border-right: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted);
  cursor: pointer; transition: background .15s;
}
.tl-day-head:last-child { border-right: none; }
.tl-day-head:hover { background: var(--surface3); }
.tl-day-head.today-head { background: rgba(201,168,76,.08); }
.tl-day-num { font-size: 20px; font-weight: 700; display: block; line-height: 1.2; color: var(--text); }
.tl-day-head.today-head .tl-day-num {
  color: #0A1628;
  background: var(--gold);
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 2px; font-size: 15px;
}
.tl-day-head.sun-head .tl-day-lbl { color: var(--red); }
.tl-day-head.sat-head .tl-day-lbl { color: var(--blue); }
.tl-day-head.sun-head .tl-day-num { color: var(--red); }
.tl-day-head.sat-head .tl-day-num { color: var(--blue); }
.tl-day-head.today-head .tl-day-num { color: #0A1628 !important; }

.tl-body {
  display: flex;
  overflow-y: auto;
  flex: 1;
  max-height: calc(100vh - 280px);
  position: relative;
}
.tl-axis {
  width: 50px; flex-shrink: 0;
  position: sticky; left: 0;
  background: var(--surface); z-index: 5;
  border-right: 1px solid var(--border);
}
.tl-axis-cell {
  /* height は JS で style="height:Xpx" を付与 */
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 0 8px 0 0;
  font-size: 10px; color: var(--text-muted);
  position: relative; top: -6px;
}
.tl-cols { flex: 1; display: flex; position: relative; min-width: 0; }
.tl-col  { flex: 1; position: relative; border-right: 1px solid var(--border); min-width: 0; cursor: pointer; }
.tl-col:last-child { border-right: none; }
.tl-col.today-col { background: rgba(201,168,76,.03); }
.tl-hour-row { /* height は JS で style="height:Xpx" を付与 */ border-bottom: 1px solid rgba(255,255,255,.04); position: relative; }
.tl-hour-row::after {
  content: ''; position: absolute; bottom: 50%;
  left: 0; right: 0; border-bottom: 1px dashed rgba(255,255,255,.025);
}
.appt-blk {
  position: absolute; left: 2px; border-radius: 6px;
  padding: 3px 5px; color: #fff; font-size: 11px;
  overflow: hidden; cursor: pointer; z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  transition: filter .1s, box-shadow .1s;
  line-height: 1.3;
}
.appt-blk:hover { filter: brightness(1.15); box-shadow: 0 4px 14px rgba(0,0,0,.4); z-index: 4; }
.appt-blk .ab-time { font-size: 10px; opacity: .8; white-space: nowrap; }
.appt-blk .ab-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-blk .ab-menu { font-size: 10px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 6; pointer-events: none; }
.now-dot  { position: absolute; left: -4px; top: -4px; width: 9px; height: 9px; background: var(--red); border-radius: 50%; }

.month-grid-v2 {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.month-day-lbl {
  text-align: center; padding: 6px 4px;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  background: var(--surface2);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  letter-spacing: .04em;
}
.month-day-lbl.sun { color: var(--red); }
.month-day-lbl.sat { color: var(--blue); }
.month-cell {
  min-height: 78px; padding: 5px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .12s;
}
.month-cell:hover { background: var(--surface2); }
.month-cell.other-m { background: rgba(0,0,0,.15); }
.month-cell.today-m { background: rgba(201,168,76,.06); }
.mc-date {
  font-size: 12px; font-weight: 700; color: var(--text-dim);
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-bottom: 3px;
}
.month-cell.today-m .mc-date { background: var(--gold); color: #0A1628; border-radius: 50%; }
.month-cell.other-m .mc-date { color: var(--text-muted); }
.mc-dots { display: flex; flex-wrap: wrap; gap: 2px; }
.mc-dot  { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.mc-more { font-size: 10px; color: var(--text-muted); }

/* ── Loading ── */
.loading-spinner {
  display: flex; align-items: center; justify-content: center;
  padding: 48px; color: var(--text-muted); font-size: 13px; gap: 10px;
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--surface3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Table extras ── */
tbody tr.dim-row td { color: var(--text-muted); }
tfoot td { padding: 10px 12px; color: var(--text); font-size: 13px; border-top: 1px solid var(--gold-bdr); }

/* ── Gender ── */
.gender-f { color: #E890BB; }
.gender-m { color: var(--blue); }

/* ── Zoom controls ── */
.zoom-btn {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--surface2); border: 1px solid var(--gold-bdr);
  color: var(--text-dim); font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s; flex-shrink: 0;
  line-height: 1;
}
.zoom-btn:hover { border-color: var(--gold); color: var(--gold); }
.zoom-lbl {
  font-size: 11px; color: var(--text-muted); white-space: nowrap;
  min-width: 28px; text-align: center;
}

/* ── 予約 / 予定 切り替え ── */
.appt-type-toggle {
  display: flex; border: 1px solid var(--gold-bdr); border-radius: 10px;
  overflow: hidden; margin-bottom: 4px;
}
.att-btn {
  flex: 1; padding: 9px 0; font-size: 13px; font-weight: 600;
  color: var(--text-muted); background: var(--surface);
  border: none; cursor: pointer; transition: all .15s;
}
.att-btn:first-child { border-right: 1px solid var(--gold-bdr); }
.att-btn.active { background: var(--gold-dim); color: var(--gold); }
.att-btn:hover:not(.active) { background: var(--surface2); color: var(--text); }

/* ── 予定ブロック ── */
.appt-blk-event {
  background: var(--surface3) !important;
  border: 1.5px dashed var(--text-dim) !important;
  color: var(--text-dim) !important;
}
.ab-event-tag {
  display: inline-block; font-size: 9px; font-weight: 700;
  background: var(--surface2); color: var(--text-muted);
  border-radius: 3px; padding: 0 4px; margin-bottom: 2px;
  letter-spacing: .04em;
}
.mc-dot-event {
  border: 1px dashed var(--text-dim) !important;
  background: transparent !important;
}

/* ── Visit history cards ── */
.visit-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 7px;
}
.vc-row1 {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 3px;
}
.vc-left {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-width: 0;
}
.vc-date   { font-size: 13px; font-weight: 700; color: var(--text); }
.vc-salon  { font-size: 11px; color: var(--text-muted); margin-left: 6px; }
.vc-amounts { font-size: 12px; font-weight: 700; color: var(--gold); white-space: nowrap; flex-shrink: 0; }
.vc-menu   { font-size: 12px; color: var(--text-dim); margin-bottom: 2px; }
.vc-note   {
  font-size: 11px; color: var(--text-muted);
  background: var(--surface3); border-radius: 6px;
  padding: 4px 8px; margin-top: 4px; margin-bottom: 4px;
  line-height: 1.5;
}
.vc-actions { display: flex; gap: 5px; justify-content: flex-end; margin-top: 5px; }

/* ── Customer list (五十音順) ── */
.cust-group { margin-bottom: 6px; }
.cust-group-hd {
  font-size: 11px; font-weight: 700; color: var(--gold);
  letter-spacing: .12em; padding: 10px 14px 5px;
  border-bottom: 1px solid var(--gold-bdr);
  background: rgba(201,168,76,.06);
}
.cust-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .12s;
  min-height: 54px;
}
.cust-row:last-child { border-bottom: none; }
.cust-row:hover { background: var(--surface2); }
.cust-avatar {
  flex-shrink: 0;
  display: flex; align-items: center;
  filter: drop-shadow(0 0 4px currentColor);
  opacity: .9;
}
.cust-names { flex: 1; min-width: 0; }
.cust-name  {
  display: block; font-size: 15px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.cust-kana  {
  display: block; font-size: 11px; color: var(--text-dim);
  margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cust-stats {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 1px; flex-shrink: 0; text-align: right;
}
.cust-stat-visit  { font-size: 11px; color: var(--text-muted); }
.cust-stat-count  { font-size: 11px; color: var(--text-dim); }
.cust-stat-amount { font-size: 13px; font-weight: 700; color: var(--gold); }

/* ── Responsive ── */
@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi-row .kpi-card:last-child { grid-column: 1 / -1; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .more-grid { grid-template-columns: 1fr 1fr; }
  .cust-name { font-size: 14px; }
  .cust-stat-amount { font-size: 12px; }
}
