/* ========== RESET ========== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}

/* ========== PALETA GIDEAS ========== */
:root{
  --red:#E30613;
  --black:#1B1B1B;
  --grey:#F5F5F5;
  --white:#FFFFFF;

  --h-header:72px;
  --h-footer:70px;
  --offset-header:72px;  /* JS actualiza */
}

/* ========== BODY FLEX LAYOUT (sticky footer) ========== */
body{
  font-family:"Segoe UI",Roboto,Arial,sans-serif;
  min-height:100vh;
  background:var(--grey);color:var(--black);
  display:flex;flex-direction:column;
  padding-top:var(--offset-header);
  padding-bottom:var(--h-footer);
}

/* ========== HEADER ========== */
.site-header{
  position:fixed;top:0;left:0;right:0;height:var(--h-header);
  background:var(--black);box-shadow:0 2px 4px rgba(0,0,0,.15);z-index:1000;
}
.site-header .container{max-width:1100px;margin:auto;height:100%;
  display:flex;align-items:center;justify-content:space-between;padding:0 1rem}
.logo{height:40px}
.menu-btn{display:none;width:32px;height:24px;border:none;background:none;cursor:pointer}
.menu-btn span{display:block;height:4px;background:#fff;border-radius:2px;margin:3px 0}
.main-nav{display:flex;gap:1rem;align-items:center}
.main-nav a{color:#fff;text-decoration:none;font-weight:500}
.main-nav a:hover{color:var(--red)}
.badge{background:var(--red);padding:.25rem .7rem;border-radius:18px;font-size:.8rem}

/* ========== MAIN CENTRADO ========== */
main{flex:1;display:flex;align-items:center;justify-content:center;padding:2rem}
.container-narrow{width:100%;max-width:540px}

/* ========== FORM CARD ========== */
.form-card{background:var(--white);border-radius:12px;padding:2rem;
  box-shadow:0 6px 20px rgba(0,0,0,.07)}
.form-card h2{margin-bottom:1rem;text-align:center}
label{font-weight:600;margin-top:1rem;display:block}
input,select,textarea{
  width:100%;margin-top:.4rem;padding:.7rem;font-size:.95rem;
  border:1px solid #d0d0d0;border-radius:6px;transition:border .2s,box-shadow .2s}
input:focus,textarea:focus{outline:none;border-color:var(--red);
  box-shadow:0 0 0 3px rgba(227,6,19,.2)}
.btn{
  display:block;width:100%;margin-top:1.6rem;
  background:var(--red);color:#fff;border:none;border-radius:6px;
  padding:.75rem;font-weight:600;cursor:pointer;transition:background .2s}
.btn:hover{background:#c30010}
.btn.outline{background:transparent;color:var(--red);border:2px solid var(--red)}
.btn.outline:hover{background:var(--red);color:#fff}

/* ========== FOOTER ========== */
.site-footer{
  position:fixed;bottom:0;left:0;right:0;height:var(--h-footer);
  background:var(--black);color:#fff;display:flex;align-items:center}
.site-footer .container{max-width:1100px;margin:auto;padding:0 1rem;
  display:flex;justify-content:space-between;align-items:center;width:100%}
.site-footer a{color:#fff;text-decoration:none}
.site-footer a:hover{color:var(--red)}

/* ---------- RESPONSIVE NAV & FOOTER ---------- */
@media(max-width:768px){

  /* ── botón hamburguesa ─────────────────────── */
  .menu-btn{
    width:32px;height:24px;
    display:flex;flex-direction:column;justify-content:space-between;
    border:none;background:none;cursor:pointer;
    position:absolute;right:1rem;top:50%;translate:0 -50%;
  }
  .menu-btn span{
    width:100%;height:3px;background:#fff;border-radius:2px;
    transition:transform .3s,opacity .3s;
  }
  /* animación a ❌ */
  .menu-btn.open span:nth-child(1){transform:translateY(9px) rotate(45deg)}
  .menu-btn.open span:nth-child(2){opacity:0}
  .menu-btn.open span:nth-child(3){transform:translateY(-9px) rotate(-45deg)}

  /* ── navegación ───────────────────────────── */
  .main-nav{
    display:none;                              /* oculto por defecto */
    position:fixed;top:var(--h-header);left:0;right:0;
    background:var(--black);
    flex-direction:column;gap:1.2rem;padding:1.4rem;
  }
  .main-nav.open{display:flex;}                /* visible al tocar */

  .main-nav a{font-size:1.05rem}

  /* ── header: logo izq., menú der., centrado ─ */
  .site-header .container{justify-content:center;position:relative}
  .brand{position:absolute;left:1rem;top:50%;translate:0 -50%;}

  /* ── footer en columna ────────────────────── */
  .site-footer .container{
    flex-direction:column;gap:.4rem;padding:1rem .6rem;text-align:center;
  }
}

/* breakpoint extra pequeño */
@media(max-width:640px){
  .logo{height:32px}
  .btn{padding:.55rem 1.2rem;font-size:.9rem}
}

/* ================================================================= */
/*  FORMULARIOS  “EXEC CARD”  (login / registro)                     */
/* ================================================================= */

.auth-wrapper{
  width:100%;max-width:420px;margin:auto;
}

.auth-card{
  background:var(--white);
  border-radius:12px;
  box-shadow:0 10px 25px rgba(0,0,0,.08);
  padding:3rem 2.5rem;
}

.auth-card h2{
  text-align:center;
  margin-bottom:2rem;
  font-size:1.4rem;
  color:var(--negro);
}

/* ------------ floating label ------------ */
.form-field{position:relative;margin-top:1.5rem}
.form-field input{
  width:100%;border:none;border-bottom:2px solid #ccc;
  padding:.8rem 0;font-size:1rem;background:transparent;
  transition:border-color .3s}
.form-field label{
  position:absolute;left:0;top:.9rem;color:#888;
  transition:all .3s;font-size:1rem;pointer-events:none}
.form-field input:focus{outline:none;border-color:var(--red)}
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label{
  top:-.9rem;font-size:.8rem;color:var(--red)
}

/* mostrar error sencillo (opcional) */
.error-msg{color:var(--red);margin-top:1rem;text-align:center;font-size:.9rem}

/* botón ancho */
.auth-card .btn{width:100%;margin-top:2rem}

/* responsivo menor */
@media(max-width:480px){
  .auth-card{padding:2.2rem 1.5rem}
}

/* =================== ajuste mobile login / registro =================== */
@media (max-width:480px){

  /* quitamos padding lateral heredado y usamos % */
  .auth-wrapper{
    max-width:none;          /* permite ocupar todo el ancho */
    padding:0 1rem;          /* 16 px de aire a cada lado    */
  }

  /* la tarjeta se adapta y mantiene aspecto */
  .auth-card{
    width:100%;
    padding:2rem 1.4rem;     /* un poco menos de padding interno */
  }

  /* inputs y botón ligeramente más grandes para usabilidad táctil */
  .form-field input,
  .auth-card .btn{
    font-size:1rem;
  }
}/* LOGIN – que la .container se expanda en móvil */
@media(max-width:480px){
  main > .container{
    max-width:none;     /* ocupa todo el ancho */
    padding:0 1rem;
  }
}


.ticket-encuesta{
  background:#fff;border-radius:8px;padding:1.2rem;margin-bottom:1rem;
  box-shadow:0 2px 6px rgba(0,0,0,.05);text-align:center}
.ticket-encuesta h3{margin:0 0 1rem;font-size:1.1rem;color:var(--negro)}
.ticket-encuesta .faces button{
  font-size:2.2rem;background:none;border:none;cursor:pointer;margin:0 .6rem;
  transition:transform .2s}
.ticket-encuesta .faces button:hover{transform:scale(1.2)}






/* ── ESTILOS PARA TABLA DE EDITAR USUARIOS ── */
main.main-section {
  padding: 2rem 0;
}

/* ── Card blanca con sombra ── */
.main-card {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  overflow: hidden;
}

/* ── Header de la card ── */
.main-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #000;
  color: #fff;
  padding: 1rem 1.5rem;
}
.main-card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}
.main-card-filters {
  display: flex;
  gap: 0.5rem;
}

/* ── Inputs de filtro ── */
.filter-input,
.filter-select {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color .2s;
}
.filter-input:focus,
.filter-select:focus {
  border-color: #0056b3;
}

/* ── Cuerpo de la card (tabla) ── */
.main-card-body {
  overflow-x: auto;
}

/* ── Tabla estilizada ── */
.main-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.main-table thead th {
  background: #fff;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
  text-align: left;
  font-weight: 600;
}
.main-table tbody tr {
  border-bottom: 1px solid #ececec;
  transition: background .2s;
}
.main-table tbody tr:hover {
  background: #f9fafb;
}
.main-table td {
  padding: 1rem;
}

/* ── Badges de rol ── */
.role-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
}
.role-admin { background: #e63946; }
.role-usuario { background: #1f81ff; }

/* ── Link de editar ── */
.edit-link {
  color: #1f81ff;
  text-decoration: none;
  font-weight: 500;
  transition: color .2s;
}
.edit-link:hover {
  color: #e63946;
}

/* ── Estado vacío ── */
.empty-state {
  text-align: center;
  color: #6b7280;
  padding: 2rem;
  font-style: italic;
}
