.form-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 24px 3rem;
  background: linear-gradient(135deg, #ecf7fd, #ffffff);
}

.form-page.auth-page {
  min-height: 445px;
  padding: 32px 24px 48px;
  background: var(--white);
}

.form-card {
  width: min(420px, 100%);
  border-radius: 8px;
  background: var(--white);
  padding: 30px 30px 3rem;
  box-shadow: var(--shadow);
}

.centered-logo {
  margin: 0 auto 14px;
}

.centered-logo:has(.brand-logo-image) {
  border:0;
  background:var(--navy);
}

.form-card h1 {
  margin: 0 0 16px;
  text-align: center;
}

.customer-booking-section {
  min-height: 0;
}

.form-card p {
  color: var(--muted);
  text-align: center;
}

.form-card label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 800;
}

.form-card input,
.form-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
}

.form-card .password-input-wrap { position: relative; width: 100%; }
.form-card .password-input-wrap input { width: 100%; margin: 0; padding-right: 46px; }
.form-card .toggle-password {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 6px;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  cursor: pointer;
}
.form-card .toggle-password svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.form-card .toggle-password:hover { background: rgba(15, 23, 42, .08); }
.form-card .toggle-password:focus-visible { outline: 2px solid #38bdf8; outline-offset: 1px; }

.form-card .btn {
  margin-top: 18px;
}

.form-card.auth-card .btn {
  margin-top: 6px;
}

.otp-resend {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.otp-resend:disabled {
  cursor: wait;
  opacity: 0.65;
}

.otp-card #otpCode {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.35em;
}

.otp-message {
  display: block;
  min-height: 1.4em;
  margin-top: 10px;
  color: var(--muted);
  text-align: center;
}

.otp-message.error { color: var(--red); }
.otp-card .otp-resend { display: block; margin: 18px auto 0; color: var(--blue-dark); }
.otp-card .create-account-link { display: block; margin-top: 18px; text-align: center; }
.invoice-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #d1d5db;
  padding: 12px 0;
}

.invoice-row strong { flex: 1 1 180px; }
.invoice-row .btn { margin-left: auto; }

.customer-bills .form-card { width: min(860px, 100%); }
.running-bills-container { max-height: 420px; overflow-y: auto; padding-right: 8px; }
.running-bill { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 14px 20px; padding: 20px 0; }
.bill-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; grid-column: 1 / -1; }
.bill-status { color: var(--muted); text-transform: capitalize; }
.bill-lines { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; }
.bill-lines li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.bill-lines li span { color: var(--muted); text-align: right; }
.bill-totals { display: grid; grid-template-columns: 1fr auto; gap: 7px 18px; grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); }
.bill-totals strong { text-align: right; }
.bill-add-service { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 12px; grid-column: 1 / -1; }
.bill-add-service label { grid-column: 1 / -1; margin: 0; font-weight: 700; }
.bill-add-service select { min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
.bill-add-service .btn, .running-bill > .btn { margin: 0; }
.availability-notice { color: #9a3412; font-weight: 700; text-align: left !important; }

/* Registration terms modal: Bootstrap-compatible markup with local behavior. */
.toc-modal-open { overflow: hidden; }
#tocModal { position: fixed; inset: 0; z-index: 1055; display: none; overflow-x: hidden; overflow-y: auto; background: rgba(4, 9, 24, .72); padding: 24px; }
#tocModal.show { display: block; }
#tocModal .modal-dialog { width: min(800px, 100%); min-height: calc(100% - 48px); margin: 0 auto; display: flex; align-items: center; }
#tocModal .toc-modal-content { width: 100%; max-height: calc(100vh - 48px); overflow: hidden; padding: 24px; background: #0b1329; border: 1px solid rgba(56, 189, 248, .25); border-radius: 20px; color: #fff; box-shadow: 0 24px 80px rgba(0, 0, 0, .4); }
#tocModal .modal-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; }
#tocModal .modal-title { margin: 0; color: #fff; font-size: 1.5rem; }
#tocModal .toc-modal-close { border: 0; background: transparent; color: #cbd5e1; font-size: 2rem; line-height: 1; cursor: pointer; }
#tocModal .modal-body { overflow-y: auto; }
#tocContainer { max-height: min(320px, 42vh); overflow-y: auto; padding: 16px 20px 16px 16px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; color: rgba(255, 255, 255, .82); font-size: .9rem; line-height: 1.55; }
#tocContainer h3 { margin: 4px 0 6px; color: #fff; font-size: 1rem; }
#tocContainer p { margin: 0 0 12px; color: inherit; text-align: left; }
#tocContainer ul { padding-left: 22px; }
.toc-controls { display: flex; flex-direction: column; gap: 18px; margin-top: 20px; }
.toc-controls .form-check { display: grid; grid-template-columns: 20px 1fr; gap: 4px 9px; align-items: center; }
#tocCheckbox { width: 18px; height: 18px; margin: 0; accent-color: #38bdf8; }
#tocCheckbox:disabled { cursor: not-allowed; opacity: .6; }
#tocCheckbox:not(:disabled) { cursor: pointer; opacity: 1; }
.toc-controls .form-check-label { color: #fff; }
#toc-scroll-hint { grid-column: 2; color: #facc15; font-size: .8rem; }
.toc-actions { display: flex; justify-content: flex-end; }
#tocSubmitBtn { padding: 10px 20px; border: 0; border-radius: 8px; background: #38bdf8; color: #0b1329; font-weight: 700; cursor: pointer; }
#tocSubmitBtn:disabled { cursor: not-allowed; opacity: .5; }
@media (max-width: 560px) {
  #tocModal { padding: 12px; }
  #tocModal .modal-dialog { min-height: calc(100% - 24px); }
  #tocModal .toc-modal-content { max-height: calc(100vh - 24px); padding: 18px; }
  #tocContainer { max-height: 40vh; }
}
@media (max-width: 560px) {
  .running-bill { grid-template-columns: 1fr; }
  .bill-add-service { grid-template-columns: 1fr; }
  .bill-lines li { align-items: start; }
}
