/* ===============================
   GLOBAL RESET
   =============================== */
* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ===============================
   PAGE BACKGROUND
   =============================== */
.ecx-page {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% 0%, #eef4ff 0%, #f5f7fb 45%, #f4f6f8 100%);
  display: flex;
  justify-content: center;
  align-items: flex-start;         /* evita sensación “pegado arriba” pero sin centrar vertical */
  padding: 54px 0 60px;            /* aire arriba y abajo */
}

/* ===============================
   TWO COLUMN AUTH LAYOUT
   =============================== */
.ecx-auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  width: 100%;
  max-width: 980px;
  padding: 0 24px;
  position: relative;
}

/* Separador vertical visual (sin tocar HTML) */
.ecx-auth-layout::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 50%;
  width: 1px;
  background: #e5e7eb;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.9;
}

/* ===============================
   AUTH CARD
   =============================== */
.ecx-auth-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 28px 28px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
  border: 1px solid #eef0f3;
}

/* ===============================
   CARD TITLE
   (no wrap + ellipsis para evitar “doble línea”)
   =============================== */
.ecx-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0b1f40;
  margin: 0 0 18px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===============================
   FORM LAYOUT
   =============================== */
.ecx-form {
  display: flex;
  flex-direction: column;
}

/* ===============================
   FLOATING LABELS (tu JS)
   =============================== */
.ecx-field {
  position: relative;
  margin-bottom: 14px;
  width: 100%;
  display: block;
}

/* Inputs más cómodos, pero mismos IDs y clases */
.ecx-field .ecx-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-size: 13.5px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  position: relative;
  z-index: 1;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

/* Mantiene tu validación visual por inline styles (rojo/verde/orange)
   sin pelearse demasiado con el CSS */
.ecx-field .ecx-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* Label: sin doble línea + ellipsis */
.ecx-field label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12.5px;
  color: #6b7280;
  background: #ffffff;
  padding: 0 6px;
  pointer-events: none;
  transition: all 0.16s ease;
  z-index: 2;
  max-width: calc(100% - 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Cuando flota */
.ecx-field.focused label,
.ecx-field.filled label {
  top: -9px;
  transform: none;
  font-size: 11px;
  color: #2563eb;
  z-index: 3;
}

/* ===============================
   BUTTONS
   =============================== */
.ecx-btn-primary,
.ecx-btn-secondary {
  margin-top: 10px;
  height: 40px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .06s ease, background-color .16s ease, border-color .16s ease;
}

.ecx-btn-primary {
  padding: 0 12px;
  background-color: #2563eb;
  color: white;
  border: 1px solid #2563eb;
}

.ecx-btn-primary:hover {
  background-color: #1e4fd8;
  border-color: #1e4fd8;
}

.ecx-btn-secondary {
  padding: 0 12px;
  background-color: white;
  color: #2563eb;
  border: 1px solid #2563eb;
}

.ecx-btn-secondary:hover {
  background-color: #2563eb;
  color: white;
}

.ecx-btn-primary:active,
.ecx-btn-secondary:active {
  transform: translateY(1px);
}

/* Disabled (tu JS desactiva submit) */
.ecx-btn-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ===============================
   CHECKBOX ROWS
   =============================== */
.ecx-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12.5px;
  color: #374151;
  margin-top: 12px;
  line-height: 1.35;
}

.ecx-checkbox input {
  margin-top: 2px;
}

/* ===============================
   LINKS BELOW LOGIN
   =============================== */
.ecx-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.ecx-links a {
  font-size: 12.5px;
  color: #2563eb;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ecx-links a:hover {
  text-decoration: underline;
}

/* ===============================
   FEEDBACK MESSAGE
   =============================== */
.ecx-msg {
  min-height: 16px;
  font-size: 12.5px;
  margin-top: 10px;
  color: #dc2626;
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 900px) {
  .ecx-page {
    padding: 28px 0 36px;
  }

  .ecx-auth-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 0 16px;
  }

  .ecx-auth-layout::after {
    display: none;
  }

  .ecx-auth-card {
    padding: 22px 18px;
    border-radius: 10px;
  }

  .ecx-card-title {
    font-size: 14px;
  }
}

/* =========================================================
   AUTH — LOGO SLOT UNDER LOGIN (visual only)
   ========================================================= */

/* Make cards behave as columns so we can fill remaining space */
.ecx-auth-card{
  display: flex;
  flex-direction: column;
}

/* Ensure the login form stays at the top and doesn't stretch weirdly */
#loginForm{
  flex: 0 0 auto;
}

/* The empty area becomes a flexible slot */
.ecx-auth-logo-slot{
  flex: 1 1 auto;
  margin-top: 14px;
  padding: 18px 22px 10px;
  border-top: 1px solid #eef0f3;

  display: flex;
  align-items: center;
  justify-content: center;

  /* prevents the slot from becoming tiny if content grows */
  min-height: 140px;
}

/* The logo itself */
.ecx-auth-logo{
  width: 100%;
  max-width: 440px;     /* ensures side margins */
  max-height: 240px;    /* keeps it inside the slot */
  object-fit: contain;
  display: block;
  opacity: 0.98;
}

/* Mobile: keep it clean and not too tall */
@media (max-width: 900px){
  .ecx-auth-logo-slot{
    min-height: 110px;
    padding: 14px 16px 6px;
  }
  .ecx-auth-logo{
    max-width: 360px;
    max-height: 170px;
  }
}

