/* SEDTRACKER Online — login screen */

.auth-shell {
  min-height: 100vh; /* fallback for browsers without dvh */
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(79, 176, 220, 0.18), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(47, 131, 177, 0.22), transparent 45%),
    linear-gradient(to bottom, var(--bg-top), var(--bg-bottom));
}

.auth-card {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--outline-soft);
  border-radius: 20px;
  /* Solid fallback first; color-mix used when supported (Safari 15.4+) */
  background: linear-gradient(to bottom, rgba(14, 34, 68, 0.94), rgba(6, 16, 34, 0.96));
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--panel-bg) 100%, white 4%),
    color-mix(in srgb, var(--panel-bg) 76%, black 24%)
  );
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.auth-card-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.auth-card-copy {
  display: grid;
  gap: 8px;
  flex: 1;
}

.auth-card-copy h1 {
  font-size: 32px;
  line-height: 1;
}

.auth-card-copy p {
  color: var(--text-secondary);
  line-height: 1.5;
}

.auth-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--text-secondary);
}

.auth-brand-mark {
  width: 84px;
  max-width: 24%;
  flex: 0 0 auto;
  margin-top: 4px;
  filter: drop-shadow(0 6px 16px rgba(27, 93, 184, 0.16));
}

.auth-brand-mark img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  object-fit: contain;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--outline-soft);
  background: linear-gradient(to bottom, rgba(11, 31, 63, 0.96), rgba(6, 18, 38, 0.98));
  background: linear-gradient(
    to bottom,
    var(--search-bg),
    color-mix(in srgb, var(--search-bg) 78%, black 22%)
  );
  color: var(--text-main);
  outline: none;
}

.auth-field input:focus {
  border-color: rgba(89, 183, 222, 0.7);
  box-shadow: 0 0 0 1px rgba(89, 183, 222, 0.35);
}

.auth-field input::placeholder {
  color: var(--text-secondary);
}

.auth-tip {
  min-height: 18px;
  font-size: 12px;
  color: var(--text-secondary);
}

.auth-tip.is-error {
  color: var(--danger);
}

body.session-checking .auth-submit-btn,
body.session-checking .auth-link-btn {
  pointer-events: none;
  opacity: 0.65;
}

body.session-checking #client-portal-shell {
  display: none !important;
}

.auth-submit-btn {
  width: 100%;
  min-height: 44px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(to bottom, var(--accent-mid), var(--accent-deep));
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.auth-submit-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.auth-submit-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-link-btn {
  flex: 1 1 180px;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--outline-soft);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  cursor: pointer;
}

.auth-link-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

@media (max-width: 560px) {
  .auth-card-hero {
    gap: 12px;
  }

  .auth-brand-mark {
    width: 64px;
  }
}
