@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../resources/fonts/playfair-display/PlayfairDisplay-var.ttf") format("truetype");
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../resources/fonts/montserrat/Montserrat-var.ttf") format("truetype");
}

:root {
  --nicc-green: #3f5d3f;
  --nicc-green-secondary: #a7b080;
  --nicc-green-dark: #2f4530;
  --nicc-green-deep: #687f5b;

  --nicc-ivory: #f7f5ef;
  --nicc-cream: #e9eddf;
  --nicc-sand: #d6c6a8;

  --nicc-gold: #b8996b;
  --nicc-gold-light: #d2b892;

  --nicc-terracotta: #b47768;

  --nicc-text: #2c3329;
  --nicc-muted: #6d7568;

  --nicc-border: #d9dfd0;

  --nicc-radius: 18px;

  --nicc-font-title: "Playfair Display", Georgia, "Times New Roman", serif;
  --nicc-font-ui: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


/* =========================================================
   BASE
   ========================================================= */

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  font-family: var(--nicc-font-ui);

  color: var(--nicc-text);

  background-color: var(--nicc-cream);
  background-image:
    linear-gradient(
      105deg,
      rgba(233, 237, 223, 0.14) 0%,
      rgba(233, 237, 223, 0.05) 42%,
      rgba(247, 245, 239, 0.12) 100%
    ),
    url("../images/nicc-atelier-bg.png");
  /* Centrado exacto + llena el navegador al redimensionar */
    background-repeat:no-repeat;
    background-size:contain;
    background-position:center center;
    background-attachment: fixed;
}


/* =========================================================
   LOGIN SHELL — solo layout, sin panel visual
   ========================================================= */

.login-shell {
  width: min(1080px, calc(100% - 40px));
  min-height: 640px;

  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: stretch;

  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}


/* =========================================================
   BRAND PANEL — sin caja; se ve el fondo de atelier
   ========================================================= */

.brand-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 640px;
  overflow: hidden;
  background: transparent !important;
  box-shadow: none !important;
}


/*
 * La imagen de atelier ya incluye logo y claim.
 * Se oculta el overlay HTML para no duplicar marca.
 */

.brand-card::before,
.brand-card::after {
  display: none;
}


.brand-content {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* =========================================================
   LOGO
   ========================================================= */

.brand-logo-wrapper {
  width: 190px;
  height: 190px;

  margin: 0 auto 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: rgba(250, 248, 242, 0.97);

  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.15);
}


.brand-logo {
  width: 155px;
  height: 155px;

  object-fit: contain;
}


/* =========================================================
   BRAND TYPOGRAPHY
   ========================================================= */

.brand-name {
  margin-top: 5px;

  font-family: var(--nicc-font-title);

  font-size: 34px;

  letter-spacing: 8px;

  font-weight: 400;
}


.brand-subtitle {
  margin-top: 5px;

  font-size: 11px;

  letter-spacing: 4px;

  opacity: 0.85;
}


.brand-divider {
  width: 55px;
  height: 1px;

  margin: 25px auto;

  background: var(--nicc-gold);
}


.brand-description {
  font-family: var(--nicc-font-title);

  font-size: 17px;

  line-height: 1.7;

  letter-spacing: 1px;
}


.brand-motto {
  margin-top: 35px;

  font-size: 11px;

  letter-spacing: 3px;

  text-transform: uppercase;

  color: var(--nicc-gold-light);
}


/* =========================================================
   FORM PANEL — card flotante a la derecha
   ========================================================= */

.form-card {
  display: flex;
  flex-direction: column;
  justify-content: center;

  margin: 48px 0;
  padding: 56px 52px;

  background: #f7f5ef !important;
  border: 1px solid rgba(217, 223, 208, 0.9) !important;
  border-radius: 24px !important;
  box-shadow:
    0 24px 60px rgba(41, 55, 47, 0.20),
    0 4px 16px rgba(41, 55, 47, 0.08) !important;
}


.form-header {
  margin-bottom: 35px;
}


.eyebrow {
  margin-bottom: 12px;

  color: var(--nicc-green);

  font-size: 11px;

  font-weight: 700;

  letter-spacing: 2.5px;

  text-transform: uppercase;
}


.form-card h1 {
  margin: 0;

  font-family: var(--nicc-font-title);

  font-size: 38px;

  line-height: 1.15;

  font-weight: 400;

  color: var(--nicc-green-dark);
}


.subtitle {
  margin: 14px 0 0;

  color: var(--nicc-muted);

  font-size: 14px;
}


/* =========================================================
   FORM FIELDS
   ========================================================= */

.field {
  margin-bottom: 22px;
}


.field label {
  display: block;

  margin-bottom: 8px;

  color: var(--nicc-text);

  font-size: 12px;

  font-weight: 600;

  letter-spacing: 0.5px;
}


.input-wrap {
  position: relative;
}


.input-icon {
  position: absolute;

  left: 16px;
  top: 50%;

  width: 19px;
  height: 19px;

  transform: translateY(-50%);

  color: var(--nicc-green);

  pointer-events: none;
}


.input-icon svg {
  width: 100%;
  height: 100%;

  fill: none;

  stroke: currentColor;

  stroke-width: 1.6;

  stroke-linecap: round;
  stroke-linejoin: round;
}


.input-wrap input {
  width: 100%;
  height: 52px;

  box-sizing: border-box;

  padding:
    0
    16px
    0
    48px;

  border: 1px solid var(--nicc-border);
  border-radius: 10px;

  outline: none;

  background: #fffdf9;

  color: var(--nicc-text);

  font-size: 14px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}


.input-wrap input::placeholder {
  color: #aaa99f;
}


.input-wrap input:hover {
  border-color: #c8c7bc;
}


.input-wrap input:focus {
  border-color: var(--nicc-green);

  background: #ffffff;

  box-shadow:
    0 0 0 3px rgba(86, 99, 84, 0.10);
}


/* =========================================================
   BUTTON
   ========================================================= */

.btn-nicc {
  width: 100%;
  height: 54px;

  margin-top: 10px;

  border: 0;
  border-radius: 10px;

  background:
    linear-gradient(
      135deg,
      var(--nicc-green),
      var(--nicc-green-dark)
    );

  color: #fff;

  font-size: 12px;

  font-weight: 700;

  letter-spacing: 2px;

  text-transform: uppercase;

  cursor: pointer;

  box-shadow:
    0 8px 20px rgba(53, 66, 56, 0.18);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}


.btn-nicc:hover {
  transform: translateY(-1px);

  box-shadow:
    0 12px 25px rgba(53, 66, 56, 0.24);
}


.btn-nicc:active {
  transform: translateY(0);
}


.btn-nicc:disabled {
  opacity: 0.6;

  cursor: not-allowed;

  transform: none;
}


/* =========================================================
   ALERTS
   ========================================================= */

.alert-nicc {
  margin-bottom: 20px;

  padding: 13px 15px;

  border-radius: 9px;

  font-size: 13px;
}


.alert-nicc-warning {
  background: #f3eddb;

  border: 1px solid #ded2ae;

  color: #71633a;
}


.alert-nicc-success {
  background: #e8eee8;

  border: 1px solid #c8d8ca;

  color: #47604c;
}


.alert-nicc-danger {
  background: #f4e5e2;

  border: 1px solid #dfc1bb;

  color: #805048;
}


/* =========================================================
   MIGRATION
   ========================================================= */

.migration-title {
  font-family: var(--nicc-font-title);

  color: var(--nicc-green-dark);

  font-weight: 400;
}


.migration-progress-bar {
  height: 6px;

  overflow: hidden;

  border-radius: 20px;

  background: var(--nicc-sand);
}


.migration-progress-bar .bar {
  height: 100%;
  width: 45%;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      var(--nicc-green),
      var(--nicc-gold)
    );

  animation:
    niccProgress 1.8s ease-in-out infinite;
}


.migration-status {
  color: var(--nicc-muted);
}


@keyframes niccProgress {

  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(250%);
  }

}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  margin-top: 30px;

  text-align: center;

  color: var(--nicc-muted);

  font-size: 11px;

  line-height: 1.7;
}


.footer strong {
  display: block;

  color: var(--nicc-green);

  font-weight: 600;

  letter-spacing: 0.5px;
}


.footer span {
  display: block;

  margin-top: 2px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 850px) {

  /*
   * Mobile: sin foto en el body ni en el brand.
   * Una sola marca: panel sólido + logo HTML.
   */
  body {
    padding: 20px 0;
    background: var(--nicc-cream) !important;
    background-image: none !important;
    background-attachment: scroll !important;
  }

  .login-shell {
    grid-template-columns: 1fr;
    width: min(520px, calc(100% - 30px));
    min-height: auto;
    margin: 0 auto;
  }

  .brand-card {
    min-height: auto;
    max-height: none;
    align-items: center;
    justify-content: center;
    padding: 28px 24px 24px;
    background:
      radial-gradient(
        ellipse at 20% 20%,
        rgba(255, 255, 255, 0.08),
        transparent 40%
      ),
      linear-gradient(
        160deg,
        var(--nicc-green) 0%,
        var(--nicc-green-dark) 100%
      ) !important;
  }

  .brand-content {
    position: relative;
    width: 100%;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    text-align: center;
    color: #f4f1e8;
  }

  .brand-logo-wrapper {
    width: 88px;
    height: 88px;
    margin: 0 auto 14px;
    background: rgba(247, 245, 239, 0.96);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  }

  .brand-logo {
    width: 72px;
    height: 72px;
  }

  .brand-name {
    margin-top: 0;
    font-size: 28px;
    letter-spacing: 6px;
    color: #f7f5ef;
  }

  .brand-subtitle {
    margin-top: 4px;
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--nicc-gold-light);
  }

  .brand-divider {
    width: 48px;
    height: 1px;
    margin: 16px auto;
    background: var(--nicc-gold);
  }

  .brand-description {
    font-size: 15px;
    line-height: 1.55;
    color: rgba(247, 245, 239, 0.92);
  }

  .brand-motto {
    margin-top: 14px;
    font-size: 10px;
    letter-spacing: 2.5px;
    color: var(--nicc-gold-light);
  }

  .form-card {
    margin: 16px 0 0;
    padding: 40px 32px;
  }
}


@media (max-width: 480px) {

  body {
    padding: 12px 0;
  }

  .login-shell {
    width: calc(100% - 20px);
  }

  .brand-card {
    padding: 22px 18px 20px;
  }

  .brand-logo-wrapper {
    width: 76px;
    height: 76px;
    margin-bottom: 12px;
  }

  .brand-logo {
    width: 62px;
    height: 62px;
  }

  .brand-name {
    font-size: 24px;
    letter-spacing: 5px;
  }

  .brand-subtitle {
    font-size: 10px;
  }

  .brand-description {
    font-size: 14px;
  }

  .form-card {
    margin: 12px 0 0;
    padding: 32px 22px;
    border-radius: 18px !important;
  }

  .form-card h1 {
    font-size: 32px;
  }
}
