/* M2 Parking - styles */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter","Noto Sans JP",sans-serif;
  color: #1a1a1a;
  background: #f7f8fa;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
[hidden] { display: none !important; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
  background: #fff;
  border-bottom: 1px solid #e7e9ee;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.brand-link { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-icon { font-size: 20px; color: #2064dd; }
.brand-name { letter-spacing: 0.02em; }
.lang-switch { display: flex; gap: 4px; }
.lang-btn {
  border: 1px solid #d6d9e0;
  background: #fff;
  color: #4a4a4a;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.lang-btn.active { background: #2064dd; color: #fff; border-color: #2064dd; }

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 18px 48px;
}

.intro h1 {
  font-size: 28px;
  margin: 8px 0 14px;
  color: #0e1a3d;
}
.hero-notice {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  background: linear-gradient(135deg, #ecf2ff 0%, #f8fafc 100%);
  border: 1.5px solid #2064dd;
  border-radius: 12px;
  margin: 0 0 14px;
  box-shadow: 0 2px 8px rgba(32,100,221,0.08);
}
.hero-notice-icon {
  font-size: 36px;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: #2064dd;
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.hero-notice-text { flex: 1; }
.hero-notice-main {
  margin: 0 0 6px;
  font-size: 15px;
  color: #0e1a3d;
  font-weight: 500;
  line-height: 1.5;
}
.hero-notice-main strong {
  color: #2064dd;
  font-weight: 700;
}
.hero-notice-sub {
  margin: 0;
  font-size: 12px;
  color: #5b6480;
  line-height: 1.5;
}
.intro .lead {
  margin: 0 0 18px;
  color: #5b6480;
  font-size: 13px;
  text-align: center;
}
@media (max-width: 480px) {
  .hero-notice { padding: 12px 14px; gap: 10px; }
  .hero-notice-icon { width: 44px; height: 44px; font-size: 28px; }
  .hero-notice-main { font-size: 14px; }
  .hero-notice-sub { font-size: 11.5px; }
}

/* Calendar */
.calendar-section {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid #e7e9ee;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  margin-bottom: 22px;
}
.cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cal-nav h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0e1a3d;
}
.cal-nav-btn {
  width: 36px; height: 36px;
  border: 1px solid #d6d9e0;
  background: #fff;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  color: #4a4a4a;
}
.cal-nav-btn:hover { background: #f0f2f5; }
.legend {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  color: #5b6480;
  margin-bottom: 12px;
}
.dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: -1px;
}
.dot-free { background: #28b87e; }
.dot-booked { background: #df3b3b; }
.dot-selected { background: #2064dd; }

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #8b91a8;
  padding: 6px 0;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
  color: #1a1a1a;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border: 2px solid transparent;
  transition: background .15s, transform .1s;
  user-select: none;
}
.cal-day.is-other { color: #c0c5d4; background: transparent; cursor: default; }
.cal-day.is-past { color: #b0b6c5; background: #fafbfc; cursor: not-allowed; }
.cal-day.is-free { background: #e6f7ee; color: #186a3b; }
.cal-day.is-free:hover { background: #cdebd9; transform: scale(1.04); }
.cal-day.is-booked { background: #ffe5e3; color: #8a1f1b; cursor: not-allowed; }
.cal-day.is-selected { background: #2064dd; color: #fff; }
.cal-day.is-in-range { background: #6f9aec; color: #fff; }
.cal-day .day-sub { font-size: 9px; opacity: 0.7; }
.cal-day .cal-rem { font-size: 10px; font-weight: 700; line-height: 1; margin-top: 2px; padding: 1px 5px; border-radius: 999px; background: rgba(24,106,59,.14); }
.cal-day.is-booked .cal-rem.cal-full { background: transparent; padding: 0; font-size: 14px; color: #8a1f1b; }
.cal-day.is-selected .cal-rem, .cal-day.is-in-range .cal-rem { background: rgba(255,255,255,.28); color: #fff; }

.cal-help {
  margin: 12px 0 0;
  font-size: 12px;
  color: #5b6480;
  text-align: center;
}

.selection-bar {
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #2064dd 0%, #1a4fbf 100%);
  color: #fff;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(32,100,221,0.25);
}
.selection-bar .sel-info { display: flex; flex-direction: column; gap: 2px; }
.selection-bar .sel-info strong { font-size: 14px; font-weight: 600; }
.selection-bar .sel-nights { font-size: 12px; opacity: 0.88; }
.selection-bar .sel-actions { display: flex; gap: 8px; flex-shrink: 0; }
.selection-bar .btn-secondary {
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 12px;
  padding: 8px 12px;
}
.selection-bar .btn-secondary:hover { background: rgba(255,255,255,0.24); }
.selection-bar .btn-primary {
  background: #fff;
  color: #1843a5;
  font-size: 13px;
  padding: 8px 16px;
}
.selection-bar .btn-primary:hover { background: #f0f4ff; }

@media (max-width: 480px) {
  .selection-bar { flex-direction: column; align-items: stretch; }
  .selection-bar .sel-actions { justify-content: space-between; }
  .selection-bar .sel-actions button { flex: 1; }
}

/* Form */
.form-section, .success-section, .not-found {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  border: 1px solid #e7e9ee;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.form-section h2 {
  margin: 0 0 14px;
  font-size: 20px;
  color: #0e1a3d;
}
.selected-range {
  background: #ecf2ff;
  color: #1843a5;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 18px;
  font-weight: 500;
}
#bookingForm label, #manageForm label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: #2a3050;
  font-weight: 500;
}
#bookingForm label span, #manageForm label span {
  display: block;
  margin-bottom: 6px;
}
#bookingForm input, #bookingForm select, #bookingForm textarea,
#manageForm input, #manageForm select, #manageForm textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d6d9e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #1a1a1a;
}
#bookingForm input:focus, #bookingForm select:focus, #bookingForm textarea:focus,
#manageForm input:focus, #manageForm select:focus, #manageForm textarea:focus {
  outline: none;
  border-color: #2064dd;
  box-shadow: 0 0 0 3px rgba(32,100,221,0.16);
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-note {
  margin: -6px 0 14px;
  font-size: 12px;
  color: #5b6480;
  background: #fffaeb;
  border-left: 3px solid #f0b429;
  padding: 8px 12px;
  border-radius: 6px;
  line-height: 1.5;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.btn-primary, .btn-secondary, .btn-danger {
  padding: 11px 18px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .1s, box-shadow .15s;
}
.btn-primary { background: #2064dd; color: #fff; box-shadow: 0 2px 6px rgba(32,100,221,0.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(32,100,221,0.32); }
.btn-secondary { background: #f0f2f5; color: #3a3f5a; }
.btn-secondary:hover { background: #e3e6ec; }
.btn-danger { background: #fff; color: #c1271f; border: 1px solid #ffcfcb; }
.btn-danger:hover { background: #ffeae8; }

/* Success */
.success-card {
  text-align: center;
}
.success-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  background: #e6f7ee;
  color: #28b87e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
}
.cancelled-section .success-icon { background: #ffe5e3; color: #c1271f; }
.success-card h2 { margin: 0 0 8px; color: #0e1a3d; }
.success-card p { color: #5b6480; margin: 0 0 16px; }
.success-url {
  background: #f0f2f5;
  border: 1px dashed #c5cad6;
  padding: 12px;
  border-radius: 8px;
  font-family: ui-monospace,monospace;
  font-size: 12px;
  word-break: break-all;
  margin-bottom: 14px;
  color: #2a3050;
}
.success-meta {
  font-size: 13px;
  color: #5b6480;
  margin-bottom: 18px;
}
.success-actions { display: flex; gap: 10px; justify-content: center; }

/* Manage header */
.manage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.status-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  background: #e6f7ee;
  color: #186a3b;
}
.status-badge.cancelled { background: #ffe5e3; color: #8a1f1b; }
.booking-id {
  font-family: ui-monospace,monospace;
  font-size: 11px;
  color: #8b91a8;
  margin-bottom: 18px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px 18px;
  font-size: 12px;
  color: #8b91a8;
}
.footer a { color: #5b6480; }

.error-banner {
  background: #ffe5e3;
  border: 1px solid #ffcfcb;
  color: #8a1f1b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}

@media (max-width: 480px) {
  .row { grid-template-columns: 1fr; }
  .intro h1 { font-size: 22px; }
  .cal-day { font-size: 13px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions button, .form-actions a { width: 100%; }
}
