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

/* ── DARK THEME VARIABLES ── */
body.welcome-anonymous.nc-dark {
  --nc-accent: #C8F000;
  --nc-accent-hover: #d6ff00;
  --nc-accent-soft: rgba(200,240,0,0.08);
  --nc-bg: #0E0F0D;
  --nc-surface: #161714;
  --nc-border: #2A2B28;
  --nc-text: #E8EAE2;
  --nc-muted: #6B6E62;
  --nc-input-bg: #1C1D1A;
  --nc-btn-text: #0E0F0D;
  --nc-btn-shadow: none;
  --nc-logo-filter: brightness(0) invert(1);
  --nc-overlay: linear-gradient(135deg, rgba(14,15,13,0.45) 0%, rgba(14,15,13,0.10) 50%, rgba(200,240,0,0.06) 100%);
  --nc-img-filter: brightness(0.75) contrast(1.05);
  --nc-texture: repeating-linear-gradient(-45deg, transparent, transparent 24px, rgba(255,255,255,0.015) 24px, rgba(255,255,255,0.015) 25px);
  --nc-tag-label-color: #C8F000;
  --nc-tag-text-color: rgba(232,234,226,0.85);
  --nc-check-bg: #C8F000;
  --nc-check-border: #C8F000;
}

/* ── LIGHT THEME VARIABLES ── */
body.welcome-anonymous.nc-light {
  --nc-accent: #2563EB;
  --nc-accent-hover: #1D4ED8;
  --nc-accent-soft: rgba(37,99,235,0.08);
  --nc-bg: #F4F5F2;
  --nc-surface: #FFFFFF;
  --nc-border: #DDE0D8;
  --nc-text: #1A1C18;
  --nc-muted: #7A7E74;
  --nc-input-bg: #F8F9F6;
  --nc-btn-text: #ffffff;
  --nc-btn-shadow: 0 2px 8px rgba(37,99,235,0.25);
  --nc-logo-filter: brightness(0) opacity(0.85);
  --nc-overlay: linear-gradient(160deg, rgba(244,245,242,0.18) 0%, rgba(30,40,60,0.30) 60%, rgba(15,25,50,0.52) 100%);
  --nc-img-filter: brightness(0.82) saturate(0.9);
  --nc-texture: radial-gradient(circle, rgba(26,28,24,0.08) 1px, transparent 1px);
  --nc-tag-label-color: rgba(255,255,255,0.65);
  --nc-tag-text-color: rgba(255,255,255,0.92);
  --nc-check-bg: #2563EB;
  --nc-check-border: #2563EB;
}

/* ── FULL PAGE OVERRIDE ── */
body.welcome-anonymous.nc-dark,
body.welcome-anonymous.nc-light {
  background: var(--nc-bg) !important;
  color: var(--nc-text);
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  height: 100dvh;
  overflow: hidden;
  min-height: 0;
  margin: 0;
  padding: 0;
}

body.welcome-anonymous.nc-dark .page-anonymous,
body.welcome-anonymous.nc-light .page-anonymous {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
  height: 100dvh;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

/* Kill all default GLPI wrappers */
body.welcome-anonymous.nc-dark .page-anonymous > .flex-fill,
body.welcome-anonymous.nc-light .page-anonymous > .flex-fill {
  display: contents !important;
}

body.welcome-anonymous.nc-dark .page-anonymous .container-tight,
body.welcome-anonymous.nc-light .page-anonymous .container-tight {
  display: contents !important;
  max-width: none !important;
  padding: 0 !important;
}

/* ── LEFT PANEL (IMAGE) ── */
.nc-panel-image {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 0;
  grid-column: 1;
  grid-row: 1 / -1;
}

.nc-panel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: none;
}

.nc-panel-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

.nc-panel-image-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.nc-panel-image-tag span {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--nc-tag-label-color);
  opacity: 0.9;
}

.nc-panel-image-tag p {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 300;
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--nc-tag-text-color);
  max-width: 22ch;
}

/* ── RIGHT PANEL (FORM) ── */
.nc-panel-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 3.5rem;
  background: var(--nc-surface);
  border-left: 1px solid var(--nc-border);
  position: relative;
  grid-column: 2;
  grid-row: 1 / -1;
  overflow-y: auto;
}

.nc-panel-form::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--nc-texture);
  background-size: 22px 22px;
  pointer-events: none;
}

/* Light theme has dot-grid at lower opacity */
body.welcome-anonymous.nc-light .nc-panel-form::before {
  opacity: 0.55;
}

.nc-form-inner {
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 1;
}

/* Logo */
.nc-logo-wrap {
  margin-bottom: 3rem;
}

.nc-logo-wrap img {
  height: 33px;
  width: auto;
  object-fit: contain;
  filter: var(--nc-logo-filter);
  opacity: 0.9;
}

/* Accent line */
.nc-accent-line {
  width: 2.5rem;
  height: 2px;
  background: var(--nc-accent);
  margin-bottom: 1.5rem;
}

body.welcome-anonymous.nc-light .nc-accent-line {
  opacity: 0.7;
}

/* Headings */
.nc-form-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 2.6rem;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--nc-text);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.nc-form-title span {
  color: var(--nc-accent);
}

.nc-form-sub {
  font-size: 0.85rem;
  color: var(--nc-muted);
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
}

/* ── HIDE GLPI DEFAULTS ── */
body.welcome-anonymous.nc-dark .glpi-logo,
body.welcome-anonymous.nc-light .glpi-logo,
body.welcome-anonymous.nc-dark .text-center:has(.glpi-logo),
body.welcome-anonymous.nc-light .text-center:has(.glpi-logo) {
  display: none !important;
}

body.welcome-anonymous.nc-dark .main-content-card,
body.welcome-anonymous.nc-light .main-content-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  max-width: none !important;
  margin: 0 !important;
}

body.welcome-anonymous.nc-dark .main-content-card > .card-header,
body.welcome-anonymous.nc-light .main-content-card > .card-header {
  display: none !important;
}

body.welcome-anonymous.nc-dark .main-content-card > .card-body,
body.welcome-anonymous.nc-light .main-content-card > .card-body {
  padding: 0 !important;
}

/* Hide the "Login to your account" GLPI heading */
body.welcome-anonymous.nc-dark .card-header.mb-4,
body.welcome-anonymous.nc-light .card-header.mb-4 {
  display: none !important;
}

/* Hide the rich_text_container (text_login) */
body.welcome-anonymous.nc-dark .rich_text_container,
body.welcome-anonymous.nc-light .rich_text_container {
  display: none !important;
}

/* Fix GLPI form columns — make them full width inside our panel */
body.welcome-anonymous.nc-dark .row.justify-content-center,
body.welcome-anonymous.nc-light .row.justify-content-center {
  margin: 0 !important;
  width: 100% !important;
}

body.welcome-anonymous.nc-dark .col-md-5,
body.welcome-anonymous.nc-light .col-md-5 {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
}

/* Hide plugin right panel column */
body.welcome-anonymous.nc-dark .col-auto.px-2.text-center,
body.welcome-anonymous.nc-light .col-auto.px-2.text-center {
  display: none !important;
}

/* ── FORM FIELD STYLING ── */
body.welcome-anonymous.nc-dark .form-label,
body.welcome-anonymous.nc-light .form-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nc-muted) !important;
  margin-bottom: 0.45rem;
  font-weight: 500;
  font-family: 'Barlow', sans-serif;
}

body.welcome-anonymous.nc-dark .form-control,
body.welcome-anonymous.nc-light .form-control {
  width: 100%;
  background: var(--nc-input-bg) !important;
  border: 1px solid var(--nc-border) !important;
  border-radius: 4px !important;
  color: var(--nc-text) !important;
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.welcome-anonymous.nc-dark .form-control::placeholder,
body.welcome-anonymous.nc-light .form-control::placeholder {
  color: var(--nc-muted) !important;
  opacity: 0.6;
}

body.welcome-anonymous.nc-dark .form-control:focus,
body.welcome-anonymous.nc-light .form-control:focus {
  border-color: var(--nc-accent) !important;
  box-shadow: 0 0 0 3px var(--nc-accent-soft) !important;
}

body.welcome-anonymous.nc-light .form-control:focus {
  background: #fff !important;
}

/* Login button */
body.welcome-anonymous.nc-dark .btn-primary,
body.welcome-anonymous.nc-light .btn-primary,
body.welcome-anonymous.nc-dark .form-footer .btn,
body.welcome-anonymous.nc-light .form-footer .btn {
  width: 100%;
  background: var(--nc-accent) !important;
  color: var(--nc-btn-text) !important;
  border: none !important;
  border-radius: 4px !important;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: var(--nc-btn-shadow);
}

body.welcome-anonymous.nc-dark .btn-primary:hover,
body.welcome-anonymous.nc-light .btn-primary:hover {
  background: var(--nc-accent-hover) !important;
}

body.welcome-anonymous.nc-dark .btn-primary:active,
body.welcome-anonymous.nc-light .btn-primary:active {
  transform: scale(0.985);
}

/* Remember me / forgot password */
body.welcome-anonymous.nc-dark .form-check-label,
body.welcome-anonymous.nc-light .form-check-label,
body.welcome-anonymous.nc-dark .form-label-description a,
body.welcome-anonymous.nc-light .form-label-description a,
body.welcome-anonymous.nc-dark .forgot_password a,
body.welcome-anonymous.nc-light .forgot_password a {
  color: var(--nc-muted) !important;
  font-size: 0.8rem;
}

body.welcome-anonymous.nc-dark .form-label-description a:hover,
body.welcome-anonymous.nc-light .form-label-description a:hover {
  color: var(--nc-accent) !important;
}

body.welcome-anonymous.nc-dark .form-check-input:checked,
body.welcome-anonymous.nc-light .form-check-input:checked {
  background-color: var(--nc-check-bg) !important;
  border-color: var(--nc-check-border) !important;
}

/* Footer */
body.welcome-anonymous.nc-dark .text-center.text-muted.mt-3,
body.welcome-anonymous.nc-light .text-center.text-muted.mt-3 {
  font-size: 0.7rem;
  color: var(--nc-muted) !important;
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin-top: 3rem !important;
  text-align: left !important;
}

body.welcome-anonymous.nc-dark .text-center.text-muted.mt-3 a,
body.welcome-anonymous.nc-light .text-center.text-muted.mt-3 a {
  color: var(--nc-muted) !important;
}

/* Select dropdown */
body.welcome-anonymous.nc-dark .form-select,
body.welcome-anonymous.nc-light .form-select {
  background-color: var(--nc-input-bg) !important;
  border: 1px solid var(--nc-border) !important;
  color: var(--nc-text) !important;
  border-radius: 4px !important;
}

/* FAQ button */
body.welcome-anonymous.nc-dark .btn-outline-secondary,
body.welcome-anonymous.nc-light .btn-outline-secondary {
  color: var(--nc-muted) !important;
  border-color: var(--nc-border) !important;
}

/* ── ANIMATIONS ── */
@keyframes ncFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nc-form-inner > * {
  animation: ncFadeUp 0.5s ease both;
}
.nc-form-inner > *:nth-child(1) { animation-delay: 0.05s; }
.nc-form-inner > *:nth-child(2) { animation-delay: 0.10s; }
.nc-form-inner > *:nth-child(3) { animation-delay: 0.13s; }
.nc-form-inner > *:nth-child(4) { animation-delay: 0.16s; }
.nc-form-inner > *:nth-child(5) { animation-delay: 0.19s; }
.nc-form-inner > *:nth-child(6) { animation-delay: 0.22s; }
.nc-form-inner > *:nth-child(7) { animation-delay: 0.28s; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  body.welcome-anonymous.nc-dark .page-anonymous,
  body.welcome-anonymous.nc-light .page-anonymous {
    grid-template-columns: 1fr !important;
  }
  .nc-panel-image {
  display: flex;
  flex-direction: column;
    display: none;
  }
  .nc-panel-form {
    grid-column: 1;
    padding: 3rem 2rem;
  }
}
