/* =========================================================
   VARIABLES & RESET
   ========================================================= */
:root{
  /* Paleta base (tema clásico) */
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1a2433;
  --muted: #5a6b86;
  --border: #dfe6ef;
  --brand: #2563eb;
  --brand-2: #10b981;
  --danger: #d64141;
  --ok: #0f9d58;

  --field-bg: #ffffff;
  --field-bd: #cbd5e1;
  --field-fx: #2563eb;

  --shadow: 0 8px 22px rgba(16,24,40,.08);

  /* UI generics */
  --radius: 14px;

  /* PDF (vista previa en pantalla ~ A4 a 96dpi) */
  --pdf-width: 794px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Tema arena (opcional) */
body[data-theme="arena"]{
  --bg: #fbf8f3;
  --card: #ffffff;
  --text: #3a3328;
  --muted: #7d6f58;
  --border: #eadfce;
  --brand: #c36a1f;
  --brand-2: #3f8f7b;
  --danger: #c04a4a;
  --ok: #2e8a57;
  --field-bg: #ffffff;
  --field-bd: #e6dccd;
  --field-fx: #c36a1f;
  --shadow: 0 8px 22px rgba(145,115,78,.12);
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}

/* =========================================================
   LAYOUT GENERAL
   ========================================================= */
body.bg{
  background: var(--bg);
  min-height: 100svh;
}

/* HEADER */
.bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap; /* permite romper línea cuando no entra */
}
.brand{
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.brand h1{
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 0;
}
.logo{ height: 40px; }

/* nav del header */
.nav{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wrap{
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding: 16px 14px 24px;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

/* Layout del dashboard (Panel) */
.grid2{
  min-height: calc(100svh - 70px); /* para que no quede pegado arriba */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 16px;
}

/* Tarjetas-botón del dashboard */
/* Botones dashboard estilo Uiverse */
.bookmarkBtn {
  width: 260px;
  height: 60px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.068);
  background-color: rgb(255, 255, 255);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition-duration: 0.3s;
  overflow: hidden;
  text-decoration: none;
  padding: 0;
}

.IconContainer {
  width: 42px;
  height: 42px;
  background: linear-gradient(to bottom, rgb(255, 136, 255), rgb(172, 70, 255));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
  transition-duration: 0.3s;
  font-size: 22px;
}

.text {
  height: 100%;
  width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(0, 0, 0);
  z-index: 1;
  transition-duration: 0.3s;
  font-size: 1em;
  font-weight: 600;
}

.bookmarkBtn:hover .IconContainer {
  width: 230px;
}

.bookmarkBtn:hover .text {
  transform: translateX(10px);
  width: 0;
  font-size: 0;
}

.bookmarkBtn:active {
  transform: scale(0.95);
}



.subtitle{ margin: 0 0 10px; font-size: 1.05rem; color: var(--muted); }

.stack{ display: flex; flex-direction: column; gap: 10px; }
.hidden{ display: none !important; }
.ok{ color: var(--ok); font-weight: 600; }
.error{ color: var(--danger); font-weight: 600; }

/* Grillas responsive (mobile-first) */
.row{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.col{ min-width: 0; }
.grid-2{ display: grid; grid-template-columns: 1fr; gap: 10px; }
.grid-3{ display: grid; grid-template-columns: 1fr; gap: 10px; }

/* =========================================================
   FORM CONTROLS
   ========================================================= */
label{ font-weight: 600; font-size: .95rem; color: var(--text); }

.input, .select, input, select, textarea{
  appearance: none;
  width: 100%;
  background: var(--field-bg);
  color: var(--text);
  border: 2px solid var(--field-bd);
  border-radius: var(--radius);
  padding: 14px 14px;
  font-size: 16px; /* evita zoom en iOS */
  line-height: 1.15;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.input:focus, .select:focus,
input:focus, select:focus, textarea:focus{
  border-color: var(--field-fx);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--field-fx) 25%, transparent);
  background: #fff;
}
::placeholder{ color: color-mix(in oklab, var(--text) 55%, #999); opacity: 1; }

/* Select con flecha */
select, .select{
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 40px;
}

/* Números sin spinners */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }
input[type=number]{ -moz-appearance: textfield; }

/* Checkbox & Radio (no heredan estilos gigantes) */
input[type="checkbox"], input[type="radio"]{
  appearance: auto;
  width: 1.15rem; height: 1.15rem;
  margin: 0 8px 0 0;
  accent-color: var(--brand);
  vertical-align: middle;
}

/* Grupo de chips */
.chips{
  display: flex; flex-wrap: wrap; gap: 8px 12px; padding: 8px;
  background: #fff; border: 1px dashed var(--border); border-radius: 12px;
}
.chips label{
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 12px;
  padding: 8px 10px; background: #fff; cursor: pointer;
}
.chips input[type="checkbox"]{ margin-right: 4px; }

/* Bloques/secciones */
.section{
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

/* Hora 12h */
.time-12{
  display: grid; grid-template-columns: 1fr auto 1fr 100px;
  align-items: center; gap: 8px;
}
.time-12 span{ color: var(--muted); }

/* =========================================================
   BOTONES
   ========================================================= */
.btn{
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--border); color: #fff;
  background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 92%, #ffffff 0%), var(--brand));
  font-weight: 700; cursor: pointer; text-decoration: none;
  transition: transform .04s ease, filter .15s ease, box-shadow .15s ease;
  width: 100%;
  box-shadow: 0 3px 0 color-mix(in oklab, var(--brand) 60%, #000 40%);
  text-align: center;
}
.btn:hover{ filter: brightness(1.05); }
.btn:active{ transform: translateY(1px); box-shadow: 0 2px 0 color-mix(in oklab, var(--brand) 60%, #000 40%); }
.btn.success{
  background: linear-gradient(180deg, color-mix(in oklab, var(--brand-2) 92%, #ffffff 0%), var(--brand-2));
  box-shadow: 0 3px 0 color-mix(in oklab, var(--brand-2) 60%, #000 40%);
}
.btn.danger{
  background: linear-gradient(180deg, #e57373, #d64141);
  box-shadow: 0 3px 0 #a33131;
}
.nav .btn{
  width: auto;
  white-space: nowrap;
}

/* =========================================================
   PDF / CONTRATO (vista previa HTML opcional)
   ========================================================= */
.pdf-a4{ width: var(--pdf-width); background:#fff; color:#000; margin-inline:auto; }
.pdf-inner{ padding: 28px 40px; }
.pdf-logo{ height: 52px; margin-bottom: 10px; }
.pdf-title{ text-align: center; margin: 8px 0 12px; }
.pdf-p{ margin: 8px 0; }
.pdf-ul{ margin: 6px 0 10px 18px; }

.firmas{ display: flex; justify-content: space-between; gap: 18px; margin-top: 36px; }
.firma{ width: 23%; text-align: center; font-size: .9rem; line-height: 1.3; }
.firma img{ height: 60px; object-fit: contain; }
.firma .linea{ height: 2px; background:#000; margin: 40px 0 6px; }

/* Página con fondo A4 para html2pdf */
.contract-page{
  width: 210mm; height: 297mm;
  background-image: url("./img/fondo-contrato.png");
  background-size: cover; background-repeat: no-repeat; background-position: center;
  padding: 40mm 25mm 30mm 25mm;
  box-sizing: border-box; position: relative;
  font-family: 'Times New Roman', serif;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Mobile primero; ajustes extras para pantallas muy pequeñas */
@media (max-width: 600px){
  .bar{
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 12px;
    gap: 8px;
  }

  .brand{
    width: 100%;
  }
  .brand h1{
    font-size: 1.15rem;
  }

  .nav{
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  /* Botones normales del header */
  .nav .btn{
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: .9rem;
  }

  /* Cerrar sesión: más pequeño y a la derecha */
  .nav .btn.danger{
    padding: 8px 12px;
    font-size: .85rem;
    box-shadow: 0 2px 0 #a33131;
    align-self: flex-end;
  }

  .wrap{
    padding-inline: 12px;
  }

  .card{
    padding: 14px;
  }

  .btn{
    font-size: .95rem;
    padding: 12px 14px;
  }
}


@media (min-width: 560px){
  .wrap{ padding: 22px; }
  .card{ padding: 18px; }
  .row{ grid-template-columns: repeat(2, 1fr); }
  .grid-2{ grid-template-columns: repeat(2, 1fr); }
  .grid-3{ grid-template-columns: repeat(3, 1fr); }
  .btn{ width: auto; }
}
@media (min-width: 900px){
  .row{ grid-template-columns: repeat(3, 1fr); }
  .time-12{ grid-template-columns: 90px auto 90px 120px; }
}

/* =========================================================
   IMPRESIÓN (si imprimes la UI desde el navegador)
   ========================================================= */
@media print{
  body.bg{ background: #fff; }
  .bar{ display: none !important; }
  .wrap{ max-width: none; padding: 0; }
}

/* Fondo */
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

/* Oculto */
.hidden { 
  display: none; 
}

/* Caja */
.popup-box {
  background: white;
  padding: 20px 25px;
  width: 85%;
  max-width: 380px;
  border-radius: 10px;
  box-shadow: 0px 0px 15px rgba(0,0,0,0.3);
  text-align: center;
  animation: fadeIn 0.2s ease-out;
  box-sizing: border-box;
}

/* Texto dentro del popup */
.popup-box h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.popup-box p {
  margin: 0;
  font-size: 0.95rem;
}

/* Botones */
.popup-buttons {
  margin-top: 15px;
  display: flex;
  justify-content: space-around;
  gap: 10px;
}

.btn-confirm,
.btn-cancel {
  flex: 1;
  min-height: 40px;
  font-size: 0.95rem;
  border-radius: 6px;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
}

/* Colores de botones */
.btn-confirm {
  background: #e63946;
  color: white;
}

.btn-cancel {
  background: #ddd;
  color: black;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* 🔽 Ajustes especiales para pantallas pequeñas (celular) */
@media (max-width: 480px) {
  .popup-box {
    width: 92%;
    max-width: 340px;
    padding: 16px 18px;
  }

  .popup-box h3 {
    font-size: 1rem;
  }

  .popup-box p {
    font-size: 0.9rem;
  }

  .popup-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-confirm,
  .btn-cancel {
    width: 100%;
    font-size: 0.95rem;
  }
}

/* Popup de carga: un poco más compacto */
.popup-loading {
  padding: 20px 24px;
}

/* Spinner circular */
.popup-loading .spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 14px auto;
  border-radius: 50%;
  border: 4px solid rgba(0, 0, 0, 0.08);
  border-top-color: #e63946; /* tu rojo de "danger" */
  animation: spinLoading 0.8s linear infinite;
}

/* Animación de giro */
@keyframes spinLoading {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Opcional: que el popup aparezca con un pequeño fade/zoom */
@keyframes popupZoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.popup-loading {
  animation: popupZoomIn 0.18s ease-out;
}

/* nieve eliminar despues de naviada*/
#snowCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* no bloquea clicks */
  z-index: 9999;
}

/* nieve eliminar despues de naviada*/

/* SELECT con apariencia tipo Uiverse */
select {
  width: 100%;
  min-height: 55px;
  padding: 12px 16px;
  border: 2px solid #b5bfd9;
  border-radius: 12px;
  background-color: #fff;
  color: #707070;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.10);
  transition: 0.2s ease;
}

/* Al pasar el mouse */
select:hover {
  border-color: #2260ff;
  color: #2260ff;
}

/* Al hacer click */
select:focus {
  border-color: #2260ff;
  color: #2260ff;
  box-shadow: 
    0 5px 10px rgba(0, 0, 0, 0.10),
    0 0 0 4px #b5c9fc;
}

/* Opciones internas */
select option {
  color: #333;
  background: #fff;
}

.radio-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0;
}

.radio-input {
  display: none;
}

.radio-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 95px;
  min-height: 80px;
  border-radius: 12px;
  border: 2px solid #b5bfd9;
  background: #fff;
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: 0.2s ease;
  color: #707070;
  position: relative;
}

.radio-tile::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #b5bfd9;
  border-radius: 50%;
  top: 6px;
  left: 6px;
  opacity: 0;
  transform: scale(0);
  transition: 0.25s ease;
}

.radio-input:checked + .radio-tile {
  border-color: #2260ff;
  color: #2260ff;
  background: #f5f8ff;
}

.radio-input:checked + .radio-tile::before {
  opacity: 1;
  transform: scale(1);
  background: #2260ff;
  border-color: #2260ff;
}

.radio-tile:hover {
  border-color: #2260ff;
}

.radio-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.radio-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

select.select-convertido {
  display: none !important;
}

.radio-icon {
  font-size: 30px;
  margin-bottom: 8px;
  transition: all .3s ease;
}

/* Barman */
.radio-tile.barman .radio-icon {
  color: #d97706; /* naranja */
}

/* Catering */
.radio-tile.catering .radio-icon {
  color: #16a34a; /* verde */
}

/* Ambos */
.radio-tile.ambos .radio-icon {
  color: #7c3aed; /* morado */
}

/* Acrílico */
.radio-tile.acrilico .radio-icon {
  color: #0ea5e9; /* azul */
}

/* Cristalería */
.radio-tile.cristaleria .radio-icon {
  color: #ec4899; /* rosa */
}

.radio-input:checked + .radio-tile .radio-icon {
  transform: scale(1.2);
}

.uiverse-card {
    display: flex;
    align-items: center;
    width: 240px;
    min-height: 55px;
    border-radius: 25px;
    border: 2px solid #b5bfd9;
    background: #fff;
    box-shadow: 0 5px 10px rgba(0,0,0,.1);
    cursor: pointer;
    position: relative;
    padding-left: 50px;
    margin: 10px 0;
    transition: .2s ease;
}

.uiverse-card:hover {
    border-color: #2260ff;
}

.uiverse-circle {
    position: absolute;
    left: 15px;
    width: 20px;
    height: 20px;
    border: 2px solid #b5bfd9;
    border-radius: 50%;
    background: #fff;
    transition: .2s ease;
}

.uiverse-card.active .uiverse-circle {
    background: #2260ff;
    border-color: #2260ff;
}

.uiverse-icon {
    font-size: 20px;
    margin-right: 12px;
    transition: .2s ease;
}

.uiverse-card.active .uiverse-icon {
    filter: brightness(1.2);
    transform: scale(1.15);
}

.uiverse-text {
    color: #707070;
    font-size: 14px;
    transition: .2s ease;
}

.uiverse-card.active .uiverse-text {
    color: #2260ff;
    font-weight: 600;
}

.uiverse-card.active {
    border-color: #2260ff;
}

.radio-tile-custom{
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:flex-start;
    width:180px;
    height:60px;
    margin:6px;
    padding-left:35px;
    border:2px solid #b5bfd9;
    border-radius:12px;
    background:#fff;
    cursor:pointer;
    position:relative;
    transition:.2s;
    box-shadow:0 5px 10px rgba(0,0,0,.1);
}

.radio-tile-custom:hover{
    border-color:#2260ff;
}

.radio-circle-custom{
    position:absolute;
    top:8px;
    left:8px;
    width:12px;
    height:12px;
    border:2px solid #b5bfd9;
    border-radius:50%;
    opacity:0;
    transform:scale(0);
    transition:.2s;
}

.radio-tile-custom.active{
    border-color:#2260ff;
}

.radio-tile-custom.active .radio-circle-custom{
    opacity:1;
    transform:scale(1);
    background:#2260ff;
    border-color:#2260ff;
}

.radio-icon-custom{
    font-size:26px;
    width:40px;
    display:flex;
    justify-content:center;
    align-items:center;
    margin-right:12px;
}

.radio-label-custom{
    font-size:14px;
    color:#666;
    text-align:left;
    line-height:1.2;
    display:flex;
    align-items:center;
}

.radio-tile-custom{
    display:inline-flex;
    vertical-align:top;
}

/* ===== Inputs Premium ===== */

#contractForm input:not([type="checkbox"]):not([type="radio"]),
#contractForm select,
#contractForm textarea {

  width: 100%;
  min-height: 46px;

  padding: 12px 14px;

  border: 1px solid #d1d5db;
  border-radius: 10px;

  outline: none;

  background: #ffffff;

  color: #111827;

  font-size: 14px;
  font-weight: 500;

  transition: all .3s ease;
}

/* Hover */

#contractForm input:hover,
#contractForm select:hover,
#contractForm textarea:hover {
  border-color: #8b5cf6;
}

/* Focus */

#contractForm input:focus,
#contractForm select:focus,
#contractForm textarea:focus {
  animation: rotateShadow 6s infinite ease-in-out;
  border-color: #8b5cf6;
}

/* Placeholder */

#contractForm input::placeholder,
#contractForm textarea::placeholder {
  color: #94a3b8;
}

/* Textarea */

#contractForm textarea {
  min-height: 100px;
  resize: vertical;
}

/* Animación */

@keyframes rotateShadow {

  0% {
    box-shadow:
      -3px -3px 8px rgba(214,198,165,.75),
       3px  3px 8px rgba(148,163,184,.75);
  }

  25% {
    box-shadow:
      -3px  3px 8px rgba(214,198,165,.75),
       3px -3px 8px rgba(148,163,184,.75);
  }

  50% {
    box-shadow:
       3px  3px 8px rgba(214,198,165,.75),
      -3px -3px 8px rgba(148,163,184,.75);
  }

  75% {
    box-shadow:
       3px -3px 8px rgba(214,198,165,.75),
      -3px  3px 8px rgba(148,163,184,.75);
  }

  100% {
    box-shadow:
      -3px -3px 8px rgba(214,198,165,.75),
       3px  3px 8px rgba(148,163,184,.75);
  }
}

.uiverse-card {
    display: inline-flex;
    vertical-align: top;
    margin-right: 10px;
    margin-bottom: 10px;
}

.nav-btn.active {
  color: #2563eb;
  background: #eef4ff;
  border-color: rgba(37,99,235,.35);

  box-shadow:
    0 0 20px rgba(37,99,235,.25),
    0 8px 18px rgba(37,99,235,.15);
}

.nav-btn.active i{
  color:#2563eb;

  filter:
    drop-shadow(0 0 6px rgba(37,99,235,.35));

  transform:scale(1.15);
}

/* ===== MENÚ SUPERIOR ===== */

.nav-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  width: fit-content;
  max-width: 100%;

  margin: 0 auto;
  padding: 8px;

  background: #ffffff;

  border: 1px solid #d1d5db;
  border-radius: 18px;

  box-shadow: 0 8px 22px rgba(0,0,0,.12);
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-width: 140px;
  height: 52px;

  padding: 0 16px;

  border: 1px solid transparent;
  border-radius: 14px;

  background: transparent;

  color: #111827;
  text-decoration: none;

  font-size: 14px;
  font-weight: 600;

  transition: all .25s ease;
}

.nav-btn i {
  font-size: 18px;
}

.nav-btn:hover {
  color: #2563eb;
  background: #f8fafc;
  border-color: rgba(37,99,235,.25);

  transform: translateY(-1px);
}

.nav-btn.active {
  color: #2563eb;

  background: #eef4ff;

  border-color: rgba(37,99,235,.35);

  box-shadow:
    0 0 18px rgba(37,99,235,.18);
}

.nav-btn.active i {
  transform: scale(1.15);

  filter:
    drop-shadow(0 0 5px rgba(37,99,235,.4));
}

/* ===== TABLET ===== */

@media (max-width: 900px) {

  .nav-panel {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-btn {
    min-width: 120px;
    font-size: 13px;
  }
}

/* ===== CELULAR ===== */

@media (max-width: 600px) {

  .nav-panel {
    width: 100%;
    gap: 5px;
    padding: 6px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .nav-btn {

    min-width: auto;
    width: 100%;

    height: 42px;

    padding: 0 6px;

    font-size: 11px;
  }

  .nav-btn i {
    display: none;
  }

  .nav-btn span {
    display: inline !important;
  }
}

/* ================================
   HEADER FINAL CORREGIDO
================================ */

/* PC */
.bar {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;

  display: grid !important;
  grid-template-columns: 120px 1fr 180px !important;
  align-items: center !important;

  width: 100% !important;
  padding: 14px 28px !important;

  background: #fff !important;
}

/* Logo izquierda */
.brand {
  grid-column: 1 !important;
  justify-self: start !important;

  display: flex !important;
  align-items: center !important;
}

.logo {
  width: 64px !important;
  height: 64px !important;
  object-fit: contain !important;
}

/* Menú centro */
.nav-panel {
  grid-column: 2 !important;
  justify-self: center !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;

  width: fit-content !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 8px !important;

  background: #fff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 18px !important;

  box-shadow: 0 8px 22px rgba(0,0,0,.12) !important;
}

.nav-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;

  min-width: 135px !important;
  height: 52px !important;
  padding: 0 16px !important;

  border: 1px solid transparent !important;
  border-radius: 14px !important;

  background: transparent !important;
  color: #111827 !important;

  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 600 !important;

  transition: all .25s ease !important;
}

.nav-btn i {
  font-size: 18px !important;
}

.nav-btn:hover {
  color: #2563eb !important;
  background: #f8fafc !important;
  border-color: rgba(37,99,235,.25) !important;
}

.nav-btn.active {
  color: #2563eb !important;
  background: #eef4ff !important;
  border-color: rgba(37,99,235,.35) !important;
  box-shadow: 0 0 18px rgba(37,99,235,.25) !important;
}

.nav-btn.active i {
  transform: scale(1.15) !important;
  filter: drop-shadow(0 0 5px rgba(37,99,235,.4)) !important;
}

/* Cerrar sesión derecha */
.logout-btn {
  grid-column: 3 !important;
  justify-self: end !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;

  min-width: 150px !important;
  height: 44px !important;
  padding: 0 16px !important;

  border: 1px solid rgba(220,38,38,.25) !important;
  border-radius: 14px !important;

  background: #fff1f2 !important;
  color: #dc2626 !important;

  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;

  cursor: pointer !important;
  transition: all .25s ease !important;
}

.logout-btn:hover {
  background: #ffe4e6 !important;
  box-shadow: 0 0 16px rgba(220,38,38,.18) !important;
}

/* Ocultar header al bajar */
.bar.ocultar-header {
  transform: translateY(-120%) !important;
  opacity: 0 !important;
  transition: transform .4s ease, opacity .4s ease !important;
}

/* ================================
   MÓVIL
================================ */

@media (max-width: 900px) {
  .bar {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;

    padding: 14px 10px !important;
  }

  .brand {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .logo {
    width: 56px !important;
    height: 56px !important;
  }

  .logout-btn {
    position: absolute !important;
    top: 22px !important;
    right: 12px !important;

    min-width: auto !important;
    height: 38px !important;
    padding: 0 12px !important;

    font-size: 12px !important;
  }

  .nav-panel {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;

    gap: 6px !important;
    padding: 6px !important;
  }

  .nav-btn {
    min-width: 0 !important;
    width: 100% !important;
    height: 42px !important;

    padding: 0 6px !important;

    font-size: 11px !important;
  }

  .nav-btn i {
    display: none !important;
  }

  .nav-btn span {
    display: inline !important;
  }
}

.bar{
    transition:
        transform .35s ease,
        opacity .35s ease;
}

.bar.hide{
    transform: translateY(-120%);
    opacity: 0;
}

@media (max-width: 900px){

  .nav-btn span{
    display:none !important;
  }

  .nav-btn i{
    display:block !important;
    font-size:18px;
  }

  .nav-btn{
    min-width:0 !important;
    width:100% !important;
  }

}

@media (max-width: 900px){

  .nav-panel{
    width:100% !important;

    display:flex !important;
    flex-wrap:nowrap !important;

    justify-content:center !important;

    gap:4px !important;

    overflow-x:auto;
  }

  .nav-btn{

    min-width:auto !important;

    width:auto !important;

    height:38px !important;

    padding:0 10px !important;

    font-size:11px !important;

    gap:5px !important;
  }

  .nav-btn i{
    display:block !important;
    font-size:14px !important;
  }

  .nav-btn span{
    display:inline !important;
  }

}

.home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  height: 42px;
  padding: 0 14px;

  border-radius: 14px;
  border: 1px solid rgba(4, 145, 23, 0.25);

  background: #eef4ff;
  color: #94d31e;

  text-decoration: none;
  font-size: 13px;
  font-weight: 700;

  box-shadow: 0 0 14px rgba(148, 241, 26, 0);
}

.home-btn.active {
  background: #8feb25;
  color: #fff;
  box-shadow: 0 0 22px rgba(67, 233, 17, 0.45);
}

.login-bg {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f3f4f6;
}

.form {
  background-color: #fff;
  display: block;
  padding: 1.2rem;
  width: 100%;
  max-width: 350px;
  border-radius: 0.8rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.form-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  color: #000;
  margin-bottom: 1rem;
}

.input-container {
  position: relative;
}

.input-container input,
.form button {
  outline: none;
  border: 1px solid #e5e7eb;
  margin: 8px 0;
}

.input-container input {
  background-color: #fff;
  padding: 1rem;
  padding-right: 3rem;
  font-size: 0.9rem;
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.input-container span {
  display: grid;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  padding: 0 1rem;
  place-content: center;
  color: #9ca3af;
}

.submit {
  display: block;
  margin-top: 10px;
  padding: 0.85rem 1.25rem;
  background-color: #4f46e5;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  width: 100%;
  border-radius: 0.5rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s;
}

.submit:hover {
  background-color: #4338ca;
  transform: translateY(-1px);
}

.error {
  color: #dc2626;
  font-size: 0.85rem;
  text-align: center;
  margin-top: 10px;
}