:root {
  --entry-bg: #f4f6f8;
  --entry-surface: #ffffff;
  --entry-surface-muted: #f7f9fb;
  --entry-line: #d9e0e7;
  --entry-ink: #172230;
  --entry-muted: #647184;
  --entry-blue: #2f67c8;
  --entry-blue-soft: #eaf1fc;
  --entry-orange: #b9652c;
  --entry-green: #26745d;
}

body.entry-page,
body.auth-page {
  min-width: 320px;
  color: var(--entry-ink);
  background: var(--entry-bg);
}

.entry-shell {
  width: min(1180px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: 28px 24px 34px;
  display: grid;
  align-content: start;
  gap: 20px;
}

.entry-hero {
  min-height: 360px;
  padding: 32px;
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(15, 28, 44, .94) 0, rgba(15, 28, 44, .64) 52%, rgba(15, 28, 44, .2) 100%),
    url("/assets/tabito-campus.jpg") center 35% / cover;
  box-shadow: 0 18px 44px rgba(23, 34, 48, .16);
}

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

.entry-brand-logo,
.login-brand-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, .94);
}

.entry-brand strong,
.entry-brand span,
.login-brand strong,
.login-brand span {
  display: block;
}

.entry-brand strong {
  color: #fff;
  font-size: 15px;
}

.entry-brand span {
  margin-top: 2px;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
}

.entry-hero-copy {
  align-self: end;
  max-width: 720px;
}

.entry-kicker {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 800;
}

.entry-hero h1 {
  margin: 0;
  color: #fff;
  font-size: 52px;
  line-height: 1.02;
  letter-spacing: 0;
}

.entry-hero-copy > p:last-child {
  max-width: 650px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, .84);
  font-size: 16px;
  line-height: 1.65;
}

.entry-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.entry-hero-actions .primary,
.entry-hero-actions .secondary {
  min-width: 148px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 6px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
}

.entry-hero-actions .primary {
  color: var(--entry-ink);
  border-color: #fff;
  background: #fff;
}

.entry-hero-actions .secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .14);
}

.entry-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.entry-role-card {
  min-height: 178px;
  padding: 19px;
  border: 1px solid var(--entry-line);
  border-top: 3px solid var(--entry-blue);
  border-radius: 8px;
  display: grid;
  align-content: start;
  gap: 9px;
  color: var(--entry-ink);
  background: var(--entry-surface);
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(23, 34, 48, .05);
}

.entry-role-card[data-entry-role="teacher"] {
  border-top-color: var(--entry-orange);
}

.entry-role-card[data-entry-role="admin"] {
  border-top-color: var(--entry-green);
}

.entry-role-card:hover {
  border-right-color: #b9c5d1;
  border-bottom-color: #b9c5d1;
  border-left-color: #b9c5d1;
  box-shadow: 0 12px 28px rgba(23, 34, 48, .09);
  transform: translateY(-1px);
}

.entry-role-kind {
  color: var(--entry-blue);
  font-size: 12px;
  font-weight: 900;
}

[data-entry-role="teacher"] .entry-role-kind {
  color: var(--entry-orange);
}

[data-entry-role="admin"] .entry-role-kind {
  color: var(--entry-green);
}

.entry-role-card strong {
  font-size: 19px;
  line-height: 1.3;
}

.entry-role-card p {
  margin: 0;
  color: var(--entry-muted);
  font-size: 13px;
  line-height: 1.55;
}

.entry-role-action {
  align-self: end;
  margin-top: auto;
  color: var(--entry-ink);
  font-size: 13px;
  font-weight: 850;
}

.entry-footer {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--entry-muted);
  font-size: 12px;
}

.entry-footer a {
  color: var(--entry-blue);
  font-weight: 800;
}

.auth-page .login-shell {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding: 24px;
  display: grid;
  place-items: center;
  background: url("/assets/tabito-campus.jpg") center / cover;
}

.auth-page .login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(239, 243, 247, .88);
}

.auth-page .login-panel {
  width: min(470px, 100%);
  padding: 24px;
  border: 1px solid rgba(206, 216, 226, .96);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  background: var(--entry-surface);
  box-shadow: 0 22px 58px rgba(23, 34, 48, .18);
}

.auth-page .back-link {
  width: fit-content;
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 6px;
  box-shadow: none;
  font-size: 13px;
}

.login-brand-logo {
  width: 56px;
  height: 56px;
  border: 1px solid #e5ebf1;
}

.login-brand-copy {
  min-width: 0;
}

.login-audience {
  margin-bottom: 2px;
  color: var(--entry-blue);
  font-size: 11px;
  font-weight: 900;
}

.login-brand strong {
  color: var(--entry-ink);
  font-size: 20px;
  line-height: 1.3;
}

.login-description {
  margin: 4px 0 0;
  color: var(--entry-muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-page .auth-mode-tabs {
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--entry-line);
  border-radius: 7px;
  background: #edf1f5;
}

.auth-page .auth-mode-tab {
  min-height: 40px;
  border: 0;
  border-radius: 5px;
  color: var(--entry-muted);
  background: transparent;
  box-shadow: none;
}

.auth-page .auth-mode-tab[aria-selected="true"] {
  color: var(--entry-ink);
  background: #fff;
  box-shadow: 0 1px 3px rgba(23, 34, 48, .1);
}

.auth-page .login-form {
  gap: 13px;
}

.auth-page .login-form label {
  gap: 6px;
  color: #445263;
  font-size: 12px;
}

.auth-page .login-form input:not([type="checkbox"]) {
  min-height: 44px;
  border-color: var(--entry-line);
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--entry-ink);
  background: #fff;
}

.input-with-action {
  position: relative;
  display: block;
}

.auth-page .input-with-action input {
  padding-right: 68px !important;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  min-width: 54px;
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  color: var(--entry-blue);
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: var(--entry-blue-soft);
}

.auth-register-intro,
.field-hint,
.auth-hint {
  margin: 0;
  color: var(--entry-muted);
  font-size: 12px;
  line-height: 1.55;
}

.auth-register-intro {
  padding-bottom: 10px;
  border-bottom: 1px solid #e8edf2;
}

.auth-page .register-fields {
  gap: 13px;
}

.auth-page .consent-line {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.auth-page .consent-line input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.auth-page .login-form .primary {
  width: 100%;
  min-height: 46px;
  border-radius: 6px;
  color: #fff;
  background: var(--entry-blue);
  box-shadow: none;
}

.auth-page .login-form .primary:hover {
  background: #285bb4;
}

.auth-message {
  padding: 10px 11px;
  border: 1px solid #efc4c1;
  border-radius: 6px;
  color: #8d2f2a;
  background: #fff7f6;
  font-size: 12px;
  line-height: 1.5;
}

.auth-message[data-tone="info"] {
  border-color: #c7d8ef;
  color: #285793;
  background: #f4f8fd;
}

.auth-message[hidden],
.field-hint[hidden] {
  display: none;
}

.auth-page .auth-hint {
  text-align: center;
}

.auth-page .legal-links {
  padding-top: 2px;
  border-top: 1px solid #edf1f4;
}

.auth-page .legal-links a {
  color: var(--entry-blue);
}

@media (max-width: 760px) {
  .entry-shell {
    padding: 12px;
    gap: 12px;
  }

  .entry-hero {
    min-height: 390px;
    padding: 22px;
    background:
      linear-gradient(180deg, rgba(15, 28, 44, .9) 0, rgba(15, 28, 44, .68) 62%, rgba(15, 28, 44, .34) 100%),
      url("/assets/tabito-campus.jpg") center / cover;
  }

  .entry-brand-logo {
    width: 48px;
    height: 48px;
  }

  .entry-hero h1 {
    font-size: 40px;
  }

  .entry-hero-copy > p:last-child {
    font-size: 14px;
  }

  .entry-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .entry-role-grid {
    grid-template-columns: 1fr;
  }

  .entry-role-card {
    min-height: 152px;
    padding: 17px;
  }

  .entry-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 4px 2px;
  }

  .auth-page .login-shell {
    min-height: 100svh;
    padding: 12px;
    place-items: start center;
  }

  .auth-page .login-panel {
    margin-top: max(12px, env(safe-area-inset-top));
    padding: 18px;
    gap: 15px;
  }

  .login-brand-logo {
    width: 50px;
    height: 50px;
  }

  .login-brand strong {
    font-size: 18px;
  }
}
