/* Login - page-specific (layout sem sidebar, rail à direita) */
:root {
  --rail-width: 440px;
}
body {
  overflow-x: hidden;
}
.scene-gradient {
  inset: -15%;
  background:
    radial-gradient(1000px 560px at 12% 18%, rgba(245, 158, 11, 0.22), transparent 58%),
    radial-gradient(700px 460px at 65% 80%, rgba(219, 39, 119, 0.16), transparent 60%),
    radial-gradient(520px 360px at 60% 10%, rgba(34, 211, 238, 0.08), transparent 62%),
    radial-gradient(600px 400px at 5% 85%, rgba(234, 88, 12, 0.14), transparent 60%);
  filter: saturate(1.15);
}
.scene-grid {
  background-image:
    linear-gradient(rgba(251,191,36,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251,191,36,0.07) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse 70% 70% at 30% 45%, #000 30%, transparent 82%);
  opacity: 0.34;
}
.scene-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(251, 191, 36, 0.13);
  box-shadow: inset 0 0 80px rgba(245, 158, 11, 0.04), 0 0 60px rgba(219, 39, 119, 0.04);
}
.ring-a { width: 760px; height: 760px; top: -280px; left: -120px; }
.ring-b { width: 520px; height: 520px; bottom: -220px; left: 35%; border-color: rgba(244, 114, 182, 0.1); }

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr var(--rail-width);
  align-items: stretch;
}
.brand-area {
  min-height: 100vh;
  padding: 56px clamp(32px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.brand-header {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 56px;
}
.brand-mark { width: 56px; height: 56px; }
.brand-mark svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 10px 26px rgba(245,158,11,0.35)) drop-shadow(0 0 18px rgba(219,39,119,0.18)); }
.brand-title { display: flex; flex-direction: column; justify-content: center; }
.brand-title .overline {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--primary-3); margin: 0 0 4px;
}
.brand-title h1 {
  margin: 0; font-size: 1.6rem; line-height: 1.1; letter-spacing: -0.03em; font-weight: 800;
  background: linear-gradient(135deg, #fff7ed 20%, #fbbf24 60%, #f472b6 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-center { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 32px; max-width: 760px; }
.brand-hero { margin: 0; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px;
  border-radius: 999px; border: 1px solid rgba(251, 191, 36, 0.28);
  background: linear-gradient(135deg, rgba(245,158,11,0.14), rgba(219,39,119,0.10));
  color: #fde68a; font-size: 0.8rem; font-weight: 600; margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.tag-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 5px rgba(245,158,11,0.16), 0 0 12px rgba(244,114,182,0.35); }
.brand-hero h2 { margin: 0 0 12px; font-size: clamp(2.1rem, 1.4rem + 1.6vw, 3rem); line-height: 1.12; letter-spacing: -0.035em; font-weight: 800; max-width: 18ch; }
.brand-hero p { margin: 0; color: var(--text-soft); font-size: 1.05rem; line-height: 1.7; max-width: 46ch; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 640px; }
.feature-card {
  min-height: 128px; padding: 18px; border: 1px solid var(--border); border-radius: 16px;
  background: linear-gradient(160deg, rgba(255,247,237,0.03), rgba(244,114,182,0.02));
  backdrop-filter: blur(6px); display: flex; flex-direction: column; justify-content: flex-start;
  transition: border-color .2s, transform .2s, background .2s;
}
.feature-card:hover { border-color: rgba(251,191,36,0.32); transform: translateY(-2px); background: linear-gradient(160deg, rgba(255,247,237,0.05), rgba(244,114,182,0.04)); }
.feature-icon {
  width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(245,158,11,0.22), rgba(219,39,119,0.16));
  color: #fde68a; font-size: 1.1rem; margin-bottom: 12px; border: 1px solid rgba(251,191,36,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.feature-card h3 { margin: 0 0 4px; font-size: 0.98rem; font-weight: 700; letter-spacing: -0.01em; }
.feature-card p { margin: 0; font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.brand-footer {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 16px;
  padding-top: 24px; border-top: 1px solid var(--border); max-width: 640px; min-height: 56px;
}
.footer-item { text-align: center; }
.footer-label { display: block; font-size: 0.72rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; margin-bottom: 4px; }
.footer-value { display: block; font-size: 0.88rem; color: var(--text-soft); font-weight: 600; }
.footer-value.status { color: #fbbf24; }
.footer-divider { width: 1px; height: 28px; background: linear-gradient(to bottom, transparent, var(--border-strong), transparent); }

/* Rail / Form */
.login-rail {
  min-height: 100vh; height: 100vh; position: sticky; top: 0;
  background: linear-gradient(180deg, rgba(20, 12, 32, 0.96) 0%, rgba(14, 9, 24, 0.98) 100%);
  border-left: 1px solid var(--border-strong);
  box-shadow: -24px 0 60px rgba(0,0,0,0.35), inset 1px 0 0 rgba(251,191,36,0.06);
  backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center; padding: 40px 32px; overflow-y: auto;
}
.login-rail::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 1px;
  background: linear-gradient(180deg, rgba(251,191,36,0.0), rgba(251,191,36,0.35) 30%, rgba(244,114,182,0.25) 70%, rgba(251,191,36,0.0));
  pointer-events: none;
}
.form-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; margin: auto 0; }
.form-header { text-align: center; margin-bottom: 32px; }
.form-header .overline { margin-bottom: 6px; color: var(--accent); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; display: block; }
.form-header h3 { margin: 0 0 8px; font-size: 1.85rem; line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; }
.form-header p { margin: 0; color: var(--muted); font-size: 0.95rem; }
form { width: 100%; }
.form-grid { display: grid; gap: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-soft); margin-bottom: 8px; letter-spacing: 0.01em; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted-2); display: inline-flex; pointer-events: none; transition: color .18s; }
.input-icon svg { width: 18px; height: 18px; }
.input-wrap input {
  width: 100%; height: 52px; padding: 0 48px 0 44px; border-radius: 14px;
  border: 1px solid var(--border-strong); background: var(--surface-strong); color: var(--text);
  font: 500 0.96rem var(--font); transition: border-color .18s, box-shadow .18s, background .18s;
}
.input-wrap input::placeholder { color: #6b5447; font-weight: 400; }
.input-wrap input:hover { border-color: rgba(251,191,36,0.4); }
.input-wrap:focus-within .input-icon { color: var(--primary-3); }
.input-wrap input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(245,158,11,0.22), 0 0 0 1px rgba(244,114,182,0.18) inset; background: rgba(12, 7, 20, 0.98); }
.toggle-pass {
  position: absolute; right: 6px; width: 38px; height: 38px; border: none; border-radius: 10px;
  background: transparent; color: var(--muted-2); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: color .15s, background .15s;
}
.toggle-pass:hover { color: var(--text); background: rgba(251,191,36,0.1); }
.toggle-pass svg { width: 18px; height: 18px; }
.toggle-pass .eye-closed { display: none; }
.toggle-pass[aria-pressed="true"] .eye-open { display: none; }
.toggle-pass[aria-pressed="true"] .eye-closed { display: block; }
.form-options { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin: 16px 0; min-height: 40px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--muted); cursor: pointer; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); margin: 0; flex: 0 0 17px; }
.text-link { justify-self: end; color: var(--accent); font-size: 0.86rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.text-link:hover { color: #f9a8d4; text-decoration: underline; }
.alert { display: none; min-height: 48px; padding: 12px 14px; border-radius: 12px; font-size: 0.88rem; line-height: 1.45; border: 1px solid transparent; margin-bottom: 16px; }
.alert.show { display: flex; align-items: center; }
.alert.error { color: #fecdd3; background: rgba(251,113,133,0.1); border-color: rgba(251,113,133,0.22); }
.alert.info { color: #fde68a; background: rgba(245,158,11,0.1); border-color: rgba(251,191,36,0.22); }
.btn-primary {
  width: 100%; height: 54px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 35%, #f97316 70%, #db2777 100%);
  color: #2a0a12; font: 700 1rem var(--font); letter-spacing: 0.01em; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 16px 34px rgba(234, 88, 12, 0.32), 0 6px 18px rgba(219, 39, 119, 0.22), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform .12s, filter .15s, box-shadow .15s; position: relative; overflow: hidden;
}
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,0.22) 45%, transparent 70%); transform: translateX(-120%); transition: transform .5s ease; }
.btn-primary:hover { filter: brightness(1.04) saturate(1.05); box-shadow: 0 20px 40px rgba(234, 88, 12, 0.38), 0 8px 22px rgba(219, 39, 119, 0.26), inset 0 1px 0 rgba(255,255,255,0.35); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.72; cursor: not-allowed; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(42,10,18,0.25); border-top-color: #2a0a12; border-radius: 50%; display: none; animation: spin .8s linear infinite; }
.btn-primary.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-footer { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 0; }
.meta-cell { height: 64px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px 12px; }
.meta-label { font-size: 0.72rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; margin-bottom: 4px; }
.meta-value { font-size: 0.9rem; color: var(--text-soft); font-weight: 600; }
.mono { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.02em; color: #fcd34d; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .login-rail { position: relative; height: auto; min-height: auto; border-left: none; border-top: 1px solid var(--border-strong); box-shadow: 0 -20px 50px rgba(0,0,0,0.25); padding: 40px 24px; }
  .login-rail::before { display: none; }
  .form-card { max-width: 420px; margin: 0 auto; }
  .brand-area { min-height: auto; padding: 40px 28px; }
  .brand-center { max-width: 100%; }
  .feature-grid, .brand-footer { max-width: 100%; }
}
@media (max-width: 640px) {
  .brand-area { padding: 32px 20px; gap: 24px; }
  .feature-grid { grid-template-columns: 1fr; }
  .brand-footer { grid-template-columns: 1fr; gap: 12px; }
  .footer-divider { display: none; }
  .footer-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .footer-item:last-child { border-bottom: none; }
  .login-rail { padding: 32px 20px; }
  .form-options { grid-template-columns: 1fr; gap: 12px; }
  .text-link { justify-self: start; }
  .meta-grid { grid-template-columns: 1fr; }
  .form-header h3 { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
