/* === AUTH LAYOUT — migrado de style block em layouts/auth.html.erb === */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #FF5722;
  --accent-hover: #FF6D41;
  --radius: 20px;
  --glass-bg: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.18);
  --text: #ffffff;
  --text-muted: rgba(255,255,255,0.72);
  --input-bg: rgba(255,255,255,0.09);
  --input-border: rgba(255,255,255,0.22);
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Open Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 20%, rgba(255,87,34,0.18), transparent 30%),
    radial-gradient(circle at 88% 80%, rgba(26,35,126,0.35), transparent 28%),
    linear-gradient(132deg, #1a237e 0%, #131f6c 46%, #0d1758 100%);
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 24px 52px rgba(4, 9, 36, 0.52);
  padding: clamp(28px, 6vw, 44px);
  animation: fadeUp 0.42s cubic-bezier(0.22,1,0.36,1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  text-decoration: none;
}

.auth-brand__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff845f 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-brand__icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.auth-brand__name {
  font-family: "Montserrat", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.auth-heading {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 6px;
}

.auth-subheading {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-family: "Montserrat", sans-serif;
}

.auth-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: #fff;
  font-family: "Open Sans", sans-serif;
  font-size: 0.95rem;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.auth-input::placeholder { color: rgba(255,255,255,0.42); }
.auth-input:focus {
  outline: none;
  border-color: rgba(255,87,34,0.86);
  background: rgba(255,255,255,0.13);
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff7b50 100%);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
  box-shadow: 0 8px 20px rgba(255,87,34,0.3);
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(255,87,34,0.42);
}

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

.auth-divider {
  margin: 4px 0;
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.14);
}

.auth-links {
  text-align: center;
  display: grid;
  gap: 8px;
}

.auth-links p {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin: 0;
}

.auth-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 180ms ease;
}

.auth-links a:hover { color: var(--accent-hover); }

.auth-alert {
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.auth-alert--error {
  background: rgba(239,68,68,0.18);
  border: 1px solid rgba(239,68,68,0.42);
  color: #fecaca;
}

.auth-alert--notice {
  background: rgba(76,175,80,0.18);
  border: 1px solid rgba(76,175,80,0.42);
  color: #d1fad4;
}

/* Override Devise default field_with_errors wrapper */
.field_with_errors { display: contents; }
.field_with_errors .auth-input { border-color: rgba(239,68,68,0.7); }
.auth-field-hint { color: rgba(255,255,255,0.45); font-size: 0.8rem; display: block; margin-top: 4px; }

/* === Plan selector — cadastro === */

.auth-plan-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}

.auth-plan-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--glass-border);
  background: var(--glass-bg);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease;
  min-height: 44px;
  text-align: center;
}

.auth-plan-option:hover {
  border-color: rgba(255,87,34,0.5);
  background: rgba(255,255,255,0.11);
}

.auth-plan-option--selected {
  border-color: var(--accent);
  background: rgba(255,87,34,0.12);
}

.auth-plan-option__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.auth-plan-option__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.auth-plan-option__icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 2px;
}

.auth-plan-option__label {
  font-family: "Montserrat", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.auth-plan-option__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}
