/* ============================================================================
 * auth.css — Pantalla de acceso (liquid glass) con la paleta del cotizador.
 * ==========================================================================*/

/* El atributo hidden debe ganar aunque los formularios usen display:flex. */
.auth-gate[hidden], .auth-form[hidden], #auth-sol-pass-campo[hidden] { display: none !important; }
/* "Actualización" (top__meta) tiene display:flex en app.css; forzamos ocultarlo. */
.top__meta[hidden] { display: none !important; }
/* El chip de usuario va en el encabezado, alineado a la derecha y visible. */
.top .top__bar > #auth-chip { margin-left: auto; }

.pre-auth .app-shell,
.pre-auth .hoja,
.pre-auth .firma { filter: blur(2px); pointer-events: none; }

.auth-gate {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 15% 10%, #0A2E7A 0%, transparent 55%),
    radial-gradient(120% 90% at 85% 90%, #0568A6 0%, transparent 55%),
    linear-gradient(150deg, #061F5C 0%, #0A1836 55%, #04122E 100%);
  -webkit-font-smoothing: antialiased;
}
.auth-gate[hidden] { display: none; }

/* Tarjeta de cristal */
.auth-card {
  position: relative;
  width: 100%; max-width: 380px;
  padding: 30px 28px 30px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  color: #fff;
}

.auth-logo {
  width: 96px; height: 96px; margin: 0 auto 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .8);
  overflow: hidden;
}
.auth-logo img { width: 72%; height: 72%; object-fit: contain; }

.auth-form { display: flex; flex-direction: column; gap: 4px; }

.auth-field {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1.5px solid rgba(255, 255, 255, .4);
  padding: 10px 2px; margin-top: 14px;
}
.auth-field svg { width: 18px; height: 18px; color: rgba(255, 255, 255, .8); flex: 0 0 auto; }
.auth-field input {
  flex: 1; border: 0; background: transparent; outline: none;
  color: #fff; font-size: 15px; letter-spacing: .2px;
}
.auth-field input::placeholder { color: rgba(255, 255, 255, .6); }
.auth-field input:-webkit-autofill { -webkit-text-fill-color: #fff; transition: background-color 9999s; }
.auth-field:focus-within { border-bottom-color: #35C0F0; }

.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 16px 2px 4px; font-size: 12.5px; color: rgba(255, 255, 255, .85);
}
.auth-check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.auth-check input { width: 15px; height: 15px; accent-color: #00A8E0; }
.auth-link {
  background: none; border: 0; color: rgba(255, 255, 255, .85);
  font: inherit; cursor: pointer; text-decoration: none;
}
.auth-link:hover { color: #fff; text-decoration: underline; }

.auth-btn {
  margin-top: 18px; width: 100%; padding: 13px;
  border: 0; border-radius: 14px; cursor: pointer;
  font-size: 14px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #00A8E0 0%, #0568A6 100%);
  box-shadow: 0 12px 26px -10px rgba(5, 104, 166, .8), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .1s ease, box-shadow .15s ease, opacity .15s;
}
.auth-btn:hover { box-shadow: 0 16px 32px -10px rgba(5, 104, 166, .95); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { opacity: .7; cursor: default; }

.auth-msg {
  margin-top: 14px; padding: 9px 12px; border-radius: 10px;
  font-size: 12.5px; line-height: 1.35;
}
.auth-msg--error { background: rgba(220, 60, 60, .22); border: 1px solid rgba(255, 120, 120, .4); color: #ffdede; }
.auth-msg--info  { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); color: #eef4ff; }
.auth-msg--ok    { background: rgba(21, 163, 74, .24); border: 1px solid rgba(90, 220, 140, .45); color: #daffe6; }

/* Panel de solicitud (olvidé / desbloqueo) */
.auth-solicitud { display: flex; flex-direction: column; }
.auth-sol-head { text-align: center; margin-bottom: 8px; }
.auth-sol-head h3 { font-size: 18px; margin: 0 0 6px; }
.auth-sol-head p { font-size: 12.5px; color: rgba(255, 255, 255, .8); margin: 0; line-height: 1.4; }
.auth-solicitud textarea {
  margin-top: 14px; width: 100%; min-height: 64px; resize: vertical;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 12px;
  background: rgba(255, 255, 255, .08); color: #fff; padding: 10px; font: inherit; font-size: 13px; outline: none;
}
.auth-solicitud textarea::placeholder { color: rgba(255, 255, 255, .55); }
.auth-sol-actions { display: flex; gap: 10px; margin-top: 16px; }
.auth-sol-actions .auth-btn { margin-top: 0; }
.auth-sol-volver {
  flex: 0 0 auto; padding: 13px 16px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08);
  color: #fff; font: inherit; font-weight: 600;
}
.auth-foot {
  margin-top: 22px; text-align: center; font-size: 11px; color: rgba(255, 255, 255, .55);
  letter-spacing: .4px;
}

/* Chip de usuario + salir (en la barra superior de la app) */
.auth-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line, #E3E9ED);
}
.auth-chip__perfil { border: 0; background: none; cursor: pointer; text-align: left; display: flex; flex-direction: column; line-height: 1.2; padding: 0; }
.auth-chip__perfil:hover .auth-chip__nombre { text-decoration: underline; }
.auth-chip__nombre { font-weight: 700; font-size: 13px; color: var(--ink, #0E1620); }
.auth-chip__rol { font-size: 11px; color: var(--muted, #6A7C8A); }

/* Datos del perfil */
.perfil-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line, #E3E9ED); }
.perfil-datos > div { display: flex; flex-direction: column; }
.perfil-datos span { font-size: 11px; color: var(--muted, #6A7C8A); text-transform: uppercase; letter-spacing: .03em; }
.perfil-datos b { font-size: 14px; color: var(--ink, #0E1620); }
.perfil-cp .auth-msg { margin-top: 4px; }
.auth-chip__salir {
  border: 0; border-radius: 999px; cursor: pointer;
  padding: 5px 12px; font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #0568A6, #061F5C);
}
.auth-chip__salir:hover { filter: brightness(1.1); }

@media (max-width: 420px) {
  .auth-card { padding: 26px 20px; border-radius: 20px; }
  .auth-logo { width: 82px; height: 82px; }
}
