/* ===== Login Profissional — LucroTech ===== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@500&display=swap');

:root {
  --ink:      #0d1b2e;
  --ink-mid:  #3a4a5c;
  --ink-soft: #8494a7;
  --white:    #ffffff;
  --surface:  rgba(255,255,255,0.92);
  --border:   rgba(13,27,46,0.10);
  --border-focus: #1a56db;
  --accent:   #1a56db;
  --accent-dk:#1240a8;
  --danger:   #c0392b;
  --success:  #1a7a4a;
  --shadow-card: 0 4px 6px rgba(13,27,46,.04), 0 20px 60px rgba(13,27,46,.10);
  --shadow-btn:  0 4px 14px rgba(26,86,219,.30);
  --radius-card: 16px;
  --radius-input: 10px;
}

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

html { height: 100%; }

body {
  height: 100%;
  font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background-color: #f0f4f9;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(26,86,219,.08) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230d1b2e' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  overflow-x: hidden;
}

/* ════════════════════════════════
   ANIMAÇÕES DE ENTRADA (fade-in)
   Cada elemento tem um delay diferente → efeito cascata
   ════════════════════════════════ */

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

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

@keyframes fadeScale {
  from {
    opacity: 0;
    transform: scale(.93) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Elementos que começam invisíveis até a animação rodar */
.anim-logo,
.anim-title,
.anim-subtitle,
.anim-card,
.anim-footer {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(.22, .68, 0, 1.2);
}

.anim-logo     { animation: fadeDown .6s .05s forwards; }
.anim-title    { animation: fadeUp   .5s .22s forwards; animation-timing-function: cubic-bezier(.22,.68,0,1.1); }
.anim-subtitle { animation: fadeUp   .5s .34s forwards; animation-timing-function: ease-out; }
.anim-card     { animation: fadeScale .65s .44s forwards; animation-timing-function: cubic-bezier(.16,1,.3,1); }
.anim-footer   { animation: fadeUp   .5s .80s forwards; animation-timing-function: ease-out; }

/* ── Shell ── */
.login-shell {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translate(0px, -28px);
}

.login-box {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

/* ── Brand ── */
.brand-logo {
  width: min(258px, 55vw);
  height: auto;
  display: inline-block;
  margin-bottom: 12px;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.3px;
  margin-bottom: 4px;
}

.brand-subtitle {
  font-size: .85rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 28px;
}

.brand-subtitle svg {
  width: 12px;
  height: 12px;
  fill: var(--accent);
  flex-shrink: 0;
}

/* ── Card ── */
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 36px 32px 32px;
  text-align: left;
}

/* ── Card header ── */
.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.card-sub {
  font-size: .8rem;
  color: var(--ink-soft);
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .7rem;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  letter-spacing: .5px;
  color: var(--accent);
  background: rgba(26,86,219,.07);
  border: 1px solid rgba(26,86,219,.18);
  border-radius: 6px;
  padding: 4px 9px;
  white-space: nowrap;
}

.secure-badge svg {
  width: 11px;
  height: 11px;
  fill: var(--accent);
}

/* ── Alerts ── */
.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .85rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-danger   { background: rgba(192,57,43,.08);  border: 1px solid rgba(192,57,43,.20);  color: var(--danger); }
.alert-success  { background: rgba(26,122,74,.08);  border: 1px solid rgba(26,122,74,.20);  color: var(--success); }
.alert-warning  { background: rgba(180,130,0,.08);  border: 1px solid rgba(180,130,0,.20);  color: #7a5800; }
.alert-secondary{ background: rgba(13,27,46,.05);  border: 1px solid var(--border);         color: var(--ink-mid); }

/* ── Field ── */
.field { margin-bottom: 18px; }

.field-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-mid);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 7px;
}

.input-wrap { position: relative; }

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: var(--ink-soft);
  pointer-events: none;
  transition: fill .15s;
}

.form-control {
  display: block;
  width: 100%;
  padding: .75rem .95rem .75rem 2.65rem;
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.form-control::placeholder { color: var(--ink-soft); opacity: .7; }

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}

.input-wrap:focus-within .input-icon { fill: var(--border-focus); }

.form-control.has-toggle { padding-right: 2.8rem; }

.btn-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  padding: 6px;
  border-radius: 7px;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 0;
  transition: color .15s, background .15s;
}

.btn-eye:hover { background: rgba(13,27,46,.06); color: var(--ink); }
.btn-eye svg   { fill: currentColor; display: block; width: 18px; height: 18px; }

/* ── Security Tips ── */
.security-tips {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  min-height: 22px;
}

.tip-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(26,86,219,.08);
  border: 1px solid rgba(26,86,219,.16);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: shield-pulse 2.4s ease-in-out infinite;
}

.tip-icon svg { width: 14px; height: 14px; fill: var(--accent); }

@keyframes shield-pulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(26,86,219,.22); }
  50%       { box-shadow: 0 0 0 5px rgba(26,86,219,.0);  }
}

.tip-track {
  position: relative;
  flex: 1;
  height: 20px;
  overflow: hidden;
}

.tip-item {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  font-size: .76rem;
  color: var(--ink-soft);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}

.tip-item.active  { opacity: 1; transform: translateY(0);  pointer-events: auto; }
.tip-item.leaving { opacity: 0; transform: translateY(-8px); }

/* ── Botão Entrar ── */
.btn-submit {
  display: block;
  width: 100%;
  padding: .9rem 1rem;
  margin-top: 8px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--white);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-input);
  box-shadow: var(--shadow-btn);
  cursor: pointer;
  transition: background .15s, box-shadow .15s, opacity .15s;
}

.btn-submit:hover    { background: var(--accent-dk); box-shadow: 0 6px 20px rgba(26,86,219,.36); }
.btn-submit:disabled { opacity: .65; cursor: not-allowed; }

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0 18px;
}

.copy-inline {
  font-size: .76rem;
  color: var(--ink-soft);
  text-align: center;
}

.footer-note {
  font-size: .76rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 35px;
  margin-bottom: 13px;
}

/* ── Responsivo ── */
@media (max-width: 480px) {
  .login-card  { padding: 28px 20px 24px; }
  .brand-title { font-size: 1.2rem; }
  .login-box   { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .anim-logo, .anim-title, .anim-subtitle, .anim-card, .anim-footer {
    opacity: 1 !important;
  }
}