/* Gokiebox Préstamos — auth screens */

:root {
  --gk-bg: #0b1220;
  --gk-bg-2: #111a2e;
  --gk-panel: #ffffff;
  --gk-text: #0f172a;
  --gk-text-2: #475569;
  --gk-muted: #94a3b8;
  --gk-border: #e2e8f0;
  --gk-border-strong: #cbd5e1;
  --gk-primary: #0ea5a5;
  --gk-primary-600: #0d9494;
  --gk-primary-700: #0a7a7a;
  --gk-primary-soft: #e6fbfa;
  --gk-accent: #22d3ee;
  --gk-danger: #ef4444;
  --gk-success: #16a34a;
  --gk-shadow-1: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --gk-shadow-2: 0 10px 30px rgba(15,23,42,.10), 0 2px 6px rgba(15,23,42,.06);
  --gk-radius: 12px;
  --gk-radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: #f8fafc;
  color: var(--gk-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

/* Server detectó mobile → solo 1 columna, sin importar viewport */
.auth-shell.auth-shell--mobile { grid-template-columns: 1fr; }
.auth-shell--mobile .mobile-brand { display: flex; }

@media (max-width: 1024px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
}

/* ---------- Brand panel ---------- */
.auth-brand {
  position: relative;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(14,165,165,.35), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(34,211,238,.18), transparent 55%),
    linear-gradient(160deg, var(--gk-bg) 0%, var(--gk-bg-2) 100%);
  color: #e6edf7;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(900px 600px at 70% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gk-primary) 0%, var(--gk-accent) 100%);
  display: grid;
  place-items: center;
  color: #06262a;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  box-shadow: 0 8px 24px rgba(14,165,165,.35);
  overflow: hidden;
}
.brand-logo img { max-width: 100%; max-height: 100%; }

.brand-logo-img {
  max-height: 64px;
  max-width: 220px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.25));
}
.mobile-brand .brand-logo-img {
  max-height: 64px;
  max-width: 220px;
  filter: none;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #fff;
}

.brand-name span {
  color: var(--gk-accent);
  font-weight: 500;
  margin-left: 6px;
}

.brand-hero {
  position: relative;
  z-index: 1;
  max-width: 460px;
}

.brand-hero h1 {
  font-size: 38px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin: 0 0 16px 0;
  color: #fff;
}

.brand-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--gk-accent), #5eead4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-hero p {
  font-size: 16px;
  color: #b6c3d8;
  margin: 0 0 32px 0;
}

.brand-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.brand-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: #cbd5e1;
}

.brand-points svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--gk-accent);
}

.brand-foot {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-foot a {
  color: #94a3b8;
  text-decoration: none;
}

.brand-foot a:hover { color: #e2e8f0; }

/* ---------- Form panel ---------- */
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: #f8fafc;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.6px;
  margin: 0 0 8px 0;
  color: var(--gk-text);
}

.auth-card .lead {
  margin: 0 0 32px 0;
  color: var(--gk-text-2);
  font-size: 15px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gk-text);
  margin-bottom: 6px;
}

.input-wrap {
  position: relative;
}

.input-wrap .lead-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gk-muted);
  pointer-events: none;
  display: flex;
}

.input-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--gk-border);
  border-radius: var(--gk-radius-sm);
  background: #fff;
  color: var(--gk-text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  outline: none;
}

.input-wrap input::placeholder { color: var(--gk-muted); }

.input-wrap input:hover { border-color: var(--gk-border-strong); }

.input-wrap input:focus {
  border-color: var(--gk-primary);
  box-shadow: 0 0 0 4px rgba(14,165,165,.12);
  background: #fff;
}

.input-wrap.has-toggle input { padding-right: 44px; }

.toggle-pwd {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--gk-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}

.toggle-pwd:hover { color: var(--gk-text); background: #f1f5f9; }

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 24px 0;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gk-text-2);
  cursor: pointer;
  user-select: none;
}

.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--gk-border-strong);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  margin: 0;
  transition: border-color .15s, background .15s;
}

.check input:checked {
  background: var(--gk-primary);
  border-color: var(--gk-primary);
}

.check input:checked::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M13.5 4.5l-7 7-3-3 1.4-1.4L6.5 8.7l5.6-5.6z'/></svg>") center/contain no-repeat;
}

.btn-primary {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: var(--gk-radius-sm);
  background: var(--gk-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, transform .05s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(14,165,165,.25);
}

.btn-primary:hover { background: var(--gk-primary-600); }

.btn-primary:active { transform: translateY(1px); box-shadow: 0 2px 6px rgba(14,165,165,.25); }

.btn-primary:disabled {
  background: var(--gk-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-primary .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: gk-spin .7s linear infinite;
  display: none;
}

.btn-primary.is-loading .spinner { display: block; }
.btn-primary.is-loading .label { opacity: .7; }

@keyframes gk-spin { to { transform: rotate(360deg); } }

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--gk-radius-sm);
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #991b1b;
  font-size: 13.5px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.alert svg { flex-shrink: 0; margin-top: 2px; }

.suspend-card {
  margin-bottom: 18px;
  padding: 22px 22px 18px;
  border-radius: var(--gk-radius-sm, 10px);
  background: linear-gradient(145deg, #fff7ed 0%, #fff1f2 100%);
  border: 1px solid #fed7aa;
  text-align: center;
  box-shadow: 0 4px 14px rgba(220,38,38,.08);
  animation: suspend-fade .35s ease-out;
}
@keyframes suspend-fade {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.suspend-emoji {
  font-size: 54px;
  line-height: 1;
  margin-bottom: 8px;
  display: inline-block;
  animation: suspend-bounce 2.4s ease-in-out infinite;
}
@keyframes suspend-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.suspend-title {
  font-size: 19px;
  font-weight: 700;
  color: #9a3412;
  margin: 4px 0 8px;
}
.suspend-text {
  font-size: 13.5px;
  color: #7c2d12;
  line-height: 1.55;
  margin: 0 0 14px;
}
.suspend-text strong { color: #b91c1c; }
.suspend-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}
.suspend-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .12s, box-shadow .12s;
  border: 1px solid transparent;
}
.suspend-cta:hover { transform: translateY(-1px); text-decoration: none; }
.suspend-cta.wa { background: #16a34a; color: #fff; box-shadow: 0 2px 6px rgba(22,163,74,.25); }
.suspend-cta.wa:hover { background: #15803d; color: #fff; }
.suspend-cta.mail { background: #fff; color: #7c2d12; border-color: #fed7aa; }
.suspend-cta.mail:hover { background: #fff7ed; color: #9a3412; }
.suspend-foot {
  font-size: 11.5px;
  color: #9a3412;
  margin: 0;
  opacity: .8;
}

.auth-foot {
  margin-top: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--gk-muted);
}

.mobile-brand {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 24px 0;
}

@media (max-width: 1024px) {
  .mobile-brand { display: flex; }
  .auth-form-wrap { padding: 32px 22px; }
  .auth-card h2 { font-size: 24px; text-align: center; }
  .auth-card .lead { text-align: center; }
}

/* Pantallas pequeñas (iPhone, Android estándar) — apretado al borde */
@media (max-width: 520px) {
  .auth-form-wrap { padding: 20px 14px; }
  .auth-card h2 { font-size: 22px; }
  .auth-card .lead { font-size: 14px; margin-bottom: 22px; }
  .mobile-brand { margin: 0 0 20px 0; }
  .mobile-brand .brand-logo-img { max-height: 56px; max-width: 200px; }
  .auth-foot { margin-top: 22px; font-size: 12.5px; }
  .input-wrap input { font-size: 16px; }   /* evita zoom en iOS al enfocar */
}

/* tiny brand-name color override for mobile (light bg) */
.mobile-brand .brand-name { color: var(--gk-text); }
.mobile-brand .brand-name span { color: var(--gk-primary); }
