/* Login Devise — layout tipo Lexa, marca Sandos */

.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--theme-font, "Plus Jakarta Sans", system-ui, sans-serif);
  background-color: #f4f5f7;
  background-image:
    radial-gradient(ellipse 70% 45% at 50% -10%, rgba(220, 38, 38, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 100% 100%, rgba(15, 23, 42, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #f8f9fb 0%, #eef0f4 100%);
}

html[data-theme="dark"] .auth-body {
  background-color: #0f172a;
  background-image:
    radial-gradient(ellipse 70% 45% at 50% -10%, rgba(220, 38, 38, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 0% 100%, rgba(51, 65, 85, 0.4) 0%, transparent 50%),
    linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.auth-panel {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: auth-panel-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-panel-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-signin-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: color-mix(in srgb, #ffffff 88%, transparent);
  border-radius: inherit;
  backdrop-filter: blur(4px);
}

html[data-theme="dark"] .auth-signin-overlay {
  background: color-mix(in srgb, var(--theme-card-bg) 88%, transparent);
}

.auth-signin-overlay[hidden] {
  display: none !important;
}

.auth-signin-overlay:not([hidden]) {
  display: flex;
}

.auth-signin-overlay__panel {
  text-align: center;
  max-width: 280px;
}

.auth-signin-overlay__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

html[data-theme="dark"] .auth-signin-overlay__title {
  color: var(--theme-heading);
}

.auth-signin-overlay__detail {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
}

html[data-theme="dark"] .auth-signin-overlay__detail {
  color: var(--theme-muted);
}

.auth-card {
  position: relative;
  width: 100%;
  background: #ffffff;
  border-radius: 4px;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.06),
    0 12px 32px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 40px 36px 36px;
  overflow: hidden;
}

html[data-theme="dark"] .auth-card {
  background: var(--theme-card-bg);
  border-color: var(--theme-card-border);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.25),
    0 16px 40px rgba(0, 0, 0, 0.35);
}

.auth-theme-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.auth-theme-toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="dark"] .auth-theme-toggle {
  border-color: var(--theme-toggle-border);
  background: var(--theme-toggle-bg);
  color: var(--theme-toggle-text);
}

.auth-theme-toggle .theme-toggle__icon {
  width: 16px;
  height: 16px;
  display: block;
}

.auth-brand {
  text-align: center;
  margin: 0 0 28px;
  padding: 0 8px;
}

.auth-brand__logo {
  display: block;
  width: min(148px, 58%);
  height: auto;
  margin: 0 auto 22px;
  object-fit: contain;
  animation: auth-logo-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

@keyframes auth-logo-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

html[data-theme="dark"] .auth-brand__logo {
  filter: none;
}

.auth-brand__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1e293b;
  line-height: 1.25;
}

html[data-theme="dark"] .auth-brand__title {
  color: var(--theme-heading);
}

.auth-subtitle {
  margin: 0;
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.45;
  font-weight: 500;
}

html[data-theme="dark"] .auth-subtitle {
  color: var(--theme-muted);
}

.auth-flash {
  border-radius: 4px;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 16px;
}

.auth-flash--alert {
  background: var(--sandos-accent-soft);
  color: var(--sandos-accent-darker);
  border: 1px solid var(--sandos-accent-border);
}

html[data-theme="dark"] .auth-flash--alert {
  color: #fecaca;
}

.auth-flash--notice {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

html[data-theme="dark"] .auth-flash--notice {
  background: rgba(6, 95, 70, 0.2);
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.35);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.auth-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #1e293b;
}

html[data-theme="dark"] .auth-label {
  color: var(--theme-heading);
}

.auth-input {
  height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

html[data-theme="dark"] .auth-input {
  border-color: var(--theme-input-border);
  color: var(--theme-input-text);
  background: var(--theme-input-bg);
}

.auth-input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.auth-input:focus {
  outline: none;
  border-color: var(--sandos-accent);
  box-shadow: 0 0 0 3px var(--sandos-shadow-accent-soft);
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  user-select: none;
}

html[data-theme="dark"] .auth-remember {
  color: var(--theme-subtle);
}

.auth-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--sandos-accent);
  flex-shrink: 0;
  margin: 0;
}

.auth-submit {
  flex: 0 0 auto;
  min-width: 118px;
  height: 40px;
  padding: 0 22px;
  margin: 0;
  border: none;
  border-radius: 4px;
  background: var(--sandos-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--sandos-shadow-accent-soft);
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.auth-submit:hover {
  background: var(--sandos-accent-hover);
  box-shadow: 0 6px 16px var(--sandos-shadow-accent);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-copyright {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
}

html[data-theme="dark"] .auth-copyright {
  color: var(--theme-muted);
}

@media (max-width: 440px) {
  .auth-card {
    padding: 32px 22px 28px;
  }

  .auth-brand__logo {
    width: min(132px, 64%);
  }

  .auth-brand__title {
    font-size: 20px;
  }

  .auth-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-submit {
    width: 100%;
  }
}
