/* ==========================================================================
   nMon — Tela de login (modernizada)
   Carregado em template/signin.php e templatelll/signin.php
   ========================================================================== */

:root {
  --nmon-bg-0: #05070f;
  --nmon-bg-1: #0a0f1f;
  --nmon-bg-2: #101a35;

  --nmon-surface: rgba(255, 255, 255, 0.045);
  --nmon-surface-strong: rgba(255, 255, 255, 0.075);
  --nmon-border: rgba(255, 255, 255, 0.10);
  --nmon-border-strong: rgba(255, 255, 255, 0.18);

  --nmon-text: #eef2ff;
  --nmon-text-dim: #9aa6c7;
  --nmon-text-mute: #6b779a;

  --nmon-accent: #5b8cff;
  --nmon-accent-2: #22d3ee;
  --nmon-accent-3: #a855f7;
  --nmon-gradient: linear-gradient(135deg, #5b8cff 0%, #22d3ee 55%, #a855f7 100%);

  --nmon-danger: #ff6b6b;
  --nmon-success: #34d399;
  --nmon-warning: #fbbf24;

  --nmon-radius: 20px;
  --nmon-radius-sm: 12px;

  --nmon-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.75);
  --nmon-shadow-sm: 0 10px 30px -12px rgba(0, 0, 0, 0.6);

  --nmon-font: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html,
body.nmon-login {
  height: 100%;
}

body.nmon-login {
  margin: 0;
  font-family: var(--nmon-font);
  color: var(--nmon-text);
  background: var(--nmon-bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---------------------------------------------------------------- backdrop */

.nmon-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(1100px 700px at 12% 8%, rgba(91, 140, 255, 0.22), transparent 60%),
    radial-gradient(900px 620px at 88% 12%, rgba(168, 85, 247, 0.18), transparent 62%),
    radial-gradient(1000px 800px at 70% 96%, rgba(34, 211, 238, 0.16), transparent 60%),
    linear-gradient(160deg, var(--nmon-bg-0) 0%, var(--nmon-bg-1) 45%, var(--nmon-bg-2) 100%);
}

.nmon-bg::after {
  content: "";
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  pointer-events: none;
}

.nmon-blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
}

.nmon-blob-1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -100px;
  background: rgba(91, 140, 255, 0.55);
  animation: nmon-float-1 22s ease-in-out infinite;
}

.nmon-blob-2 {
  width: 380px;
  height: 380px;
  bottom: -140px;
  right: -80px;
  background: rgba(168, 85, 247, 0.45);
  animation: nmon-float-2 26s ease-in-out infinite;
}

.nmon-blob-3 {
  width: 260px;
  height: 260px;
  top: 45%;
  left: 58%;
  background: rgba(34, 211, 238, 0.4);
  animation: nmon-float-3 18s ease-in-out infinite;
}

@keyframes nmon-float-1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(70px, 60px, 0) scale(1.12); }
}

@keyframes nmon-float-2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-80px, -50px, 0) scale(1.08); }
}

@keyframes nmon-float-3 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-50px, -70px, 0) scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .nmon-blob { animation: none; }
  .nmon-card { animation: none; }
}

/* ------------------------------------------------------------------ layout */

.nmon-shell {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.nmon-panel {
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--nmon-surface);
  border: 1px solid var(--nmon-border);
  border-radius: var(--nmon-radius);
  box-shadow: var(--nmon-shadow);
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  animation: nmon-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes nmon-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------- brand */

.nmon-brand {
  position: relative;
  padding: 46px 44px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  background:
    linear-gradient(200deg, rgba(91, 140, 255, 0.16), rgba(168, 85, 247, 0.10) 55%, transparent),
    rgba(255, 255, 255, 0.02);
  border-right: 1px solid var(--nmon-border);
  overflow: hidden;
}

.nmon-brand::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -140px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.nmon-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.nmon-brand-logo img {
  max-height: 54px;
  width: auto;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

.nmon-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--nmon-gradient);
  box-shadow: 0 10px 26px -8px rgba(91, 140, 255, 0.9);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.nmon-brand-mark svg { width: 24px; height: 24px; }

.nmon-brand-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nmon-brand-sub {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 42ch;
  color: var(--nmon-text-dim);
  font-size: 16px;
  line-height: 1.55;
}

.nmon-features {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.nmon-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--nmon-text-dim);
  line-height: 1.45;
}

.nmon-features .nmon-check {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--nmon-success);
}

.nmon-features .nmon-check svg { width: 12px; height: 12px; }

.nmon-brand-foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--nmon-text-mute);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.nmon-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nmon-success);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: nmon-pulse 2.4s infinite;
}

@keyframes nmon-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* -------------------------------------------------------------------- form */

.nmon-form-pane {
  padding: 46px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(9, 13, 26, 0.55);
}

.nmon-card {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  animation: nmon-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.nmon-card-head {
  margin-bottom: 26px;
}

.nmon-card-head h2 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.nmon-card-head p {
  margin: 0;
  color: var(--nmon-text-dim);
  font-size: 14.5px;
}

.nmon-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  border-radius: var(--nmon-radius-sm);
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid transparent;
}

.nmon-alert svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }

.nmon-alert-success {
  background: rgba(52, 211, 153, 0.10);
  border-color: rgba(52, 211, 153, 0.32);
  color: #7ff0c4;
}

.nmon-alert-danger {
  background: rgba(255, 107, 107, 0.10);
  border-color: rgba(255, 107, 107, 0.32);
  color: #ffb0b0;
}

.nmon-alert-warning {
  background: rgba(251, 191, 36, 0.10);
  border-color: rgba(251, 191, 36, 0.32);
  color: #fcd77a;
}

.nmon-alert-info {
  background: rgba(91, 140, 255, 0.10);
  border-color: rgba(91, 140, 255, 0.32);
  color: #b3c7ff;
}

.nmon-field {
  margin-bottom: 18px;
}

.nmon-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nmon-text-mute);
}

.nmon-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.nmon-input-wrap > svg {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--nmon-text-mute);
  pointer-events: none;
  transition: color 0.2s ease;
}

.nmon-input {
  width: 100%;
  height: 50px;
  padding: 0 44px 0 44px;
  font-family: inherit;
  font-size: 15px;
  color: var(--nmon-text);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--nmon-border);
  border-radius: var(--nmon-radius-sm);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nmon-input::placeholder { color: rgba(154, 166, 199, 0.55); }

.nmon-input:hover { border-color: var(--nmon-border-strong); }

.nmon-input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--nmon-accent);
  box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.16);
}

.nmon-input-wrap:focus-within > svg { color: var(--nmon-accent); }

.nmon-input.is-invalid {
  border-color: var(--nmon-danger);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.14);
}

.nmon-toggle {
  position: absolute;
  right: 6px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--nmon-text-mute);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nmon-toggle:hover { color: var(--nmon-text); background: rgba(255, 255, 255, 0.06); }
.nmon-toggle svg { width: 19px; height: 19px; }
.nmon-toggle .nmon-eye-off { display: none; }
.nmon-toggle.is-visible .nmon-eye { display: none; }
.nmon-toggle.is-visible .nmon-eye-off { display: block; }

.nmon-field-error {
  display: none;
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--nmon-danger);
}

.nmon-field.has-error .nmon-field-error { display: block; }

.nmon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 24px;
}

.nmon-link {
  color: var(--nmon-text-dim);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nmon-link:hover { color: var(--nmon-text); text-decoration: underline; }
.nmon-link svg { width: 15px; height: 15px; }

.nmon-btn {
  position: relative;
  width: 100%;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  border: 0;
  border-radius: var(--nmon-radius-sm);
  background: var(--nmon-gradient);
  background-size: 160% 160%;
  background-position: 0% 50%;
  box-shadow: 0 14px 30px -12px rgba(91, 140, 255, 0.85);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.25s ease, background-position 0.5s ease, opacity 0.2s ease;
}

.nmon-btn:hover {
  background-position: 100% 50%;
  box-shadow: 0 18px 38px -12px rgba(91, 140, 255, 0.95);
  transform: translateY(-1px);
}

.nmon-btn:active { transform: translateY(0); }

.nmon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.28);
}

.nmon-btn svg { width: 18px; height: 18px; }

.nmon-btn .nmon-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: nmon-spin 0.7s linear infinite;
}

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

.nmon-btn.is-loading { pointer-events: none; opacity: 0.85; }
.nmon-btn.is-loading .nmon-btn-icon { display: none; }
.nmon-btn.is-loading .nmon-spinner { display: inline-block; }

.nmon-form-foot {
  margin: 22px 0 0;
  text-align: center;
  color: var(--nmon-text-mute);
  font-size: 12.5px;
  line-height: 1.6;
}

.nmon-form-foot a { color: var(--nmon-text-dim); text-decoration: none; }
.nmon-form-foot a:hover { color: var(--nmon-text); text-decoration: underline; }

.nmon-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.nmon-lock svg { width: 13px; height: 13px; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 940px) {
  .nmon-panel { grid-template-columns: 1fr; max-width: 480px; }
  .nmon-brand { border-right: 0; border-bottom: 1px solid var(--nmon-border); padding: 34px 30px; gap: 18px; }
  .nmon-brand-title { font-size: 27px; }
  .nmon-brand-sub { font-size: 15px; }
  .nmon-features { grid-template-columns: 1fr 1fr; }
  .nmon-brand-foot { margin-top: 6px; }
  .nmon-form-pane { padding: 34px 30px 38px; }
}

@media (max-width: 620px) {
  .nmon-shell { padding: 18px 14px; }
  .nmon-features { grid-template-columns: 1fr; }
  .nmon-brand { padding: 28px 22px; }
  .nmon-form-pane { padding: 28px 22px 32px; }
  .nmon-card-head h2 { font-size: 23px; }
  .nmon-brand-title { font-size: 24px; }
}

@media (max-width: 380px) {
  .nmon-row { flex-direction: column; align-items: flex-start; }
}
