.booking-field {
  align-self: start;
  grid-template-rows: auto 48px auto;
}

.brand,
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.login-brand {
  margin: 4px 0 12px;
}

.login-brand img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.brand h1,
.login-brand h1 {
  color: var(--navy);
  font-family: "Avenir Next", "Segoe UI", Inter, system-ui, sans-serif;
  font-weight: 850;
  letter-spacing: -.045em;
  line-height: .95;
}

.brand h1 {
  font-size: 38px;
}

.login-brand h1 {
  font-size: 46px;
}

.auth-card {
  display: grid;
  gap: 14px;
}

.auth-card > * {
  margin-top: 0;
  margin-bottom: 0;
}

.auth-card > button {
  justify-self: start;
  margin-top: 2px;
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.language-picker {
  display: flex;
  align-items: center;
  grid-template-columns: auto auto;
  gap: 8px;
  white-space: nowrap;
}

.language-picker span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.language-picker select {
  width: auto;
  min-height: 38px;
  padding-right: 30px;
}

.language-picker.compact span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

#booking-view h2 {
  font-family: "Avenir Next", "Segoe UI", Inter, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.025em;
}

.job-run {
  display: grid;
  gap: 4px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.settings-page {
  width: min(820px, 100%);
  margin: 0 auto;
}

.settings-tabs {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  padding-bottom: 10px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.settings-tabs button {
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.settings-tabs button.active {
  border-color: #bfd5f3;
  background: #eaf3ff;
  color: var(--blue);
}

.settings-content {
  min-height: 300px;
}

.settings-content .settings-panel {
  max-width: 600px;
  padding: 0;
  border: 0;
  background: transparent;
}

.settings-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
}

.settings-panel h3,
.settings-panel p {
  margin: 0;
}

.full-settings {
  grid-column: 1 / -1;
}

.wide-dialog {
  width: min(900px, calc(100% - 32px));
}

.header-icon,
.status-icon {
  width: 42px;
  min-width: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.header-icon {
  font-size: 20px;
}

.status-icon {
  display: grid;
  background: #fff;
  place-items: center;
}

.status-icon span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #9aa8ba;
  box-shadow: 0 0 0 4px #9aa8ba22;
}

.status-icon.is-connected span {
  background: #1c9b62;
  box-shadow: 0 0 0 4px #1c9b6222;
}

.status-icon.is-disconnected span {
  background: #cc3f4b;
  box-shadow: 0 0 0 4px #cc3f4b22;
}

.booking-field > .time-row {
  height: 48px;
}

.time-row select {
  flex: 1;
  min-width: 0;
  height: 48px;
}

.time-row span {
  flex: 0 0 auto;
}

.admin-user {
  border: 1px solid var(--line);
  border-radius: 15px;
}

.user-summary {
  display: grid;
  grid-template-columns: 1.3fr .9fr .9fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}

.user-summary small {
  display: block;
  margin-top: 3px;
}

.user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.account-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  box-shadow: 0 24px 80px #071b3855;
}

.account-dialog::backdrop {
  background: #071b3899;
  backdrop-filter: blur(3px);
}

.dialog-form {
  display: grid;
  gap: 22px;
  padding: 28px;
}

.dialog-form fieldset {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.icon-button {
  width: 42px;
  padding: 0;
  font-size: 24px;
}

.password-reset {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f5f9ff;
}

.password-reset p {
  margin: 4px 0 0;
}

.temporary-password {
  display: flex;
  grid-column: 1 / -1;
  align-items: end;
  gap: 10px;
}

.temporary-password label {
  flex: 1;
}

.permissions-form {
  display: grid;
  gap: 14px;
  padding: 0 20px 20px;
}

.permissions-form fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
}

.course-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.select-all {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 760px) {
  .auth-top { align-items: flex-start; flex-direction: column; }
  .header-actions { flex-wrap: wrap; }
  .settings-grid { grid-template-columns: 1fr; }
  .user-summary { grid-template-columns: 1fr; }
  .password-reset { grid-template-columns: 1fr; }
  .temporary-password { grid-column: 1; }
  .full-settings { grid-column: 1; }
}
