/* BenchBaze authentication theme inspired by PrimeVue Sakai */
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  src:
    local("Lato"),
    url("/static/authentication/Lato-Regular.woff") format("woff");
}

:root {
  --bb-surface: rgba(255, 255, 255, 0.86);
  --bb-surface-strong: #ffffff;
  --bb-panel: #0a6d87;
  --bb-text: #1b2a41;
  --bb-muted: #5f6f89;
  --bb-primary: #0c8e7a;
  --bb-primary-dark: #0a7666;
  --bb-border: #d7e2f1;
  --bb-danger-bg: #fff2f2;
  --bb-danger-border: #ffc7c7;
  --bb-danger-text: #a43535;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Lato", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--bb-text);
  background: lightgrey;
}

.bb-auth-page {
  display: block;
  padding: 24px 14px 74px;
}

.bb-auth-shell {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bb-surface);
  backdrop-filter: blur(7px);
}

.bb-auth-brand-panel {
  padding: 32px 28px;
  background: var(--bb-panel);
  color: #f5fdff;
  position: relative;
  isolation: isolate;
}

.bb-auth-brand-panel::before {
  content: none;
}

.bb-auth-branding {
  max-width: 360px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 18px;
  row-gap: 0;
  align-items: center;
}

.bb-auth-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-row: 1 / span 2;
  width: 96px;
  height: 96px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
}

.bb-authentication-box-logo {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.bb-authentication-box-title {
  margin: 0;
  letter-spacing: 0.07em;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1.08;
  align-self: end;
}

.bb-authentication-box-coloured-title {
  color: #2faf7f;
}

.bb-auth-brand-subtitle {
  margin: 12px 0 22px;
  max-width: 28ch;
  color: rgba(244, 252, 255, 0.9);
  line-height: 1.56;
}

.bb-authentication-box-lab-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  align-self: start;
}

#authentication-box {
  width: 100%;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 253, 255, 0.94);
}

.bb-auth-card {
  width: 100%;
  max-width: 100%;
  padding: 24px;
  border-radius: 16px;
  background: var(--bb-surface-strong);
  border: 1px solid var(--bb-border);
}

.bb-auth-card-header {
  margin-bottom: 22px;
}

.bb-auth-card-header h3 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.bb-auth-card-header p {
  margin: 8px 0 0;
  color: var(--bb-muted);
}

.bb-auth-form {
  display: grid;
  gap: 10px;
}

.bb-auth-form-toggle {
  margin: 0 0 14px;
}

.bb-auth-form-panel {
  overflow: hidden;
  max-height: 420px;
  opacity: 1;
  transition:
    max-height 0.3s ease,
    opacity 0.25s ease,
    margin 0.25s ease;
}

.bb-auth-form-panel.is-collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.bb-auth-form label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #38465e;
}

.form-control {
  width: 100%;
  border: 1px solid var(--bb-border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--bb-text);
  padding: 11px 13px;
  font-size: 0.97rem;
}

.form-control::placeholder {
  color: #93a2b9;
}

.form-control:focus {
  outline: none;
  border-color: #5aacef;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 12px 14px;
  text-align: center;
  text-decoration: none;
}

.btn-block {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary,
.bb-authentication-box-logout-button {
  color: #ffffff;
  background-color: var(--bb-primary);
  border-color: var(--bb-primary);
}

.btn-primary:hover,
.btn-primary:focus-visible,
.bb-authentication-box-logout-button:hover,
.bb-authentication-box-logout-button:focus-visible {
  background-color: var(--bb-primary-dark);
  border-color: var(--bb-primary-dark);
}

.btn-default {
  color: #16304f;
  background: #f4f8ff;
  border-color: #d2e1f5;
}

.btn-default:hover,
.btn-default:focus-visible {
  background: #cdd6e2;
}

.bb-auth-sso-btn {
  margin-bottom: 16px;
  justify-content: flex-start;
}

.bb-authentication-box-oidc-logo,
.bb-authentication-box-local-login {
  width: 34px;
  border-radius: 9px;
}

.bb-auth-divider {
  position: relative;
  text-align: center;
  margin: 8px 0 18px;
}

.bb-auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid var(--bb-border);
}

.bb-auth-divider span {
  position: relative;
  z-index: 1;
  background: #ffffff;
  color: #70809a;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0 12px;
}

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
}

.alert p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.alert p + p {
  margin-top: 6px;
}

.alert-danger {
  color: var(--bb-danger-text);
  background-color: var(--bb-danger-bg);
  border-color: var(--bb-danger-border);
}

.text-center {
  text-align: center;
}

.footer {
  position: static;
  margin-top: 18px;
  display: flex;
  gap: 14px;
  justify-content: center;
}

.footer a {
  color: rgba(44, 72, 114, 0.75);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
}

.footer a:hover,
.footer a:focus-visible {
  color: rgba(17, 43, 81, 1);
  text-decoration: underline;
}

.bb-authentication-box {
  opacity: 1;
}

.bb-full-opacity {
  opacity: 1;
}

@media (min-width: 768px) {
  .bb-auth-shell {
    max-width: 450px;
  }
}

@media (max-width: 960px) {
  /* Mobile baseline now applies globally; keep this block for future small-screen tweaks. */
}

@media (max-width: 480px) {
  .bb-auth-brand-subtitle {
    margin-bottom: 16px;
  }
}
