/* ============================================================
   BARATELY — Auth CSS (login admin + cliente-auth)
   ============================================================ */

:root {
  --bg:         #09090f;
  --surface:    #111118;
  --surface2:   #18181f;
  --border:     rgba(255,255,255,0.06);
  --border2:    rgba(255,255,255,0.12);
  --accent:     #6c5ce7;
  --accent-glow:rgba(108,92,231,0.25);
  --text:       #ededf5;
  --muted:      #6b6b82;
  --danger:     #e84343;
  --success:    #43c59e;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Fondo con gradiente radial sutil */
body::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 50%, rgba(108,92,231,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(67,197,158,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Grid pattern de fondo */
body::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* ─── WRAP ─────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  animation: fadeUp .45s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── BRAND ─────────────────────────────────────────────── */
.brand {
  text-align: center;
  margin-bottom: 32px;
}

.brand a { text-decoration: none; }

.brand-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 42px;
  letter-spacing: .12em;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.brand-tag {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ─── TABS ──────────────────────────────────────────────── */
.tabs {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
  border: none;
  background: none;
  font-family: 'DM Sans', sans-serif;
}

.tab.active { background: var(--accent); color: #fff; }

/* ─── CARD ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 0 60px rgba(0,0,0,.4), 0 0 0 1px var(--border);
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.card-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ─── PANEL (TAB CONTENT) ───────────────────────────────── */
.panel { display: none; }
.panel.active { display: block; }

.step { display: none; }
.step.active { display: block; }

/* ─── FIELDS ────────────────────────────────────────────── */
.field {
  margin-bottom: 18px;
  position: relative;
}

.field label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

.field input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}

.field input[type="checkbox"] {
  -webkit-appearance: auto;
  appearance: auto;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: none;
  border-radius: 3px;
  cursor: pointer;
  flex-shrink: 0;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.pin-wrap { position: relative; }
.pin-wrap input { padding-right: 46px; }

.toggle-pin {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  transition: color .2s;
}

.toggle-pin:hover { color: var(--text); }

.field-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* ─── BUTTON ────────────────────────────────────────────── */
.btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: opacity .2s, transform .1s, box-shadow .2s;
  letter-spacing: .04em;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { opacity: .9; box-shadow: 0 4px 24px var(--accent-glow); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ─── MENSAJES ──────────────────────────────────────────── */
.msg-box {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  margin-top: 14px;
  text-align: center;
  display: none;
}

.msg-box.show { display: block; }

.msg-box.err {
  background: rgba(232,67,67,.1);
  border: 1px solid rgba(232,67,67,.25);
  color: var(--danger);
}

.msg-box.ok {
  background: rgba(67,197,158,.1);
  border: 1px solid rgba(67,197,158,.25);
  color: var(--success);
}

/* ─── OTP ───────────────────────────────────────────────── */
.otp-wrap {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 18px 0;
}

.otp-input {
  width: 44px; height: 54px;
  text-align: center;
  font-size: 24px; font-weight: 700;
  font-family: 'DM Mono', monospace;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
}

.otp-input:focus { border-color: var(--accent); }

.otp-timer {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 12px;
}

.otp-timer span {
  color: var(--accent);
  font-family: 'DM Mono', monospace;
}

/* ─── MISC ──────────────────────────────────────────────── */
.back-link {
  background: none; border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 16px;
  padding: 0;
  display: flex; align-items: center; gap: 4px;
}

.back-link:hover { color: var(--text); }

.link-muted {
  background: none; border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
}

.link-hint {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

/* ─── FOOTER ────────────────────────────────────────────── */
.footer {
  text-align: center;
  margin-top: 24px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

.footer a:hover { color: var(--text); }
