/* ─── Utility ───────────────────────────────────────────────── */
.text-meta  { font-size: 11px; color: #9E9A94; }
.text-sub   { font-size: 12px; color: #6B6760; }
.text-xs    { font-size: 10px; }
.fw-600     { font-weight: 600; }
.ws-nowrap  { white-space: nowrap; }

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "LINE Seed JP", sans-serif;
  background: #F5F3EF;
  color: #1A1916;
  font-size: 14px;
}

/* ─── Navigation base ────────────────────────────────────────── */
.nav {
  background: #2A52A0;
  color: #fff;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-logo { font-size: 15px; font-weight: 700; letter-spacing: .02em; text-decoration: none; color: #fff; }
.nav-logo:hover { opacity: .85; }
.nav-logo-admin { color: #fff; }
.nav-links { display: flex; gap: 20px; margin-left: auto; font-size: 13px; align-items: center; }
.nav-links a { color: #BDD0F0; text-decoration: none; }
.nav-links a:hover { color: #fff; }
.nav-user {
  font-size: 12px;
  color: #BDD0F0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-user form { display: inline; }
.btn-logout {
  background: none;
  border: 1px solid #BDD0F0;
  color: #BDD0F0;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}
.btn-logout:hover { background: rgba(255,255,255,.15); }

/* ─── Layout ────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }

/* ─── Forms ─────────────────────────────────────────────────── */
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #4A4640;
  margin-bottom: 4px;
}
label .req { color: #B83020; margin-left: 2px; }

input[type=text],
input[type=email],
input[type=password],
input[type=tel],
input[type=url],
input[type=number],
input[type=date],
input[type=datetime-local] {
  width: 100%;
  border: 1px solid #D0CAC0;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 16px;
  background: #FAFAF8;
  transition: border-color .15s;
}
input:focus { outline: none; border-color: #2A52A0; background: #fff; }
input.is-invalid { border-color: #B83020; }
input[type=radio],
input[type=checkbox] { width: auto; }

select {
  width: 100%;
  border: 1px solid #D0CAC0;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 16px;
  background: #FAFAF8;
}
select:focus { outline: none; border-color: #2A52A0; background: #fff; }
select.is-invalid { border-color: #B83020; }

textarea {
  width: 100%;
  border: 1px solid #D0CAC0;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 16px;
  background: #FAFAF8;
  resize: vertical;
}
textarea:focus { outline: none; border-color: #2A52A0; background: #fff; }

.field         { margin-bottom: 16px; }
.field-error   { font-size: 11px; color: #B83020; margin-top: 3px; }
.field-hint    { font-size: 11px; color: #9E9A94; margin-top: 3px; }
.field-row     { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.field-row .field { flex: 1; min-width: 120px; }
.field-sep     { align-self: flex-start; padding-top: 32px; color: #6B6760; font-size: 14px; }

.radio-group   { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.radio-label   { display: flex; align-items: center; gap: 6px; font-size: 13px;
                 font-weight: normal; color: #1A1916; cursor: pointer; }
.check-group   { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 4px; }
.check-label   { display: flex; align-items: center; gap: 6px; font-size: 13px;
                 font-weight: normal; color: #1A1916; cursor: pointer; }
.check-label input[type=checkbox] { width: 15px; height: 15px; cursor: pointer; }

/* ─── Buttons ───────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  width: auto;
  padding: 9px 20px;
  background: #2A52A0;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:hover { background: #1F3E7A; }
.btn-primary:disabled {
  background: #C9C5BE;
  color: #FAFAF8;
  border-color: #C9C5BE;
  cursor: not-allowed;
  opacity: 0.7;
}
.btn-block { display: block; width: 100%; padding-top: 11px; padding-bottom: 11px; }

.btn-secondary {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid #D0CAC0;
  border-radius: 6px;
  color: #4A4640;
  font-size: 12px;
  cursor: pointer;
  background: #fff;
  text-decoration: none;
}
.btn-secondary:hover { background: #F5F3EF; }

.btn-ghost    { display: inline-flex; align-items: center; padding: 3px 8px; font-size: 11px;
                border: 1px solid #D0CAC0; border-radius: 4px; color: #4A4640;
                background: #FAFAF8; cursor: pointer; text-decoration: none; }
.btn-ghost:hover { background: #F0EDE8; }

.btn-sm       { padding: 5px 12px; font-size: 12px; }
.btn-xs       { padding: 3px 8px; font-size: 11px; white-space: nowrap; }
.btn-danger { display: inline-block; padding: 3px 8px; font-size: 11px;
              border: 1px solid #D9534F; border-radius: 4px; color: #fff;
              background: #D9534F; cursor: pointer; text-decoration: none;
              white-space: nowrap; }
.btn-danger:hover { background: #C9302C; border-color: #C9302C; }
.btn-disabled { display: inline-block; padding: 3px 8px; font-size: 11px;
                border: 1px solid #D0CAC0; border-radius: 4px; color: #C0BBB4;
                background: #F5F3EF; cursor: not-allowed; }
button.btn-xs.btn-secondary[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ─── Utilities ─────────────────────────────────────────────── */
.divider       { border: none; border-top: 1px solid #EAE6E0; margin: 20px 0; }
.text-center   { text-align: center !important; }
.text-sm       { font-size: 12px; color: #6B6760; }
.text-muted    { color: #9E9A94; font-size: 12px; }
.link          { color: #2A52A0; text-decoration: none; }
.link:hover    { text-decoration: underline; }
.empty-state      { text-align: center; color: #9E9A94; padding: 40px 0; }
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state-msg  { font-size: 14px; }

/* ─── Alerts ────────────────────────────────────────────────── */
.alert         { padding: 11px 14px; border-radius: 6px; font-size: 12px; margin-bottom: 16px; }
.alert-error   { background: #FDE8E6; border: 1px solid #F5A9A3; color: #8B1A14; }
.alert-success { background: #DCF0E6; border: 1px solid #86C8A0; color: #1A5E40; }
.alert-info    { background: #EBF3FB; border: 1px solid #A8BBD8; color: #1F4E79; }
.alert-warning { background: #FFF8E8; border: 1px solid #E8A000; color: #7A4F00; }

/* ─── Form Groups ────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; }

/* ─── Data Tables ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  background: #F5F3EF; color: #6B6760; font-weight: 600; font-size: 11px;
  padding: 9px 12px; text-align: left; border-bottom: 2px solid #D0CAC0;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid #EAE6E0; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFAF8; }

/* ─── Badges ────────────────────────────────────────────────── */
.badge           { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 500; white-space: nowrap; }
.badge-success   { background: #DCF0E6; color: #1A5E40; }
.badge-danger    { background: #FAE0DC; color: #B83020; }
.badge-warning   { background: #FDF0D0; color: #7A4F00; }
.badge-info      { background: #EBF3FB; color: #1F4E79; }
.badge-secondary   { background: #F5F3EF; color: #6B6760; }
.badge-unverified  { background: #FBE4D5; color: #B5480B; border: 1px solid #F0B68A; }
.badge-primary   { background: #EFF4FC; color: #2A52A0; }
.badge-avail     { background: #DCF0E6; color: #1A5E40; }
.badge-few       { background: #FDF0D0; color: #7A4F00; }
.badge-full      { background: #FAE0DC; color: #B83020; }
.badge-override  { background: #EFF4FC; color: #2A52A0; }
.badge-facility  { background: #C8E6C9; color: #1B5E20; }
.badge-inherit   { background: #F5F3EF; color: #9E9A94; }

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination     { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 16px; }
.page-link      { display: inline-block; padding: 4px 10px; font-size: 12px; border: 1px solid #D0CAC0;
                  border-radius: 4px; color: #2A52A0; text-decoration: none; background: #fff; }
.page-link:hover { background: #EBF3FB; }
.page-current   { display: inline-block; padding: 4px 10px; font-size: 12px; border: 1px solid #2A52A0;
                  border-radius: 4px; background: #2A52A0; color: #fff; font-weight: 600; }

/* ─── Btn success ────────────────────────────────────────────── */
.btn-success { display: inline-block; padding: 8px 18px; border: 1px solid #1A5E40;
               border-radius: 6px; background: #1A5E40; color: #fff; font-size: 12px;
               cursor: pointer; text-decoration: none; }
.btn-success:hover { background: #145030; border-color: #145030; }

/* ─── Error page ─────────────────────────────────────────────── */
.error-page    { text-align: center; padding-top: 80px; }
.error-code    { font-size: 48px; font-weight: 700; color: #D0CAC0; }
.error-message { font-size: 16px; color: #6B6760; margin: 12px 0 8px; }
.error-detail  { font-size: 13px; color: #9E9A94; margin: 0 0 24px; }

/* ─── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-box {
  background: #fff; border-radius: 10px; padding: 24px;
  max-width: 440px; width: 90%; box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.modal-title  { font-weight: 700; font-size: 15px; }
.modal-close  {
  background: none; border: none; font-size: 16px; cursor: pointer;
  color: #9E9A94; padding: 2px 6px; line-height: 1;
}

/* ─── Card ───────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid #D0CAC0;
  border-radius: 10px;
  padding: 32px;
  max-width: 440px;
  margin: 0 auto;
}
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.card-sub   { font-size: 12px; color: #9E9A94; margin-bottom: 24px; }

/* ─── Login ─────────────────────────────────────────────────── */
.login-card     { margin-top: 40px; }
.login-header   { text-align: center; margin-bottom: 24px; }
.login-logo     { font-size: 20px; font-weight: 700; color: #2A52A0; }
.login-sub      { font-size: 11px; color: #9E9A94; margin-top: 4px; }
.login-link-top { margin-bottom: 8px; }

/* ─── 予約フォーム セクションUI（会員・管理共通） ───────────── */
.confirm-section {
  border-radius: 8px; margin-bottom: 14px; overflow: hidden;
}
.confirm-section-primary { border: 1.5px solid #2A52A0; }
.confirm-section-primary .confirm-section-head { background: #EBF3FB; color: #1F4E79; }
.confirm-section-warn    { border: 1.5px solid #E8A000; }
.confirm-section-warn    .confirm-section-head { background: #FFF8E8; color: #7A4F00; }
.confirm-section-neutral { border: 1px solid #C8C4BC; }
.confirm-section-neutral .confirm-section-head { background: #F5F3EF; color: #6B6760; }
.confirm-section-overnight { border: 1px solid #8B5E00; background: #FFFBEB; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.confirm-section-head {
  padding: 8px 14px; font-size: 12px; font-weight: 700;
}
.confirm-section-body  { padding: 10px 14px; }
.confirm-section-hint  { font-size: 11px; color: #6B6760; margin-bottom: 8px; }

.purpose-options { display: flex; flex-direction: column; gap: 6px; }
.purpose-option  {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid #D0CAC0; border-radius: 6px; padding: 8px 10px;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.purpose-option input { width: auto; }
.purpose-selected { border-color: #2A52A0; background: #EBF3FB; color: #2A52A0; }

.mat-check-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.mat-check-item {
  display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600;
  border: 1px solid #D0CAC0; border-radius: 6px; padding: 7px 10px; cursor: pointer;
}
.mat-check-item input { width: auto; }
.mat-other        { border-top: 1px dashed #D0CAC0; padding-top: 10px; }
.mat-other-label  { font-size: 11px; font-weight: 600; margin-bottom: 6px; }

.equip-list { display: flex; flex-direction: column; gap: 6px; }
.equip-item {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
  border: 1px solid #D0CAC0; border-radius: 6px; padding: 7px 10px;
}
.equip-name  { flex: 1; }
.equip-disabled { opacity: 0.5; background: #F5F3EF; }
.equip-qty-input {
  width: 56px; text-align: right; padding: 3px 6px;
  border: 1px solid #C4BFB8; border-radius: 4px; font-size: 16px;
}

.child-use-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 10px 14px; }
.child-use-label input { width: auto; margin-top: 3px; }
.child-use-title { font-size: 12px; font-weight: 500; }
.child-use-desc  { font-size: 10px; color: #9E9A94; margin-top: 2px; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 767px) {
  .nav-links { display: none; }
  .container,
  .container-wide {
    padding: 24px 16px;
  }
}

/* ─── Machine detail button (shared: U-00 / U-05 / display) ─── */
.btn-machine-detail {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 12px; margin-left: 8px;
  font-size: 11px; font-weight: 600;
  color: #2A52A0; background: #EFF4FC; border: 1px solid #BDD0F0;
  border-radius: 999px; cursor: pointer; vertical-align: middle; white-space: nowrap;
}
.btn-machine-detail:hover { background: #DDE9FB; border-color: #2A52A0; }

/* ─── 備品選択グリッド（4カラム） ──────────────────────────────── */
.equip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 1024px) {  /* iPad */
  .equip-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .equip-grid { grid-template-columns: 1fr; }
}
.equip-grid-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #D0CAC0;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  flex-wrap: wrap;
}
.equip-grid-item.equip-disabled { opacity: 0.5; background: #F5F3EF; }
.equip-grid-name {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.equip-grid-item input[type="number"] {
  width: 56px;
  padding: 3px 6px;
  border: 1px solid #C4BFB8;
  border-radius: 4px;
  font-size: 16px;
  text-align: right;
  flex-shrink: 0;
}

/* ─── 備品説明ボタン ────────────────────────────────────────────── */
.equip-info-btn {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  background: none;
  border: 1px solid #BDD0F0;
  border-radius: 999px;
  font-size: 10px;
  color: #2A52A0;
  cursor: pointer;
  white-space: nowrap;
}
.equip-info-btn:hover { background: #EFF4FC; }
