/* KH_PANEL_BUILD_20260512_V213_GLOBAL_CSS_SPLIT
   Estilos globales del panel unificados desde header.php y footer.php.
   Header/footer cargan CSS/JS con ?v=<?= time() ?> mientras se corrige cache.
*/
:root{
  --kh-primary:#0f172a;
  --kh-primary-2:#1e3a8a;
  --kh-accent:#f97316;
  --kh-soft:#f8fafc;
  --kh-border:rgba(148,163,184,.25);
  --kh-card:#ffffff;
  --kh-muted:#64748b;
  --kh-shadow:0 18px 42px rgba(15,23,42,.12);
}
html{scroll-behavior:smooth;}
body{background:#f4f7fb;color:#0f172a;}

/* Navegación principal */
.kh-navbar-wrap{padding:.75rem .75rem 0;}
.kh-navbar{
  background:linear-gradient(135deg,var(--kh-primary),#172554 52%,var(--kh-primary-2));
  border:1px solid rgba(255,255,255,.12);
  border-radius:22px;
  box-shadow:0 18px 42px rgba(15,23,42,.18);
}
.kh-navbar .navbar-brand{
  color:#fff!important;
  font-weight:950;
  letter-spacing:.02em;
  display:flex;
  align-items:center;
  gap:.65rem;
  min-width:0;
}
.kh-brand-mark{
  width:40px;height:40px;border-radius:14px;
  display:grid;place-items:center;
  background:linear-gradient(135deg,#fb923c,#ef4444);
  box-shadow:0 10px 22px rgba(249,115,22,.28);
  color:#fff;font-weight:950;
  flex:none;
}
.kh-brand-text{line-height:1.05;min-width:0;}
.kh-brand-title{display:block;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.kh-brand-sub{display:block;font-size:.73rem;font-weight:700;color:#cbd5e1;letter-spacing:.01em;margin-top:.12rem;}
.kh-navbar .nav-link{
  color:#dbeafe!important;
  font-weight:800;
  border-radius:999px;
  padding:.58rem .82rem!important;
  margin:.12rem;
  transition:.18s ease;
  white-space:nowrap;
}
.kh-navbar .nav-link:hover,.kh-navbar .nav-link.show,.kh-navbar .nav-link.active{
  color:#fff!important;
  background:rgba(255,255,255,.13);
}
.kh-navbar .navbar-toggler{
  border-color:rgba(255,255,255,.28);
  box-shadow:none!important;
  border-radius:14px;
  padding:.45rem .62rem;
}
.kh-navbar .navbar-toggler-icon{filter:invert(1) grayscale(1) brightness(1.8);}
.kh-main-nav{justify-content:center;}
.kh-dropdown{
  border:0;
  border-radius:18px;
  padding:.55rem;
  box-shadow:0 22px 48px rgba(15,23,42,.18);
  min-width:265px;
  overflow:hidden;
}
.kh-dropdown.kh-wide{min-width:315px;}
.kh-dropdown .dropdown-item{
  border-radius:12px;
  padding:.62rem .78rem;
  font-weight:750;
  color:#253045;
  display:flex;
  align-items:center;
  gap:.45rem;
}
.kh-dropdown .dropdown-item:hover,.kh-dropdown .dropdown-item.active{
  background:linear-gradient(135deg,#eff6ff,#dbeafe);
  color:#0f172a;
}
.kh-menu-title{
  color:#64748b;
  font-size:.72rem;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:.55rem .75rem .25rem;
}
.kh-user-card{
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.13);
  border-radius:999px;
  color:#e2e8f0;
  padding:.34rem .48rem .34rem .75rem;
  gap:.55rem;
}
.kh-user-name{font-weight:850;line-height:1;}
.kh-user-role{font-size:.72rem;color:#cbd5e1;text-transform:uppercase;letter-spacing:.04em;}
.kh-btn-exit{border-radius:999px;font-weight:850;}
.kh-content{max-width:1540px;margin:0 auto;}

/* Bloques reutilizables para separar áreas críticas del panel */
.kh-page-card,
.kh-panel-section{
  background:var(--kh-card);
  border:1px solid rgba(148,163,184,.28);
  border-radius:24px;
  box-shadow:0 14px 35px rgba(15,23,42,.06);
}
.kh-panel-section{
  border-left:7px solid var(--kh-section-color,#0ea5e9);
  overflow:hidden;
}
.kh-panel-section .kh-section-head{
  background:linear-gradient(90deg,var(--kh-section-soft,#eff6ff),#fff);
  border-bottom:1px solid rgba(148,163,184,.20);
  padding:1rem 1.15rem;
  font-weight:900;
}
.kh-section-blue{--kh-section-color:#2563eb;--kh-section-soft:#eff6ff;}
.kh-section-green{--kh-section-color:#059669;--kh-section-soft:#ecfdf5;}
.kh-section-orange{--kh-section-color:#f97316;--kh-section-soft:#fff7ed;}
.kh-section-purple{--kh-section-color:#7c3aed;--kh-section-soft:#f5f3ff;}
.kh-section-red{--kh-section-color:#dc2626;--kh-section-soft:#fef2f2;}
.kh-section-slate{--kh-section-color:#475569;--kh-section-soft:#f8fafc;}

/* Compatibilidad con patrón de desbloqueo en formularios de taller */
#patternGrid{width:220px;display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-top:10px;}
.pattern-dot{width:60px;height:60px;border-radius:50%;background:#dee2e6;border:2px solid #6c757d;}
.pattern-dot.active{background:#0d6efd;}

/* Footer global */
.kh-footer{
  background:linear-gradient(135deg,#0f172a,#111827 55%,#1e293b);
  color:#e5e7eb;
  border-top:1px solid rgba(255,255,255,.08);
}
.kh-footer-card{
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.10);
  border-radius:22px;
  padding:1.15rem;
  height:100%;
}
.kh-footer h5,.kh-footer h6{color:#fff;}
.kh-footer p,.kh-footer li{color:#cbd5e1;}
.kh-footer a{color:#e0f2fe;text-decoration:none;}
.kh-footer a:hover{color:#fff;text-decoration:underline;}
.kh-footer-logo{max-height:54px;max-width:180px;object-fit:contain;background:#fff;border-radius:14px;padding:.35rem;margin-bottom:.65rem;}
.kh-footer-pill{display:inline-flex;align-items:center;gap:.35rem;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.07);color:#e2e8f0;border-radius:999px;padding:.35rem .62rem;font-size:.82rem;font-weight:800;margin:.18rem;}
.kh-footer-bottom{background:rgba(0,0,0,.22);color:#cbd5e1;}

@media (min-width:992px){
  .kh-navbar .dropdown:hover > .dropdown-menu{display:block;margin-top:0;}
  .kh-main-nav{margin-left:auto;margin-right:auto;}
}
@media (max-width:991.98px){
  .kh-navbar-wrap{padding:.5rem .5rem 0;}
  .kh-navbar{border-radius:18px;}
  .kh-main-nav{align-items:stretch!important;padding-top:.75rem;}
  .kh-navbar .nav-link{border-radius:14px;padding:.78rem .9rem!important;margin:.15rem 0;background:rgba(255,255,255,.06);}
  .kh-dropdown{box-shadow:none;border-radius:15px;margin:.15rem 0 .55rem;background:#fff;min-width:100%;}
  .kh-user-card{border-radius:16px;align-items:flex-start!important;margin-top:.75rem;}
  .kh-brand-title{max-width:190px;}
}
