/* ============================================================
   GCG Design System V1 — Autenticación
   Modal gamer con panel visual editable por SuperAdmin.
   ============================================================ */

.gcg-auth-modal__vista[hidden] { display: none; }
.gcg-auth-modal {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: min(980px, calc(100vw - 24px));
  max-height: min(92vh, 900px);
  overflow: hidden;
  border-radius: 0;
  border: 1px solid rgba(244, 166, 42, .24);
  background: linear-gradient(135deg, #0b1014 0%, #090d12 100%);
  clip-path: polygon(0 18px, 18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
  box-shadow: 0 45px 120px rgba(0, 0, 0, .62);
}
.gcg-auth-modal::before,
.gcg-auth-modal::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.gcg-auth-modal::before {
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .04);
  clip-path: inherit;
}
.gcg-auth-modal::after {
  top: 0;
  right: 0;
  width: 180px;
  height: 2px;
  background: linear-gradient(90deg, rgba(244, 166, 42, 0), rgba(244, 166, 42, .92));
}
.gcg-auth-modal .gcg-modal__header {
  position: relative;
  z-index: 3;
  padding: 20px 24px 18px;
  background: linear-gradient(180deg, rgba(5, 8, 10, .90), rgba(5, 8, 10, .56));
  backdrop-filter: blur(10px);
}
.gcg-auth-modal .gcg-modal__body { padding: 0; background: transparent; }
.gcg-auth-modal__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--gcg-accent);
  font-family: var(--gcg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.gcg-auth-modal__layout {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(420px, 1.05fr);
  min-height: 600px;
}
.gcg-auth-modal__media {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: #070a0d;
}
.gcg-auth-modal__media-img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  opacity:0;
  transition:opacity .35s ease;
}
.gcg-auth-modal__media-img--login { opacity:1; }
.gcg-auth-modal[data-gcg-auth-view="registro"] .gcg-auth-modal__media-img--login,
.gcg-auth-modal[data-gcg-auth-view="recuperar_password"] .gcg-auth-modal__media-img--login,
.gcg-auth-modal[data-gcg-auth-view="restablecer_password"] .gcg-auth-modal__media-img--login,
.gcg-auth-modal[data-gcg-auth-view="codigo_admin"] .gcg-auth-modal__media-img--login { opacity:0; }
.gcg-auth-modal[data-gcg-auth-view="registro"] .gcg-auth-modal__media-img--registro { opacity:1; }
.gcg-auth-modal[data-gcg-auth-view="recuperar_password"] .gcg-auth-modal__media-img--reset,
.gcg-auth-modal[data-gcg-auth-view="restablecer_password"] .gcg-auth-modal__media-img--reset,
.gcg-auth-modal[data-gcg-auth-view="codigo_admin"] .gcg-auth-modal__media-img--reset { opacity:1; }
.gcg-auth-modal__media::before {
  content: "";
  position: absolute;
  z-index:2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 68px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 68px),
    linear-gradient(135deg, rgba(244,166,42,.12), rgba(8,12,16,.04) 55%),
    linear-gradient(180deg, rgba(7, 10, 13, .08) 0%, rgba(7, 10, 13, .74) 100%);
  background-size:100% 68px,68px 100%,auto,auto;
  opacity:.58;
}
.gcg-auth-modal__media::after {
  content: "";
  position: absolute;
  z-index:3;
  inset: auto 18px 18px 18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(244, 166, 42, .82), rgba(244, 166, 42, 0));
}
.gcg-auth-modal__content {
  min-width: 0;
  overflow-y: auto;
  padding: 28px 24px 26px;
  background:
    linear-gradient(180deg, rgba(5, 8, 10, .97), rgba(8, 12, 15, .97)),
    radial-gradient(circle at 100% 0, rgba(244, 166, 42, .09), transparent 42%);
}
.gcg-auth-modal__content::-webkit-scrollbar { width: 10px; }
.gcg-auth-modal__content::-webkit-scrollbar-thumb { background: rgba(244, 166, 42, .42); border-radius: 0; }
.gcg-auth-modal__intro { margin-bottom: 18px; }
.gcg-auth-modal__panel-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(244, 166, 42, .28);
  background: rgba(255, 255, 255, .02);
  color: var(--gcg-accent);
  font-family: var(--gcg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  clip-path: polygon(0 8px, 8px 0, 100% 0, 100% 100%, 0 100%);
}
.gcg-auth-card__subtitulo {
  margin: 0;
  max-width: 470px;
  color: var(--gcg-text-secondary);
  font-size: 14px;
  line-height: 1.75;
}
.gcg-auth-form { display: flex; flex-direction: column; gap: 14px; }
.gcg-auth-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.gcg-auth-form__field--span-2 { grid-column: 1 / -1; }
.gcg-auth-form__label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.gcg-auth-form__row-inline {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .018);
  clip-path: polygon(0 10px, 10px 0, 100% 0, 100% 100%, 0 100%);
}
.gcg-auth-form__row-inline .gcg-checkbox {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--gcg-accent);
}
.gcg-auth-form__row-inline label {
  color: var(--gcg-text-secondary);
  font-size: 12px;
  line-height: 1.55;
}
.gcg-auth-modal__help-box {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .02);
  color: var(--gcg-text-secondary);
  font-size: 12px;
  line-height: 1.7;
  clip-path: polygon(0 10px, 10px 0, 100% 0, 100% 100%, 0 100%);
}
.gcg-auth-modal .gcg-field { gap: 8px; }
.gcg-auth-modal .gcg-label {
  font-size: 11px;
  font-weight: 700;
  color: #c5ccd2;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.gcg-auth-modal .gcg-input,
.gcg-auth-modal .gcg-select {
  height: 48px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(6, 10, 13, .95), rgba(8, 12, 15, .95));
  clip-path: polygon(0 10px, 10px 0, 100% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}
.gcg-auth-modal .gcg-input:focus,
.gcg-auth-modal .gcg-select:focus {
  border-color: var(--gcg-accent);
  box-shadow: 0 0 0 3px rgba(244, 166, 42, .12), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.gcg-auth-modal .gcg-select option { background: #0b1014; color: #fff; }
.gcg-auth-card__captcha {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 78px;
  overflow: hidden;
}
.gcg-auth-modal .gcg-btn {
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: .10em;
  font-weight: 700;
  clip-path: polygon(0 12px, 12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}
.gcg-auth-modal .gcg-btn--lg { height: 48px; }
.gcg-auth-modal .gcg-btn--primary {
  background: linear-gradient(90deg, #f4a62a 0%, #ffc86a 100%);
  color: #111;
  border-color: #f4a62a;
}
.gcg-auth-modal .gcg-btn--primary:hover:not(:disabled) {
  box-shadow: 0 18px 36px rgba(244, 166, 42, .26);
  transform: translateY(-1px);
}
.gcg-link-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--gcg-accent);
  font-weight: 700;
  cursor: pointer;
}
.gcg-link-btn:hover { text-decoration: underline; }
.gcg-alerta {
  display: none;
  align-items: flex-start;
  gap: var(--gcg-space-2);
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 0;
  font-size: 13px;
  line-height: 1.6;
  clip-path: polygon(0 10px, 10px 0, 100% 0, 100% 100%, 0 100%);
}
.gcg-alerta--visible { display: flex; }
.gcg-alerta--error { background: var(--gcg-danger-bg); border: 1px solid rgba(239, 68, 68, .3); color: var(--gcg-danger); }
.gcg-alerta--exito { background: var(--gcg-success-bg); border: 1px solid rgba(34, 197, 94, .3); color: var(--gcg-success); }
.gcg-auth-card__pie {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--gcg-text-secondary);
}

@media (max-width: 1024px) {
  .gcg-auth-modal { width: min(720px, calc(100vw - 20px)); }
  .gcg-auth-modal__layout { grid-template-columns: 1fr; min-height: auto; }
  .gcg-auth-modal__media { min-height: 240px; }
}
@media (max-width: 640px) {
  .gcg-auth-modal { max-height: 94vh; clip-path: none; }
  .gcg-auth-modal::before { clip-path: none; }
  .gcg-auth-modal__content { padding: 22px 16px 22px; }
  .gcg-auth-modal__media { min-height: 190px; }
  .gcg-auth-form__grid { grid-template-columns: 1fr; }
  .gcg-auth-form__field--span-2 { grid-column: auto; }
  .gcg-auth-form__label-row { align-items: flex-start; flex-direction: column; }
  .gcg-auth-card__captcha { justify-content: flex-start; }
}
@media (max-width: 380px) {
  .gcg-auth-modal .gcg-input,
  .gcg-auth-modal .gcg-select { height: 46px; }
  .gcg-auth-card__captcha > div { transform: scale(.88); transform-origin: left top; width: 304px; }
}

/* Registro: controles accesibles y estado de envío. */
.gcg-password-control { position:relative; }
.gcg-password-control .gcg-input { padding-right:48px; }
.gcg-password-eye { position:absolute; right:4px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:40px; height:40px; border:0; background:transparent; color:var(--gcg-accent,#f4a62a); cursor:pointer; }
.gcg-password-eye svg { width:22px; height:22px; }
.gcg-password-eye .gcg-eye-slash { display:none; }
.gcg-password-eye[aria-pressed="true"] .gcg-eye-slash { display:block; }
.gcg-password-eye:focus-visible { outline:2px solid var(--gcg-accent,#f4a62a); outline-offset:-2px; }
.gcg-registro-estado { display:block; min-height:18px; margin-top:5px; font-size:12px; line-height:1.4; color:#b5c0c8; }
.gcg-registro-estado[data-state="error"] { color:#ff9c9c; }
.gcg-registro-estado[data-state="ok"] { color:#7cd9ac; }
#gcg-registro-submit:disabled::before { content:""; display:inline-block; width:16px; height:16px; margin-right:10px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:gcg-registro-spin .8s linear infinite; }
@keyframes gcg-registro-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { #gcg-registro-submit:disabled::before { animation:none; } }
