/*
----------------------------------------------------------------
Ride+ by Polaris
Sistema administrativo federativo

© Ride+ / Polaris
Propiedad intelectual de Lucas Piriz
Todos los derechos reservados

Archivo: consulta-licencia.css
Descripción: UI premium para pantalla pública consulta de licencia.
----------------------------------------------------------------
*/

:root{
  --rx-bg: #f6f7fb;
  --rx-surface: #ffffff;
  --rx-text: #0f172a;
  --rx-muted: #64748b;
  --rx-border: #e5e7eb;
  --rx-shadow: 0 14px 40px rgba(2, 6, 23, 0.10);
  --rx-shadow-soft: 0 10px 26px rgba(2, 6, 23, 0.08);
  --rx-radius: 18px;
  --rx-radius-sm: 14px;
  --rx-accent: #111827;
  --rx-focus: rgba(17, 24, 39, 0.18);
  --rx-danger: #dc3545;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  background:
    radial-gradient(1100px 360px at 50% -140px, rgba(15, 23, 42, 0.08), transparent 62%),
    radial-gradient(900px 300px at 12% 0px, rgba(13, 110, 253, 0.10), transparent 55%),
    radial-gradient(900px 300px at 88% 0px, rgba(25, 135, 84, 0.08), transparent 55%),
    var(--rx-bg);
  color: var(--rx-text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::placeholder{
  color: rgba(100, 116, 139, 0.75);
}

/* Header */
.rx-header{
  padding: 20px 14px 10px;
  text-align: center;
}

.rx-logos{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  user-select: none;
}

.rx-logo{
  height: 72px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 600px){
  .rx-logo{ height: 62px; }
}

/* Container / Shell */
.rx-container{
  margin-top: 12px;
  margin-bottom: 40px;
  max-width: 1120px;
}

.rx-shell{
  border: 1px solid rgba(229, 231, 235, 0.90);
  border-radius: var(--rx-radius);
  box-shadow: var(--rx-shadow);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.rx-shell-head{
  padding: 22px 22px 14px;
}

.rx-title{
  margin: 0 0 6px 0;
  font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--rx-accent);
  font-size: 1.65rem;
}

.rx-subtitle{
  margin: 0;
  color: var(--rx-muted);
  font-weight: 400;
  line-height: 1.35;
}

.rx-shell-body{
  padding: 0 22px 20px;
}

.rx-divider{
  height: 1px;
  background: rgba(229, 231, 235, 0.95);
  margin: 14px 0 18px;
}

/* Mode bar */
.rx-modebar{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.rx-mode-label{
  font-weight: 800;
  color: rgba(15, 23, 42, 0.88);
}

/* Segmented */
.rx-segmented{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: rgba(255,255,255,0.72);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
}

.rx-seg-btn{
  border: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: rgba(15, 23, 42, 0.62);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
  cursor: pointer;
}

.rx-seg-btn:hover{ transform: translateY(-1px); }

.rx-seg-btn.is-active{
  background: rgba(17,24,39,0.94);
  color: #fff;
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.12);
}

/* Form */
.rx-form{ padding: 0; margin: 0; }

.rx-form-row{
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Inputs pequeños (ya lo tenías) */
.rx-field{ width: 100%; }
.rx-field--doc{ max-width: 360px; }
.rx-field--lic{ max-width: 240px; }

/* ✅ Floating label container */
.rx-float{
  position: relative;
  width: 100%;
}

/* Input base */
.rx-input{
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--rx-radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(255, 255, 255, 0.98);
  font-size: 1.05rem;
  box-shadow: 0 1px 0 rgba(2, 6, 23, 0.02);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

/* ✅ Input con label flotante: dejamos espacio arriba */
.rx-input--float{
  padding-top: 24px;  /* espacio para label */
  padding-bottom: 12px;
}

/* Focus */
.rx-input:focus{
  outline: none;
  border-color: rgba(17, 24, 39, 0.55);
  box-shadow: 0 0 0 4px var(--rx-focus);
  transform: translateY(-1px);
}

/* ✅ Label dentro */
.rx-float-label{
  position: absolute;
  left: 14px;
  top: 10px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.80);
  font-size: 0.98rem;
  line-height: 1;
  pointer-events: none;
  transform-origin: left top;
  transition: transform .14s ease, opacity .14s ease, color .14s ease;
}

/* ✅ Estado "placeholder": si está vacío, label se baja y queda tipo hint */
.rx-input--float:placeholder-shown + .rx-float-label{
  transform: translateY(14px) scale(1);
  opacity: 0.65;
  color: rgba(100, 116, 139, 0.95);
}

/* ✅ Cuando hay valor o foco: label sube */
.rx-input--float:focus + .rx-float-label{
  transform: translateY(0px) scale(0.92);
  opacity: 0.95;
  color: rgba(15, 23, 42, 0.88);
}

/* Mantener label arriba si hay contenido */
.rx-input--float:not(:placeholder-shown) + .rx-float-label{
  transform: translateY(0px) scale(0.92);
  opacity: 0.95;
}

/* Help */
.rx-help{
  margin-top: 10px;
  font-size: 0.92rem;
  color: rgba(100, 116, 139, 0.95);
}

/* Actions */
.rx-actions{ flex: 0 0 auto; }

.rx-btn{
  height: 46px;
  border-radius: var(--rx-radius-sm) !important;
  padding: 0 18px;
  font-weight: 900;
  letter-spacing: 0.01em;
  border: 1px solid rgba(17, 24, 39, 0.90) !important;
  background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(11,18,32,0.98)) !important;
  box-shadow: var(--rx-shadow-soft);
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.rx-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.12);
}

.rx-btn:disabled{
  opacity: .72;
  transform: none;
  box-shadow: var(--rx-shadow-soft);
}

.rx-spinner{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.45);
  border-top-color: rgba(255,255,255,0.95);
  animation: rxSpin 0.8s linear infinite;
  display: inline-block;
}
@keyframes rxSpin{ to{ transform: rotate(360deg); } }

.rx-error{
  margin-top: 12px;
  color: var(--rx-danger);
  font-size: 0.95rem;
  font-weight: 700;
}

.rx-hidden{ display: none !important; }

/* Results animation */
.rx-results{
  animation: rxFadeUp .20s ease-out both;
}
@keyframes rxFadeUp{
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -------------------------
   RESULTADOS PREMIUM (no tocamos)
------------------------- */

.rx-person{ padding: 8px 0 0; }

.rx-person-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 14px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.95);
}

.rx-person-name{
  margin: 0;
  font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(15, 23, 42, 0.92);
  font-size: 1.25rem;
  line-height: 1.15;
}

.rx-person-meta{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rx-chip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: rgba(255,255,255,0.80);
  color: rgba(15, 23, 42, 0.86);
  font-weight: 900;
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
}

.rx-role{
  margin-top: 14px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: var(--rx-radius);
  background: rgba(255,255,255,0.86);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
  overflow: hidden;
}

.rx-role-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.95);
}

.rx-role-title{
  margin: 0;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.88);
}

.rx-role-sub{
  margin: 6px 0 0;
  color: rgba(100, 116, 139, 0.95);
  font-weight: 600;
}

.rx-role-meta{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rx-role-body{ padding: 14px 16px 16px; }

.rx-role-grid{
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  align-items: start;
}

.rx-dl{
  margin: 0;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px 12px;
}

.rx-dt{
  margin: 0;
  color: rgba(15, 23, 42, 0.72);
  font-weight: 900;
}

.rx-dd{
  margin: 0;
  color: rgba(15, 23, 42, 0.92);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.rx-actions-box{
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  justify-content: center;
}

.rx-note{
  margin: 0;
  font-size: 0.92rem;
  color: rgba(100, 116, 139, 0.95);
  font-weight: 600;
}

.rx-state-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.01em;
  border: 1px solid rgba(229,231,235,0.95);
  box-shadow: 0 10px 22px rgba(2,6,23,0.06);
  line-height: 1;
  white-space: nowrap;
}

.rx-state-badge.is-success{
  background: rgba(25, 135, 84, 0.10);
  border-color: rgba(25, 135, 84, 0.22);
  color: #146c43;
}
.rx-state-badge.is-warning{
  background: rgba(255, 193, 7, 0.18);
  border-color: rgba(255, 193, 7, 0.28);
  color: #8a6d00;
}
.rx-state-badge.is-danger{
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.22);
  color: #b02a37;
}
.rx-state-badge.is-neutral{
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
  color: rgba(15, 23, 42, 0.72);
}

.rx-info{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: rgba(255,255,255,0.90);
  color: rgba(15, 23, 42, 0.85);
  font-weight: 900;
  font-size: 0.85rem;
  cursor: help;
}

.generarPDF{
  border-radius: var(--rx-radius-sm) !important;
  font-weight: 900 !important;
  letter-spacing: 0.01em;
  padding: 12px 16px !important;
  border: 1px solid rgba(25, 135, 84, 0.65) !important;
  background: linear-gradient(180deg, rgba(25,135,84,0.96), rgba(16,102,63,0.98)) !important;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.10);
  color: #fff !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: transform .16s ease, box-shadow .16s ease;
}

.generarPDF:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.12);
}

.alert{
  border-radius: var(--rx-radius-sm);
  border: 1px solid rgba(229, 231, 235, 0.95);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
}

/* Responsive */
@media (max-width: 900px){
  .rx-role-grid{ grid-template-columns: 1fr; }
  .rx-actions-box{ align-items: stretch; }
}

@media (max-width: 600px){
  .rx-shell-head{ padding: 18px 16px 12px; }
  .rx-shell-body{ padding: 0 16px 18px; }
  .rx-form-row{ flex-direction: column; align-items: stretch; }
  .rx-actions{ width: 100%; }
  .rx-btn{ width: 100%; justify-content: center; }

  .rx-field--doc, .rx-field--lic{ max-width: none; }

  .rx-person-head{ flex-direction: column; }
  .rx-role-head{ flex-direction: column; }
  .rx-role-meta{ justify-content: flex-start; }
  .rx-dl{ grid-template-columns: 1fr; }
}
