/**
 * Agrológica — login anônimo (Central de Serviços de TI)
 * Inspirado em layout moderno: fundo escuro, card glass, campos claros.
 */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --agro-login-blue: #004890;
  --agro-login-cyan: #00b4d8;
  --agro-login-lime: #a8c018;
  --agro-login-ink: #061428;
  --agro-login-card: rgba(6, 20, 40, 0.78);
  --agro-login-input: #fff8e7;
  --agro-login-text: #ffffff;
  --agro-login-muted: rgba(255, 255, 255, 0.62);
}

/* ===== Fundo atmosférico ===== */
body.welcome-anonymous {
  min-height: 100vh;
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  background-color: var(--agro-login-ink);
  background-image:
    radial-gradient(ellipse 120% 80% at 15% -10%, rgba(0, 180, 216, 0.55) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 85% 110%, rgba(0, 72, 144, 0.45) 0%, transparent 50%),
    linear-gradient(165deg, #02101f 0%, #032a4a 38%, #061428 72%, #020a14 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body.welcome-anonymous::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(
      118deg,
      rgba(255, 255, 255, 0.07) 0%,
      transparent 28%,
      transparent 72%,
      rgba(0, 180, 216, 0.04) 100%
    );
  pointer-events: none;
  z-index: 0;
}

/* Linha vertical decorativa (desktop) */
body.welcome-anonymous::after {
  content: '';
  position: fixed;
  right: clamp(2.5rem, 7vw, 5.5rem);
  top: 14%;
  bottom: 14%;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.15) 8%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0.15) 92%,
    transparent
  );
  pointer-events: none;
  z-index: 0;
}

main#page.page-anonymous {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.page-anonymous .flex-fill {
  min-height: 100vh;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.page-anonymous .container-tight {
  max-width: 26rem !important;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* ===== Marca (logo + tagline) ===== */
.page-anonymous .glpi-logo {
  --logo: none;
  background: url('/plugins/agrologicauserprefill/logo-agrologica-pb.png') no-repeat center / contain !important;
  width: min(240px, 72vw) !important;
  height: 72px !important;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.35));
}

.page-anonymous .text-center > .col-md::after {
  content: 'Central de Serviços de TI';
  display: block;
  margin: 0.65rem auto 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--agro-login-muted);
}

/* Texto institucional à direita (desktop) */
.page-anonymous .flex-fill::after {
  content: 'CENTRAL\A DE SERVIÇOS\A DE TI';
  white-space: pre;
  position: fixed;
  right: clamp(3rem, 8vw, 6.5rem);
  top: 22%;
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.03em;
  color: var(--agro-login-text);
  text-align: right;
  pointer-events: none;
  z-index: 0;
  text-shadow: 0 2px 32px rgba(0, 0, 0, 0.45);
}

.page-anonymous .flex-fill::before {
  content: '';
  position: fixed;
  right: clamp(2.35rem, 6.8vw, 5.2rem);
  top: 16%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 0;
}

/* ===== Card de login ===== */
.page-anonymous .main-content-card {
  margin-top: 1.75rem;
  background: var(--agro-login-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.25rem;
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.page-anonymous .main-content-card > .card-header:empty {
  display: none;
}

.page-anonymous .main-content-card > .card-body {
  padding: 1.75rem 1.85rem 1.65rem;
}

.page-anonymous .main-content-card .card-body .card-header {
  background: transparent;
  border: none;
  padding: 0 0 1.25rem;
  margin-bottom: 0 !important;
}

.page-anonymous .main-content-card .card-body .card-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--agro-login-text);
  letter-spacing: 0.01em;
}

.page-anonymous .main-content-card .row.justify-content-center > .col-md-5 {
  flex: 0 0 100%;
  max-width: 100%;
}

/* ===== Campos ===== */
.page-anonymous .form-label {
  color: var(--agro-login-text);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.page-anonymous .form-control,
.page-anonymous .form-select {
  background-color: var(--agro-login-input);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.65rem;
  color: #1a2433;
  padding: 0.62rem 0.85rem;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-anonymous .form-control::placeholder {
  color: rgba(26, 36, 51, 0.45);
}

.page-anonymous .form-control:focus,
.page-anonymous .form-select:focus {
  background-color: #fffdf5;
  border-color: var(--agro-login-lime);
  box-shadow: 0 0 0 3px rgba(168, 192, 24, 0.28);
  color: #1a2433;
}

.page-anonymous .form-check-label {
  color: var(--agro-login-muted);
  font-size: 0.875rem;
}

.page-anonymous .form-check-input {
  border-color: rgba(255, 255, 255, 0.35);
  background-color: rgba(255, 255, 255, 0.08);
}

.page-anonymous .form-check-input:checked {
  background-color: var(--agro-login-lime);
  border-color: var(--agro-login-lime);
}

/* Esqueci senha — alinhar à direita do bloco de senha */
.page-anonymous .mb-4:has(#login_password) {
  position: relative;
}

.page-anonymous .form-footer {
  margin-top: 0.25rem;
}

.page-anonymous .form-footer .forgot_password {
  margin-top: 0.85rem !important;
}

.page-anonymous a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.84rem;
  transition: color 0.15s ease;
}

.page-anonymous a:hover {
  color: var(--agro-login-lime);
}

/* ===== Botão Entrar ===== */
.page-anonymous .btn-primary {
  background: #0c0c0c;
  border: 1px solid #0c0c0c;
  border-radius: 0.65rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.72rem 1rem;
  letter-spacing: 0.02em;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.page-anonymous .btn-primary:hover,
.page-anonymous .btn-primary:focus {
  background: var(--agro-login-blue);
  border-color: var(--agro-login-blue);
  color: #fff;
}

.page-anonymous .btn-primary:active {
  transform: scale(0.99);
}

.page-anonymous .btn-outline-secondary {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--agro-login-text);
  border-radius: 0.65rem;
}

.page-anonymous .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* ===== Rodapé ===== */
.page-anonymous .text-muted {
  color: var(--agro-login-muted) !important;
  font-size: 0.72rem;
}

.page-anonymous .rich_text_container,
.page-anonymous .row.justify-content-center > .col-auto {
  display: none !important;
}

.page-anonymous .border-top {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* ===== Responsivo ===== */
@media (max-width: 991px) {
  body.welcome-anonymous::after,
  .page-anonymous .flex-fill::after,
  .page-anonymous .flex-fill::before {
    display: none;
  }

  .page-anonymous .container-tight {
    max-width: 22rem !important;
  }
}

@media (max-width: 480px) {
  .page-anonymous .main-content-card > .card-body {
    padding: 1.35rem 1.25rem 1.25rem;
  }

  .page-anonymous .glpi-logo {
    height: 58px !important;
  }
}
