:root {
  --identity-shell: #f6f8fc;
  --identity-card: rgba(254, 252, 245, 1);
  --identity-copy: #6b7280;
  --identity-heading: #111827;
  --identity-border: #d9dee8;
  --identity-border-strong: #cfd6e2;
  --identity-accent: #f2b400;
  --identity-accent-dark: #e0a700;
  --identity-danger: #dc2626;
  --identity-danger-bg: #fef2f2;
  --identity-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.identity-shell {
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--identity-copy);
  background: var(--identity-shell) url("/images/beesmart-login-bg.jpg") center center / cover no-repeat fixed;
}

body.identity-shell--biebprinten {
  --identity-card: rgba(255, 249, 240, 0.98);
  --identity-border: #eadfcd;
  --identity-border-strong: #e2d0b2;
  --identity-accent: #ef8f00;
  --identity-accent-dark: #d97706;
  --identity-shadow: 0 26px 54px rgba(15, 23, 42, 0.22);
  background:
    linear-gradient(160deg, rgba(17, 52, 111, 0.78) 0%, rgba(19, 86, 153, 0.7) 50%, rgba(17, 43, 92, 0.82) 100%),
    var(--identity-shell) url("/images/beesmart-login-bg.jpg") center center / cover no-repeat fixed;
}

body.identity-shell--biebprinten-v2 {
  --identity-card: rgba(245, 253, 251, 0.98);
  --identity-border: #bfe1da;
  --identity-border-strong: #9fd0c5;
  --identity-accent: #14b8a6;
  --identity-accent-dark: #0f766e;
  --identity-shadow: 0 26px 54px rgba(3, 37, 46, 0.26);
  background:
    linear-gradient(145deg, rgba(6, 78, 59, 0.78) 0%, rgba(15, 118, 110, 0.74) 48%, rgba(8, 47, 73, 0.84) 100%),
    var(--identity-shell) url("/images/beesmart-login-bg.jpg") center center / cover no-repeat fixed;
}

.identity-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.identity-card {
  width: min(100%, 30rem);
  padding: 1.95rem 2.15rem 1.95rem;
  border-radius: 1rem;
  background: var(--identity-card);
  box-shadow: var(--identity-shadow);
}

.identity-card--login {
  position: relative;
}

.identity-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.identity-brand--compact {
  margin-bottom: 1.25rem;
}

.identity-brand--login {
  gap: 0.35rem;
  margin-bottom: 1.95rem;
}

.identity-brand__logo {
  width: 18.8rem;
  max-width: 100%;
  margin-top: 0.8rem;
  margin-bottom: 0.55rem;
}

.identity-brand__eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--identity-accent-dark);
}

.identity-brand h1 {
  margin: 0.35rem 0 0;
  font-size: 1.34rem;
  font-weight: 700;
  color: var(--identity-heading);
}

.identity-brand__copy {
  margin: 0.55rem 0 0;
  font-size: 1.03rem;
  line-height: 1.4;
}

.identity-language-form {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.35rem;
}

.identity-language-select {
  min-width: 8.4rem;
  padding: 0.48rem 2rem 0.48rem 0.9rem;
  border: 1px solid #dfe4ec;
  border-radius: 0.6rem;
  background-color: #ffffff;
  color: #111827;
  font-size: 0.95rem;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #9ca3af 50%),
    linear-gradient(135deg, #9ca3af 50%, transparent 50%);
  background-position:
    calc(100% - 14px) calc(50% - 2px),
    calc(100% - 9px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.identity-method-selector {
  display: grid;
  gap: 1rem;
}

.identity-panel-header__body {
  display: grid;
  gap: 0.35rem;
}

.identity-panel-header__body h2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--identity-heading);
}

.identity-panel-header__body p:not(.identity-panel-header__eyebrow) {
  margin: 0;
  color: var(--identity-copy);
  line-height: 1.45;
}

.identity-method-list {
  display: grid;
  gap: 0.85rem;
}

.identity-button__method-label {
  display: block;
  width: 100%;
  font-size: 1rem;
  font-weight: 700;
  color: var(--identity-heading);
  text-align: center;
}

.identity-button--method-choice {
  min-height: 3.35rem;
  padding: 0.9rem 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.identity-panel-header {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.15rem;
}

.identity-panel-back {
  display: inline-flex;
  align-items: center;
  align-self: start;
  color: var(--identity-accent-dark);
  font-size: 0.93rem;
  font-weight: 700;
  text-decoration: none;
}

.identity-panel-back:hover {
  color: var(--identity-accent);
  text-decoration: underline;
}

.identity-alert {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 1.1rem;
  padding: 0.8rem 0.9rem 0.8rem 1rem;
  border-left: 4px solid var(--identity-danger);
  border-radius: 0.75rem;
  background: var(--identity-danger-bg);
  color: #991b1b;
}

.identity-validation-summary {
  margin-bottom: 1rem;
  color: #b91c1c;
}

.identity-validation-summary:empty {
  display: none;
}

.identity-login-form,
.identity-actions {
  display: grid;
  gap: 1rem;
}

.identity-session-details {
  display: grid;
  gap: 0.75rem;
  margin: 1.35rem 0 0;
}

.identity-session-details > div {
  display: grid;
  gap: 0.22rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--identity-border);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.72);
}

.identity-session-details dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--identity-copy-muted);
}

.identity-session-details dd {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--identity-heading);
}

.identity-login-form__fields,
.identity-form {
  display: grid;
  gap: 0.85rem;
}

.identity-form-field {
  display: grid;
  gap: 0.35rem;
}

.identity-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.identity-input-wrap {
  position: relative;
}

.identity-form input,
.identity-form-field input {
  width: 100%;
  min-height: 3.05rem;
  padding: 0.88rem 3rem 0.88rem 1rem;
  border: 1px solid var(--identity-border);
  border-radius: 0.6rem;
  font-size: 0.98rem;
  color: var(--identity-heading);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.identity-form input::placeholder,
.identity-form-field input::placeholder {
  color: #8a94a6;
}

.identity-form input:focus,
.identity-form-field input:focus {
  outline: none;
  border-color: var(--identity-accent);
  box-shadow: 0 0 0 3px rgba(242, 180, 0, 0.14);
}

.identity-input-icon {
  position: absolute;
  top: 50%;
  right: 0.78rem;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: -0.575rem;
  border-radius: 0.28rem;
  background: #d1d5db;
  color: #ffffff;
  font-size: 0.72rem;
  line-height: 1.15rem;
  text-align: center;
  pointer-events: none;
  font-weight: 700;
}

.identity-validation {
  font-size: 0.82rem;
  color: #b91c1c;
}

.identity-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 3.05rem;
  padding: 0.88rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.6rem;
  background: transparent;
  color: var(--identity-heading);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.identity-button:hover {
  transform: translateY(-1px);
}

.identity-button--primary {
  color: #ffffff;
  background: var(--identity-accent);
  box-shadow: 0 10px 22px rgba(242, 180, 0, 0.24);
}

.identity-button--primary:hover {
  background: var(--identity-accent-dark);
}

.identity-button--secondary,
.identity-button--microsoft {
  background: #ffffff;
  border-color: var(--identity-border-strong);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.identity-button--secondary:hover,
.identity-button--microsoft:hover {
  background: #fbfbfd;
}

.identity-button__microsoft-mark {
  display: grid;
  grid-template-columns: repeat(2, 0.42rem);
  grid-template-rows: repeat(2, 0.42rem);
  gap: 0.08rem;
}

.identity-button__microsoft-mark span:nth-child(1) { background: #f25022; }
.identity-button__microsoft-mark span:nth-child(2) { background: #7fba00; }
.identity-button__microsoft-mark span:nth-child(3) { background: #00a4ef; }
.identity-button__microsoft-mark span:nth-child(4) { background: #ffb900; }

.identity-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1.2rem;
  color: #8b93a4;
}

.identity-divider span {
  flex: 1;
  height: 1px;
  background: #d8dde7;
}

.identity-divider strong {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.identity-divider--section {
  margin: 0 0 0.35rem;
}

.identity-divider--section strong {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--identity-accent-dark);
}

.identity-meta {
  margin: 1rem 0 0;
  text-align: center;
}

.identity-meta a {
  color: var(--identity-accent-dark);
  font-weight: 600;
}

/* ── Biebprinten: only guest two-button layout ── */

body.identity-shell--biebprinten .identity-card--biebprinten .identity-brand__copy,
body.identity-shell--biebprinten-v2 .identity-card--biebprinten .identity-brand__copy {
  color: #766556;
}

body.identity-shell--biebprinten .identity-card--biebprinten,
body.identity-shell--biebprinten-v2 .identity-card--biebprinten {
  min-height: 30rem;
}

body.identity-shell--biebprinten .identity-card--biebprinten .identity-panel-header__body p:not(.identity-panel-header__eyebrow),
body.identity-shell--biebprinten-v2 .identity-card--biebprinten .identity-panel-header__body p:not(.identity-panel-header__eyebrow) {
  color: #766556;
}

body.identity-shell--biebprinten .identity-card--biebprinten .identity-language-select,
body.identity-shell--biebprinten-v2 .identity-card--biebprinten .identity-language-select {
  border-color: #eadfcd;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.identity-shell--biebprinten .identity-card--biebprinten .identity-input-icon,
body.identity-shell--biebprinten-v2 .identity-card--biebprinten .identity-input-icon {
  background: #e6bf84;
}

body.identity-shell--biebprinten .identity-card--biebprinten .identity-button--method-choice,
body.identity-shell--biebprinten-v2 .identity-card--biebprinten .identity-button--method-choice {
  border-color: #e2d0b2;
}

body.identity-shell--biebprinten .identity-card--biebprinten .identity-button--method-choice:hover,
body.identity-shell--biebprinten-v2 .identity-card--biebprinten .identity-button--method-choice:hover {
  background: #fffaf2;
  border-color: var(--identity-accent);
}

body.identity-shell--biebprinten .identity-card--biebprinten .identity-button--secondary,
body.identity-shell--biebprinten-v2 .identity-card--biebprinten .identity-button--secondary {
  border-color: #e2d0b2;
}

body.identity-shell--biebprinten .identity-card--biebprinten .identity-button--secondary:hover,
body.identity-shell--biebprinten-v2 .identity-card--biebprinten .identity-button--secondary:hover {
  background: #fffaf2;
  border-color: var(--identity-accent);
  color: var(--identity-accent-dark);
}

.biebprinten-guest-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .identity-main {
    padding: 1rem;
  }

  .identity-card {
    width: min(100%, 26.5rem);
    padding: 1.6rem 1.35rem 1.45rem;
  }

  body.identity-shell--biebprinten .identity-card--biebprinten,
  body.identity-shell--biebprinten-v2 .identity-card--biebprinten {
    min-height: auto;
  }

  .identity-brand__logo {
    width: 15.3rem;
  }

}
