/* Auth & devices layouts — loaded as external stylesheet (CSP-friendly). */

.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font, "DM Sans", system-ui, sans-serif);
  background: #0f1419;
  color: var(--text, #121212);
}

.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  min-height: 100vh;
}

.auth-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: linear-gradient(155deg, #0f172a 0%, #1e293b 45%, #0f1419 100%);
}

.auth-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 20% 30%, rgba(211, 47, 47, 0.15), transparent 55%);
  pointer-events: none;
}

.auth-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  opacity: 0.55;
  mix-blend-mode: luminosity;
}

.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(15, 20, 25, 0.85) 0%,
    rgba(15, 20, 25, 0.35) 55%,
    transparent 95%
  );
  pointer-events: none;
}

.auth-hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(28px, 5vw, 56px);
  max-width: 420px;
}

.auth-hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.auth-hero-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--transo-red, #d32f2f);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 8px 32px rgba(211, 47, 47, 0.35);
}

.auth-hero-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 48px) clamp(20px, 4vw, 40px);
  background: var(--transo-gray-50, #fafafa);
}

.auth-panel-inner {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--border, #e0e0e0);
  box-shadow: 0 4px 40px rgba(18, 18, 18, 0.08);
}

.auth-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.auth-panel-head .auth-hero-logo {
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  box-shadow: none;
}

.auth-panel-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--transo-gray-50, #fafafa);
  border-radius: 12px;
  margin-bottom: 22px;
}

.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted, #757575);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.auth-tab:hover {
  color: var(--text, #121212);
}

.auth-tab.is-active {
  background: #fff;
  color: var(--transo-red-dark, #b71c1c);
  box-shadow: 0 1px 4px rgba(18, 18, 18, 0.06);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text, #121212);
}

.auth-field input {
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--transo-red, #d32f2f);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

.auth-hint {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--muted, #757575);
  line-height: 1.45;
}

#authSubmit {
  width: 100%;
  margin-top: 4px;
  padding: 12px 18px;
  font-size: 1rem;
}

#authErr {
  color: var(--transo-red-dark, #b71c1c);
  font-size: 0.88rem;
  margin-top: 14px;
  min-height: 1.35em;
}

@media (max-width: 900px) {
  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: 220px;
  }

  .auth-hero-img {
    object-position: center;
  }

  .auth-hero-content {
    max-width: none;
    padding-bottom: 20px;
  }

  .auth-hero-lead {
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-tab,
  .auth-field input {
    transition: none;
  }
}

.auth-split-single {
  grid-template-columns: 1fr;
}

.auth-split-single .auth-panel {
  min-height: 100vh;
}

.auth-footer-link {
  margin-top: 18px;
  font-size: 0.88rem;
}

.auth-footer-link a {
  color: var(--transo-red-dark, #b71c1c);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer-link a:hover {
  text-decoration: underline;
}

.auth-row-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 12px;
  font-size: 0.88rem;
}

.auth-row-links a {
  color: var(--transo-red-dark, #b71c1c);
  font-weight: 600;
  text-decoration: none;
}

.auth-resend-btn {
  margin-top: 8px;
}

.auth-req-mark {
  color: var(--transo-red, #d32f2f);
  font-weight: 700;
}
