#bf-portal { max-width: 720px; }
#bf-portal .form-control, #bf-portal .form-select { margin-bottom: .6rem; }
.bf-portal-head { display: flex; justify-content: space-between; align-items: center; }
/* legacy tab styles kept for any residual references */
.bf-tabs { display: flex; gap: .5rem; margin: .5rem 0 1rem; }
.bf-tab { border: 1px solid #e5e7eb; background: #fff; padding: .4rem .9rem; border-radius: 4px; cursor: pointer; }
.bf-tab.is-active { background: #f0c000; border-color: #f0c000; font-weight: 700; }
.bf-hp { position: absolute; left: -9999px; }

/* --- Auth card (logged-out view) --- */
.bf-auth-card {
  max-width: 440px;
  margin: 2rem auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
  padding: 2rem 2.25rem 2.25rem;
}
.bf-auth-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: .75rem;
  color: #111;
}
.bf-auth-intro {
  font-size: .92rem;
  color: #6b7280;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}
.bf-auth-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: .35rem;
}
.bf-auth-input.form-control {
  font-size: 1rem;
  padding: .65rem .9rem;
  border-radius: 8px;
  border: 1.5px solid #d1d5db;
  width: 100%;
  margin-bottom: 1rem;
  transition: border-color .15s ease;
}
.bf-auth-input.form-control:focus {
  border-color: #f0c000;
  box-shadow: 0 0 0 3px rgba(240, 192, 0, .2);
  outline: none;
}
.bf-auth-input--code.form-control {
  letter-spacing: .3em;
  font-size: 1.3rem;
  text-align: center;
}
.bf-auth-btn.btn {
  width: 100%;
  padding: .7rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  background: #f0c000;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
}
.bf-auth-btn.btn:hover,
.bf-auth-btn.btn:focus {
  background: #d4a900;
  color: #111;
}
.bf-auth-back.btn-link {
  display: block;
  margin-top: .6rem;
  text-align: center;
  width: 100%;
  font-size: .875rem;
  color: #6b7280;
}
.bf-auth-back.btn-link:hover { color: #374151; text-decoration: underline; }
@media (max-width: 480px) {
  .bf-auth-card { padding: 1.25rem 1.1rem 1.5rem; margin: 1rem auto; }
}
.bf-note { padding: .6rem .9rem; border-radius: 4px; margin: .5rem 0; }
.bf-note--success { background: #e7f6ec; color: #14532d; }
.bf-note--error { background: #fdecec; color: #7f1d1d; }
.bf-note--info { background: #eef2ff; color: #1e3a8a; }
.bf-booking-box { border: 1px solid #f0c000; border-radius: 8px; padding: 1rem; margin: 1rem 0; }
.bf-bookings { list-style: none; padding: 0; }
.bf-bookings li { border: 1px solid #e5e7eb; border-radius: 8px; padding: .75rem 1rem; margin-bottom: .6rem; }
.bf-bk-addr { color: #6b7280; font-size: .9rem; }
.bf-profile { border: 1px solid #e5e7eb; border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
/* Profile form — labeled, structured, mobile-first */
.bf-profile-form {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.bf-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.bf-field label,
.bf-profile-form > .bf-field > label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: #374151;
}
.bf-field .form-control {
  width: 100%;
  margin-bottom: 0;
}
.bf-help {
  font-size: .8rem;
  color: #6b7280;
  line-height: 1.45;
  display: block;
}
.bf-profiles-intro {
  margin-bottom: .75rem;
}
.bf-consents {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: .9rem 1rem;
  margin: 0;
}
.bf-consents legend {
  font-size: .875rem;
  font-weight: 700;
  color: #374151;
  padding: 0 .35rem;
  float: none;
  width: auto;
}
.bf-check {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-top: .65rem;
}
.bf-check input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: .2rem;
  width: 1.1em;
  height: 1.1em;
  accent-color: #f0c000;
  cursor: pointer;
}
.bf-check label {
  font-size: .875rem;
  color: #374151;
  line-height: 1.5;
  cursor: pointer;
}
.bf-check label a {
  color: #374151;
  text-decoration: underline;
}
.bf-guardian {
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  padding: .75rem .9rem;
  margin: .75rem 0 .25rem;
  background: #fafafa;
}
.bf-guardian legend {
  font-size: .82rem;
  font-weight: 600;
  color: #6b7280;
  padding: 0 .3rem;
  float: none;
  width: auto;
}
.bf-profile-save.btn {
  width: 100%;
  min-height: 44px;
  font-weight: 700;
  font-size: 1rem;
  color: #111;
  background: #f0c000;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
  margin-top: .25rem;
}
.bf-profile-save.btn:hover,
.bf-profile-save.btn:focus {
  background: #d4a900;
  color: #111;
}
@media (min-width: 480px) {
  .bf-profile-save.btn {
    width: auto;
    min-width: 180px;
  }
}
.bf-logout { font-size: .9rem; }
.bf-pupil-status { font-size: .9rem; }
.bf-pupil-status .bf-status-logout { font-weight: 600; }
.bf-ident { margin-bottom: 1rem; }
.bf-ident label { display:block; font-size:.85rem; color:#6b7280; margin-bottom:.2rem; }

.bf-auth-privacy { font-size: .82rem; color: #6b7280; line-height: 1.5; margin-top: 1rem; }
.bf-auth-privacy a { color: inherit; text-decoration: underline; }
.bf-link-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.bf-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.bf-modal[hidden] { display: none; }
.bf-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.bf-modal__box { position: relative; background: #fff; border-radius: 8px; padding: 1.25rem; max-width: 460px; width: 100%; max-height: 85vh; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.bf-modal__box h3 { margin-top: 0; }

/* Embedded login/booking widget on a company page (mobile-first) */
.bf-embed { display: flex; flex-direction: column; gap: .75rem; }
.bf-embed-ident { font-size: .9rem; color: #555; margin: 0; }
.bf-embed-hint { margin: 0; }
.bf-embed-bookform { display: flex; flex-direction: column; gap: .6rem; }
.bf-embed-submit { width: 100%; min-height: 48px; font-weight: 600; }
.bf-embed-manage { margin: .25rem 0 0; font-size: .9rem; }
@media (min-width: 480px) {
  .bf-embed-bookform { flex-direction: row; align-items: center; }
  .bf-embed-submit { width: auto; }
}

