/* =========================================================
   NOEFR · Admin (Master)
   Paleta herdada do site noefr.com.br
   ========================================================= */
:root {
  --navy-950: #04122b;
  --navy-900: #071d44;
  --navy-800: #0b2b63;
  --navy-700: #12407f;
  --blue-500: #2a6fd1;
  --indigo-500: #4f46e5;
  --cyan-400: #4cc3e0;
  --cyan-300: #8adcef;
  --ice-50:  #f4fafc;
  --ink:     #0b1b36;
  --muted:   #51627f;
  --line:    #e2e8f0;
  --erro:    #c0392b;
  --ok:      #138a6f;

  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Marca ---------- */
.auth-brand { display: inline-flex; flex-direction: column; line-height: 1; text-decoration: none; }
.brand-mark {
  font: 900 1.55rem/1 'Montserrat', sans-serif;
  letter-spacing: -.04em;
  background: linear-gradient(180deg, #e9f1ff 0%, #9fb7dc 45%, #5f7fb3 55%, #c9d8f2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub {
  font: 700 .66rem/1 'Montserrat', sans-serif;
  color: var(--cyan-300); letter-spacing: .14em; text-transform: uppercase;
  margin-top: .22rem; align-self: flex-end;
}

/* =========================================================
   LOGIN · layout split
   ========================================================= */
.auth-body { background: var(--navy-950); }
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

/* Lado visual */
.auth-visual {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 0% 0%, #13235a 0%, var(--navy-950) 55%, #050b1d 100%);
  color: #fff;
  padding: clamp(28px, 4vw, 52px);
  display: flex; flex-direction: column; justify-content: space-between;
  isolation: isolate;
}
.glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .75; z-index: -1; will-change: transform; }
.glow.g1 { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; left: -14%; top: -10%;
  background: radial-gradient(circle, var(--indigo-500), transparent 65%); animation: flutua1 16s ease-in-out infinite alternate; }
.glow.g2 { width: 34vw; height: 34vw; max-width: 460px; max-height: 460px; right: -10%; top: -8%;
  background: radial-gradient(circle, var(--cyan-400), transparent 62%); animation: flutua2 19s ease-in-out infinite alternate; }
.glow.g3 { width: 40vw; height: 40vw; max-width: 520px; max-height: 520px; left: 18%; bottom: -22%;
  background: radial-gradient(circle, var(--blue-500), transparent 65%); opacity: .45; animation: flutua3 22s ease-in-out infinite alternate; }
@keyframes flutua1 { to { transform: translate(12%, 16%) scale(1.12); } }
@keyframes flutua2 { to { transform: translate(-18%, 22%) scale(.9); } }
@keyframes flutua3 { to { transform: translate(-10%, -14%) scale(1.15); } }

.auth-grid {
  position: absolute; inset: 0; z-index: -1; opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 70%, #000 10%, transparent 70%);
}

.auth-pitch h1 {
  font: 800 clamp(1.8rem, 1rem + 2.2vw, 2.7rem)/1.12 'Montserrat', sans-serif;
  letter-spacing: -.02em;
  max-width: 15ch;
  margin: 0 0 18px;
}
.auth-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-chips span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 600;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(6px);
}

/* Lado do formulário */
.auth-panel {
  background: var(--ice-50);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px; position: relative;
}
.auth-brand--mobile { display: none; }
.auth-form-wrap { width: 100%; max-width: 380px; }
.auth-title { font: 800 1.75rem/1.2 'Montserrat', sans-serif; margin: 0 0 4px; color: var(--ink); }
.auth-subtitle { color: var(--muted); font-size: .92rem; margin: 0 0 26px; }
.auth-foot { position: absolute; bottom: 18px; margin: 0; font-size: .76rem; color: #8a98b3; }

.auth-form { display: grid; gap: 14px; }
.field { position: relative; display: block; }
.field input {
  width: 100%; height: 50px;
  padding: 0 46px 0 44px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
  font: 500 .95rem 'Inter', sans-serif;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: #9aa7bd; }
.field input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(42,111,209,.14); }
.field-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #8a98b3; pointer-events: none; }
.field-action {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: #8a98b3; cursor: pointer;
  width: 34px; height: 34px; border-radius: 8px;
}
.field-action:hover { color: var(--ink); background: #f1f5f9; }

.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; margin: 2px 0 6px; gap: 10px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink); }
.check input { width: 16px; height: 16px; accent-color: var(--navy-800); }
.link { color: var(--blue-500); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px;
  border: 0; border-radius: var(--radius-sm);
  background: var(--navy-950); color: #fff;
  font: 700 .95rem 'Inter', sans-serif; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease-out), box-shadow .25s, background .2s;
}
.btn-primary:hover { background: var(--navy-900); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(4,18,43,.22); }
.btn-primary .bi-arrow-right { transition: transform .3s var(--ease-out); }
.btn-primary:hover .bi-arrow-right { transform: translateX(4px); }
.btn-primary[disabled] { opacity: .7; cursor: wait; }
.btn-block { width: 100%; }

.auth-back { display: flex; justify-content: center; gap: 6px; margin-top: 22px; font-size: .85rem; color: var(--muted); text-decoration: none; }
.auth-back:hover { color: var(--ink); }

.auth-hint { margin: -2px 0 4px; font-size: .8rem; color: var(--muted); display: flex; gap: 6px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: 18px; line-height: 1.45; }
.alert-erro { background: #fdecea; color: #8f2318; border: 1px solid #f6c9c3; }
.alert-ok   { background: #e6f4f0; color: #0d6b55; border: 1px solid #bfe3d8; }
.alert-info { background: #eaf2fd; color: #1c4f99; border: 1px solid #c9dcf6; }

/* =========================================================
   PAINEL
   ========================================================= */
.painel-body {
  min-height: 100vh;
  background:
    radial-gradient(60% 50% at 10% 0%, rgba(79,70,229,.10), transparent 70%),
    radial-gradient(50% 40% at 100% 10%, rgba(76,195,224,.12), transparent 70%),
    var(--ice-50);
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px clamp(20px, 4vw, 48px);
  background: var(--navy-950); color: #fff;
}
.topbar-user { display: flex; align-items: center; gap: 12px; }
.topbar-user form { margin: 0; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
  font-weight: 700; font-size: .9rem;
}
.topbar-name { font-size: .9rem; font-weight: 600; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.16); border-radius: 8px;
  padding: 7px 12px; font: 600 .82rem 'Inter', sans-serif; cursor: pointer;
}
.btn-ghost:hover { background: rgba(255,255,255,.16); }

.painel-main { max-width: 1080px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) 24px; }
.painel-head { margin-bottom: 32px; }
.eyebrow { color: var(--blue-500); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 6px; }
.painel-head h1 { font: 800 clamp(1.6rem, 1rem + 1.8vw, 2.3rem)/1.15 'Montserrat', sans-serif; margin: 0; letter-spacing: -.02em; }

.cards-escolha { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card-escolha {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column;
  padding: 32px; min-height: 340px;
  border-radius: var(--radius-lg);
  color: #fff; text-decoration: none;
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
.card-site    { background: linear-gradient(145deg, #1a2f86 0%, var(--navy-900) 60%, var(--navy-950) 100%); }
.card-sistema { background: linear-gradient(145deg, #0d6f8a 0%, var(--navy-800) 55%, var(--navy-950) 100%); }
.card-glow { position: absolute; width: 320px; height: 320px; right: -90px; top: -110px; border-radius: 50%; filter: blur(50px); opacity: .55; z-index: -1; transition: transform .6s var(--ease-out); }
.card-site .card-glow    { background: var(--indigo-500); }
.card-sistema .card-glow { background: var(--cyan-400); }
.card-escolha:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(4,18,43,.28); }
.card-escolha:hover .card-glow { transform: scale(1.25) translate(-20px, 20px); }

.card-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  margin-bottom: 22px;
}
.card-escolha h2 { font: 800 1.45rem/1.2 'Montserrat', sans-serif; margin: 0 0 8px; }
.card-escolha p { margin: 0 0 18px; color: rgba(255,255,255,.78); font-size: .93rem; line-height: 1.55; }
.card-escolha ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 6px; font-size: .88rem; color: rgba(255,255,255,.9); }
.card-escolha ul i { color: var(--cyan-300); margin-right: 6px; }
.card-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.card-cta i { transition: transform .3s var(--ease-out); }
.card-escolha:hover .card-cta i { transform: translateX(5px); }
.card-escolha.is-off { filter: grayscale(.8); opacity: .55; pointer-events: none; }

.vazio { text-align: center; max-width: 520px; margin: 40px auto; }
.vazio .card-icon { margin: 0 auto 18px; color: #fff; }
.vazio .icon-site    { background: linear-gradient(135deg, var(--indigo-500), var(--navy-900)); }
.vazio .icon-sistema { background: linear-gradient(135deg, var(--cyan-400), var(--navy-800)); }
.vazio .icon-alerta  { background: linear-gradient(135deg, #e0685a, var(--erro)); }
.vazio h1 { font: 800 1.8rem/1.2 'Montserrat', sans-serif; margin: 0 0 8px; }
.vazio p { color: var(--muted); margin: 0 0 24px; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel {
    min-height: 100vh;
    background:
      radial-gradient(80% 40% at 50% 0%, rgba(79,70,229,.14), transparent 70%),
      var(--ice-50);
  }
  .auth-brand--mobile { display: inline-flex; margin-bottom: 36px; }
  .auth-brand--mobile .brand-mark { background: linear-gradient(180deg, var(--navy-800), var(--navy-950)); -webkit-background-clip: text; background-clip: text; }
  .auth-brand--mobile .brand-sub { color: var(--blue-500); }
  .cards-escolha { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .topbar-name, .btn-ghost span { display: none; }
  .card-escolha { padding: 26px; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .glow { animation: none; }
  .card-escolha, .btn-primary { transition: none; }
}
