/* Auth pages — sign_in / sign_up / passwords (Nina DNA) */
:root {
  --sc-navy: #002055;
  --sc-warn: #fcb92c;
  --sc-danger: #bd0811;
  --sc-auth-muted: rgba(0, 32, 85, 0.55);
  --sc-auth-border: rgba(0, 32, 85, 0.18);
  --sc-auth-radius: 0.85rem;
  --sc-auth-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.sc-auth-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sc-auth-logo img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.sc-auth {
  background: #f7f9fc;
  padding: 1.25rem 0 2.5rem;
}

.sc-auth-shell {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1.35rem 1.75rem;
  border-radius: 1.15rem;
  background: #fff;
  border: 1px solid rgba(0, 32, 85, 0.06);
  box-shadow: 0 8px 24px rgba(0, 32, 85, 0.06);
}

.sc-auth-shell.is-narrow {
  max-width: 28rem;
}

.sc-auth-title {
  margin: 0 0 0.35rem;
  color: var(--sc-navy) !important;
  font-size: clamp(1.05rem, 3.6vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.sc-auth-section {
  margin: 0 0 1rem;
  color: var(--sc-auth-muted) !important;
  font-size: 0.95rem;
  font-weight: 700;
}

.sc-auth-label,
.sc-auth .form-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--sc-navy) !important;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
}

.sc-auth-input,
.sc-auth .form-control.sc-auth-input,
.sc-auth select.sc-auth-input,
.sc-auth .form-select.sc-auth-input {
  display: block;
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 1rem !important;
  border-radius: var(--sc-auth-radius) !important;
  border: 1.5px solid var(--sc-auth-border) !important;
  background: #fff !important;
  color: var(--sc-navy) !important;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: none !important;
  transition:
    border-color 160ms ease-out,
    box-shadow 160ms ease-out;
}

.sc-auth-input::placeholder {
  color: rgba(0, 32, 85, 0.42);
}

.sc-auth-input:focus,
.sc-auth .form-control.sc-auth-input:focus,
.sc-auth select.sc-auth-input:focus {
  outline: none !important;
  border-color: rgba(252, 185, 44, 0.75) !important;
  box-shadow: 0 0 0 3px rgba(252, 185, 44, 0.22) !important;
}

.sc-auth-phone {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.sc-auth-phone .sc-auth-prefix {
  flex: 0 0 6.5rem;
  max-width: 6.5rem;
  padding-left: 0.65rem !important;
  padding-right: 0.65rem !important;
  font-weight: 700 !important;
}

.sc-auth-phone .sc-auth-input:not(.sc-auth-prefix) {
  flex: 1;
  min-width: 0;
}

.sc-auth-hint {
  display: block;
  margin-top: 0.35rem;
  color: var(--sc-auth-muted) !important;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
}

.sc-auth-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.65rem 0 0.25rem;
}

.sc-auth-check .form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  border: 1.5px solid rgba(0, 32, 85, 0.35);
  border-radius: 0.3rem;
  cursor: pointer;
}

.sc-auth-check .form-check-input:checked {
  background-color: var(--sc-navy);
  border-color: var(--sc-navy);
}

.sc-auth-check .form-check-label {
  margin: 0;
  color: var(--sc-navy) !important;
  font-size: 0.88rem;
  font-weight: 600;
}

.sc-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.sc-auth-cta,
a.sc-auth-cta,
button.sc-auth-cta,
input.sc-auth-cta {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.65rem;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  background: linear-gradient(135deg, #ffd56a 0%, #fcb92c 55%, #f0a20f 100%) !important;
  color: #fff !important;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  box-shadow:
    0 6px 16px rgba(252, 185, 44, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition:
    transform 160ms var(--sc-auth-ease),
    filter 160ms ease-out,
    box-shadow 180ms ease-out;
}

.sc-auth-cta:hover,
a.sc-auth-cta:hover,
button.sc-auth-cta:hover,
input.sc-auth-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  color: #fff !important;
  background: linear-gradient(135deg, #ffe08a 0%, #ffc94a 45%, #f5b01a 100%) !important;
  box-shadow:
    0 10px 22px rgba(252, 185, 44, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.28);
}

.sc-auth-oauth-form {
  width: 100%;
  margin: 0;
}

.sc-auth-secondary,
a.sc-auth-secondary,
button.sc-auth-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.55rem;
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid rgba(0, 32, 85, 0.28) !important;
  background: transparent !important;
  color: var(--sc-navy) !important;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background 140ms ease-out, border-color 140ms ease-out;
}

.sc-auth-secondary:hover,
a.sc-auth-secondary:hover,
button.sc-auth-secondary:hover {
  background: rgba(0, 32, 85, 0.05) !important;
  border-color: var(--sc-navy) !important;
  color: var(--sc-navy) !important;
}

.sc-auth-link {
  color: var(--sc-navy) !important;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sc-auth-link:hover {
  color: #c99212 !important;
}

.sc-auth-link.is-accent {
  color: #c99212 !important;
  font-weight: 700;
  text-decoration: none;
}

.sc-auth-link.is-accent:hover {
  color: var(--sc-navy) !important;
  text-decoration: underline;
}

.sc-auth-legal {
  display: block;
  margin-top: 0.85rem;
  color: var(--sc-auth-muted) !important;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
}

.sc-auth-legal strong {
  color: var(--sc-navy);
  font-weight: 700;
}

.sc-auth-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  color: var(--sc-auth-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.sc-auth-alert {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--sc-auth-radius);
  border: 1px solid rgba(189, 8, 17, 0.22);
  background: rgba(189, 8, 17, 0.06);
  color: var(--sc-danger);
  font-size: 0.88rem;
  font-weight: 600;
}

/* Password field + show/hide — do not rely on Bootstrap position utilities (absent on devise layout) */
.sc-auth-pass {
  position: relative;
}

.sc-auth-pass .sc-auth-input {
  padding-right: 2.75rem !important;
}

.sc-auth-toggle {
  appearance: none;
  position: absolute;
  top: 50%;
  right: 0.45rem;
  z-index: 2;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: rgba(0, 32, 85, 0.45);
  padding: 0.25rem 0.5rem;
  line-height: 1;
  cursor: pointer;
}

.sc-auth-toggle:hover {
  color: var(--sc-navy);
}

.sc-auth-toggle i {
  font-size: 1.1rem;
  pointer-events: none;
}

@media (max-width: 575.98px) {
  .sc-auth {
    padding: 0.75rem 0 1.75rem;
  }

  .sc-auth-shell {
    padding: 1.15rem 1rem 1.35rem;
    border-radius: 1rem;
  }
}
