/* ═══════════════════════════════════════════════════════════════════
   4056 Blog — Estilos rediseñados (versión moderna)
   Mantiene todas las clases y funcionalidades existentes
══════════════════════════════════════════════════════════════════ */

/* ── Reset y variables ── */
:root {
  --primary:    #0D9488;
  --primary-d:  #0A7C72;
  --primary-l:  #CCFBF1;
  --primary-gradient: linear-gradient(135deg, #0D9488 0%, #0A7C72 80%);
  --slate:      #0F172A;
  --slate-m:    #475569;
  --slate-l:    #94A3B8;
  --bg:         #F1F5F9;
  --white:      #FFFFFF;
  --red:        #DC2626;
  --amber:      #D97706;
  --green:      #059669;
  --purple:     #7C3AED;
  --radius:     12px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.15);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--slate);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: clip;
  word-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--primary-d);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── NAV ─────────────────────────────────────────────────── */
.blog-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.blog-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.blog-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--slate);
  flex-shrink: 0;
}
.blog-nav-logo img {
  height: 38px;
  width: auto;
  border-radius: 6px;
}
.blog-nav-logo span {
  letter-spacing: -0.02em;
}

.blog-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.blog-nav-links a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--slate-m);
  transition: background var(--transition), color var(--transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.blog-nav-links a:hover {
  background: var(--primary-l);
  color: var(--primary-d);
}

.blog-nav-cta {
  background: var(--primary-gradient);
  color: #fff !important;
  padding: 10px 22px !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
  transition: box-shadow var(--transition), transform var(--transition);
}
.blog-nav-cta:hover {
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
  background: var(--primary-gradient) !important;
  color: #fff !important;
}

/* ── HERO ────────────────────────────────────────────────── */
.blog-hero {
  background: linear-gradient(135deg, #0B7A70 0%, #0D9488 50%, #0F766E 100%);
  padding: 64px 24px 56px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.blog-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.blog-hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  position: relative;
}
.blog-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 540px;
  margin: 0 auto 32px;
  position: relative;
}

.blog-hero-search {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  position: relative;
}
.blog-hero-search input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  min-height: 52px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow var(--transition);
}
.blog-hero-search input:focus {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}
.blog-hero-search button {
  background: #FEF9C3;
  color: #854D0E;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
  min-height: 52px;
  transition: background var(--transition), transform var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.blog-hero-search button:hover {
  background: #FEF08A;
  transform: translateY(-2px);
}

/* ── HERO DE CATEGORÍA ───────────────────────────────────── */
.cat-hero {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--hero-color, #0D9488) 85%, #000) 0%,
    var(--hero-color, #0D9488) 100%) !important;
  padding: 48px 24px 44px;
}
.cat-hero-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  position: relative;
  opacity: .92;
}
.cat-hero .blog-hero p {
  margin-bottom: 0;
}
.cat-hero-meta {
  margin-top: 16px;
  position: relative;
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: .85rem;
  opacity: .8;
}
.cat-hero-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── BREADCRUMB ──────────────────────────────────────────── */
.blog-breadcrumb {
  background: #fff;
  border-bottom: 1px solid #F1F5F9;
}
.blog-breadcrumb-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--slate-l);
}
.blog-breadcrumb-inner a {
  color: var(--slate-m);
  display: flex;
  align-items: center;
  gap: 4px;
}
.blog-breadcrumb-inner a:hover { color: var(--primary); }
.blog-breadcrumb-inner .sep { color: #CBD5E1; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--slate-l);
}
.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}
.empty-state p { margin-bottom: 20px; }

/* ── SIDEBAR CATS ACTIVE ─────────────────────────────────── */
.blog-sidebar-cats a.active {
  color: var(--primary);
  font-weight: 700;
  background: var(--primary-l);
}

/* ── CONTAINER Y LAYOUT ──────────────────────────────────── */
.blog-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 48px 0;
}

/* ── SIDEBAR STICKY ──────────────────────────────────────── */
.blog-sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  min-width: 0;
  max-width: 100%;
}

/* ── FILTRO CATEGORÍAS ───────────────────────────────────── */
.cats-filter-wrap {
  position: relative;
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.cats-filter-wrap::before,
.cats-filter-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56px;
  z-index: 2;
  pointer-events: none;
}
.cats-filter-wrap::before {
  left: 0;
  background: linear-gradient(90deg, #fff 40%, transparent);
}
.cats-filter-wrap::after {
  right: 0;
  background: linear-gradient(-90deg, #fff 40%, transparent);
}

.cats-filter-inner {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 64px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.cats-filter-inner::-webkit-scrollbar {
  display: none;
}

.cats-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 99px;
  border: 1.5px solid #E2E8F0;
  background: #F8FAFC;
  color: var(--slate-m);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  transition: all var(--transition);
}
.cats-chip i {
  font-size: 0.78rem;
  opacity: 0.7;
}
.cats-chip:hover {
  border-color: var(--cat-color, var(--primary));
  color: var(--cat-color, var(--primary));
  background: #fff;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.cats-chip--active {
  background: var(--cat-color, var(--primary));
  border-color: var(--cat-color, var(--primary));
  color: #fff !important;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--cat-color, var(--primary)) 40%, transparent);
}
.cats-chip--active i {
  opacity: 1;
}

.cats-chip__count {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  border-radius: 99px;
  padding: 1px 8px;
  margin-left: 2px;
}
.cats-chip--active .cats-chip__count {
  background: rgba(255, 255, 255, 0.2);
}

.cats-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #E2E8F0;
  background: #fff;
  color: var(--slate-m);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.cats-arrow:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-md);
}
.cats-arrow--left {
  left: 8px;
}
.cats-arrow--right {
  right: 8px;
}
.cats-arrow[hidden] {
  display: none;
}

/* ── CARDS ───────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 24px;
}

.blog-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(226, 232, 240, 0.6);
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(13, 148, 136, 0.2);
}

.blog-card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--primary-l);
}
.blog-card-img-placeholder {
  height: 190px;
  background: linear-gradient(135deg, var(--primary-l), #E0F2FE);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.blog-card-body {
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--cat-color, var(--primary));
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
  width: fit-content;
}

.blog-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 8px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.blog-card h2 a {
  color: inherit;
  transition: color var(--transition);
}
.blog-card h2 a:hover {
  color: var(--primary);
}

.blog-card-excerpt {
  font-size: 0.85rem;
  color: var(--slate-m);
  flex: 1;
  margin-bottom: 16px;
  line-height: 1.6;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--slate-l);
  border-top: 1px solid #F1F5F9;
  padding-top: 14px;
  margin-top: auto;
}
.blog-card-read {
  font-weight: 600;
  color: var(--primary);
}

/* ── CARD DESTACADA ──────────────────────────────────────── */
.blog-card-featured {
  flex-direction: row;
  max-height: 280px;
  margin-bottom: 32px;
  border-color: rgba(13, 148, 136, 0.15);
  box-shadow: var(--shadow-md);
}
.blog-card-featured .blog-card-img,
.blog-card-featured .blog-card-img-placeholder {
  width: 340px;
  height: auto;
  min-height: 280px;
  flex-shrink: 0;
  object-fit: cover;
}
.blog-card-featured .blog-card-body {
  padding: 28px 30px;
}
.blog-card-featured h2 {
  font-size: 1.25rem;
}

/* ── SIDEBAR WIDGETS ─────────────────────────────────────── */
.blog-sidebar-widget {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  transition: box-shadow var(--transition);
}
.blog-sidebar-widget:hover {
  box-shadow: var(--shadow-md);
}

.blog-sidebar-widget h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--primary-l);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-sidebar-cats a {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
  font-size: 0.88rem;
  color: var(--slate-m);
  min-height: 44px;
  align-items: center;
  transition: color var(--transition);
}
.blog-sidebar-cats a:hover {
  color: var(--primary);
}
.blog-sidebar-cats span.count {
  background: #F1F5F9;
  padding: 2px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-m);
}

.blog-lead-widget {
  background: var(--primary-gradient);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 24px;
  text-align: center;
  border: none;
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.2);
  animation: leadBreathe 2.8s ease-in-out infinite;
}
@keyframes leadBreathe {
  0%   { box-shadow: 0 4px 20px rgba(13,148,136,.20), 0 0  0   0   rgba(234,179,8,0);    }
  50%  { box-shadow: 0 8px 40px rgba(13,148,136,.40), 0 0  0  14px rgba(234,88,12,.55);  }
  100% { box-shadow: 0 4px 20px rgba(13,148,136,.20), 0 0  0   0   rgba(234,179,8,0);    }
}
@media (prefers-reduced-motion: reduce) {
  .blog-lead-widget { animation: none; }
}
.blog-lead-widget h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  border-bottom: none;
  padding-bottom: 0;
  color: #fff;
}
.blog-lead-widget p {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 18px;
}
.blog-lead-widget input {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 10px;
  outline: none;
  color: var(--slate);
  min-height: 44px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.blog-lead-widget input:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}
.blog-lead-widget button {
  width: 100%;
  background: #FEF9C3;
  color: #854D0E;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 48px;
  transition: all var(--transition);
}
.blog-lead-widget button:hover {
  background: #FEF08A;
  transform: translateY(-1px);
}

/* ── WIDGET FLOTANTE CHECKLIST ────────────────────────────── */
.float-checklist-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%) translateX(100%);
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: 12px 0 0 12px;
  padding: 16px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  z-index: 90;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background var(--transition);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
  min-height: 80px;
}
.float-checklist-tab.visible {
  transform: translateY(-50%) translateX(0);
}
.float-checklist-tab:hover {
  background: var(--primary-d);
}
.float-checklist-tab i {
  font-size: 1.3rem;
}
.float-checklist-tab span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.04em;
}

.float-checklist {
  position: fixed;
  right: -380px;
  top: 50%;
  transform: translateY(-50%);
  width: 340px;
  background: #fff;
  border-radius: 16px 0 0 16px;
  box-shadow: -6px 0 32px rgba(0, 0, 0, 0.15);
  padding: 32px 28px;
  z-index: 91;
  transition: right 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.float-checklist.open {
  right: 0;
}

.float-checklist-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--slate-l);
  cursor: pointer;
  padding: 4px 8px;
  min-height: 36px;
  transition: color var(--transition);
}
.float-checklist-close:hover {
  color: var(--slate);
}

.float-checklist-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}
.float-checklist h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 6px;
}
.float-checklist p {
  font-size: 0.85rem;
  color: var(--slate-m);
  margin-bottom: 18px;
  line-height: 1.6;
}
.float-checklist input[type="email"],
.float-checklist input[type="tel"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 10px;
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--transition);
}
.float-checklist input:focus {
  border-color: var(--primary);
}
.float-checklist button[type="submit"] {
  width: 100%;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 44px;
  transition: all var(--transition);
}
.float-checklist button[type="submit"]:hover {
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
  transform: translateY(-1px);
}

/* ── POPUP ───────────────────────────────────────────────── */
.blog-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 16px;
}
.blog-popup-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.blog-popup {
  background: #fff;
  border-radius: 24px;
  padding: 40px 36px;
  max-width: 480px;
  width: 100%;
  position: relative;
  transform: scale(0.95) translateY(10px);
  transition: all 0.3s ease;
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}
.blog-popup-overlay.show .blog-popup {
  transform: scale(1) translateY(0);
}

.blog-popup-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.4rem;
  color: var(--slate-l);
  cursor: pointer;
  border: none;
  background: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition), color var(--transition);
}
.blog-popup-close:hover {
  background: #F1F5F9;
  color: var(--slate);
}

.blog-popup h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--slate);
  margin-bottom: 8px;
}
.blog-popup p {
  color: var(--slate-m);
  font-size: 0.95rem;
  margin-bottom: 24px;
}
.blog-popup input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 1rem;
  margin-bottom: 12px;
  outline: none;
  min-height: 48px;
  transition: border-color var(--transition);
}
.blog-popup input:focus {
  border-color: var(--primary);
}
.blog-popup .btn-primary {
  width: 100%;
  justify-content: center;
}

/* ── MODAL DE HERRAMIENTAS ───────────────────────────────── */
.tool-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 16px;
}
.tool-modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.tool-modal {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 900px;
  height: 82vh;
  max-height: 740px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.tool-modal-overlay.show .tool-modal {
  transform: translateY(0) scale(1);
}

.tool-modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 12px;
  background: #fff;
}
.tool-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-modal-close {
  background: #F1F5F9;
  border: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--slate-m);
  flex-shrink: 0;
  transition: all var(--transition);
}
.tool-modal-close:hover {
  background: #FEE2E2;
  color: var(--red);
}
.tool-modal-frame {
  flex: 1;
  border: none;
  width: 100%;
  display: block;
  background: #F8FAFC;
}

/* ── BOTONES ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-gradient);
  color: #fff;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.3);
  transform: translateY(-2px);
  color: #fff;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--primary);
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: all var(--transition);
  min-height: 44px;
}
.btn-secondary:hover {
  background: var(--primary-l);
  border-color: var(--primary-d);
}

/* ── PAGINACIÓN ──────────────────────────────────────────── */
.blog-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 40px 0;
  flex-wrap: wrap;
}
.btn-page {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-m);
  background: #fff;
  border: 1.5px solid #E2E8F0;
  transition: all var(--transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.btn-page:hover,
.btn-page.active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(13, 148, 136, 0.2);
}

/* ── FOOTER ──────────────────────────────────────────────── */
.blog-footer {
  background: var(--slate);
  color: #94A3B8;
  padding: 48px 24px 40px;
  margin-top: 64px;
  text-align: center;
  border-top: 4px solid var(--primary);
}
.blog-footer a {
  color: var(--primary-l);
  transition: color var(--transition);
}
.blog-footer a:hover {
  color: #fff;
}
.blog-footer-logo {
  margin-bottom: 16px;
}
.blog-footer-logo img {
  height: 40px;
  margin: 0 auto 10px;
  border-radius: 6px;
}
.blog-footer p {
  font-size: 0.85rem;
  line-height: 1.8;
}

/* ── WHATSAPP FLOTANTE ───────────────────────────────────── */
.blog-wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: #25D366;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
  transition: all var(--transition);
}
.blog-wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.45);
  color: #fff;
}

/* ── POST ────────────────────────────────────────────────── */
.post-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #334155;
  overflow-wrap: break-word;
}
.post-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--slate);
  margin: 2.4rem 0 0.8rem;
  padding-top: 0.5rem;
  letter-spacing: -0.02em;
}
.post-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--slate);
  margin: 1.8rem 0 0.6rem;
}
.post-body p {
  margin-bottom: 1.2rem;
}
.post-body ul,
.post-body ol {
  margin: 0 0 1.2rem 1.4rem;
}
.post-body li {
  margin-bottom: 0.4rem;
}
.post-body blockquote {
  border-left: 4px solid var(--primary);
  background: #F0FDFA;
  margin: 1.5rem 0;
  padding: 16px 24px;
  border-radius: 0 8px 8px 0;
  color: #134E4A;
}
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
}
.post-body a {
  color: var(--primary);
  text-decoration: underline;
}
.post-body .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.2rem 0;
}
.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.post-body th {
  background: #F1F5F9;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
}
.post-body td {
  padding: 9px 14px;
  border-top: 1px solid #E2E8F0;
}
.post-body code {
  background: #F1F5F9;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: monospace;
}
.post-body pre {
  background: #1E293B;
  color: #E2E8F0;
  padding: 18px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.85rem;
  margin: 1.2rem 0;
}

.toc-box {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 32px;
}
.toc-box h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748B;
  margin: 0 0 12px;
}
.toc-box ol {
  margin: 0 0 0 18px;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
}
.toc-box li {
  margin-bottom: 6px;
}
.toc-box a {
  color: var(--primary);
  font-size: 0.9rem;
}
.toc-box a:hover {
  text-decoration: underline;
}

.post-header-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #64748B;
  margin-bottom: 20px;
}
.post-feat-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 28px;
  max-height: 420px;
  object-fit: cover;
}

.author-box {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 36px 0;
}
.author-box img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-box .author-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-l);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.author-box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 2px;
}
.author-box .author-cargo {
  font-size: 0.78rem;
  color: #64748B;
  margin-bottom: 6px;
}
.author-box p {
  font-size: 0.85rem;
  color: var(--slate-m);
  margin: 0;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}
.post-tags a {
  background: #F1F5F9;
  color: var(--slate-m);
  font-size: 0.78rem;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid #E2E8F0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  transition: all var(--transition);
}
.post-tags a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #F0FDFA;
}

.post-share {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 24px 0;
  flex-wrap: wrap;
}
.post-share span {
  font-size: 0.85rem;
  color: #64748B;
  font-weight: 600;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  min-height: 40px;
  transition: all var(--transition);
}
.share-wa {
  background: #25D366;
  color: #fff;
}
.share-wa:hover {
  background: #1DA85E;
  color: #fff;
}
.share-li {
  background: #0A66C2;
  color: #fff;
}
.share-li:hover {
  background: #0957A8;
  color: #fff;
}
.share-tw {
  background: #1DA1F2;
  color: #fff;
}
.share-tw:hover {
  background: #1A8CD8;
  color: #fff;
}
.share-copy {
  background: #F1F5F9;
  color: var(--slate);
  border: 1px solid #E2E8F0;
  cursor: pointer;
}
.share-copy:hover {
  background: #E2E8F0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.faq-section {
  margin: 32px 0;
}
.faq-item {
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  font-weight: 600;
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F8FAFC;
  font-size: 0.95rem;
  min-height: 56px;
  transition: background var(--transition);
}
.faq-q:hover {
  background: #F1F5F9;
}
.faq-a {
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--slate-m);
  display: none;
  border-top: 1px solid #E2E8F0;
  line-height: 1.7;
}
.faq-item.open .faq-a {
  display: block;
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
}
.faq-icon {
  transition: transform 0.3s ease;
  font-size: 0.7rem;
  color: #94A3B8;
}

/* ── CTA FINAL (rediseño) ────────────────────────────────── */
.post-end-cta {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border-radius: 20px;
  padding: 40px 36px;
  margin: 40px 0 32px;
  display: flex;
  gap: 28px;
  align-items: center;
  box-shadow: var(--shadow-lg);
}
.post-end-cta-badge {
  background: var(--primary-gradient);
  border-radius: 16px;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
}
.post-end-cta-body {
  flex: 1;
  min-width: 0;
}
.post-end-cta h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.post-end-cta p {
  font-size: 0.9rem;
  color: #94A3B8;
  margin-bottom: 20px;
  line-height: 1.6;
}
.post-end-cta-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.post-end-cta-primary {
  background: var(--primary-gradient);
  color: #fff !important;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}
.post-end-cta-primary:hover {
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
  transform: translateY(-2px);
  color: #fff !important;
}
.post-end-cta-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #CBD5E1 !important;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all var(--transition);
}
.post-end-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff !important;
}

/* ── BARRA DE PROGRESO ────────────────────────────────────── */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #34D399);
  z-index: 9999;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ── BOTÓN VOLVER ARRIBA ──────────────────────────────────── */
.btn-back-top {
  position: fixed;
  bottom: 90px;
  left: 20px;
  z-index: 88;
  background: #fff;
  border: 1.5px solid #E2E8F0;
  color: var(--slate-m);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--transition);
}
.btn-back-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.btn-back-top:hover {
  background: #F0FDFA;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

/* ── TOC EN SIDEBAR ───────────────────────────────────────── */
.sidebar-toc {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid rgba(226, 232, 240, 0.6);
}
.sidebar-toc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748B;
  margin-bottom: 14px;
  border-bottom: 2px solid #F0FDFA;
  padding-bottom: 10px;
}
.sidebar-toc-header i {
  color: var(--primary);
}
.sidebar-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 42vh;
  overflow-y: auto;
}
.sidebar-toc li {
  margin-bottom: 2px;
}
.sidebar-toc a {
  display: block;
  padding: 7px 12px;
  font-size: 0.82rem;
  color: var(--slate-m);
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all var(--transition);
  line-height: 1.45;
}
.sidebar-toc a:hover {
  color: var(--primary);
  background: #F0FDFA;
  border-left-color: var(--primary);
}
.sidebar-toc a.active {
  color: var(--primary);
  background: #F0FDFA;
  border-left-color: var(--primary);
  font-weight: 600;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */

/* 1024px */
@media (max-width: 1024px) {
  .blog-layout {
    gap: 28px;
  }
}

/* 900px: sidebar abajo */
@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    order: 2;
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  main {
    order: 1;
  }
}

/* 768px: móvil */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .blog-nav-inner {
    padding: 0 16px;
    height: 60px;
  }
  .blog-nav-logo span {
    font-size: 0.88rem;
  }
  .blog-nav-logo img {
    height: 32px;
  }
  .blog-nav-links .nav-hide-mobile {
    display: none !important;
  }
  .blog-nav-cta {
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
  }

  .blog-hero {
    padding: 40px 16px 36px;
  }
  .blog-hero h1 {
    font-size: 1.5rem;
  }
  .blog-hero p {
    font-size: 0.95rem;
    margin-bottom: 22px;
  }
  .blog-hero-search {
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
  }
  .blog-hero-search input,
  .blog-hero-search button {
    width: 100%;
  }

  .blog-container {
    padding: 0 16px;
  }
  .blog-layout {
    padding: 28px 0;
    gap: 24px;
  }

  .blog-card-featured {
    flex-direction: column !important;
    max-height: none !important;
  }
  .blog-card-featured .blog-card-img,
  .blog-card-featured .blog-card-img-placeholder {
    width: 100% !important;
    height: 180px !important;
    min-height: 180px !important;
  }
  .blog-card-featured .blog-card-body {
    padding: 18px;
  }
  .blog-card-featured h2 {
    font-size: 1.05rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .blog-card-img {
    height: 170px;
  }
  .blog-card-body {
    padding: 16px 18px 18px;
  }
  .blog-card h2 {
    font-size: 0.98rem;
  }
  .blog-card-excerpt {
    font-size: 0.85rem;
  }

  .blog-sidebar-widget:not(.blog-lead-widget) {
    display: none;
  }
  .blog-lead-widget {
    padding: 20px;
  }

  .post-body {
    font-size: 1rem;
  }
  .post-body h2 {
    font-size: 1.3rem;
    margin: 1.8rem 0 0.7rem;
  }
  .post-body h3 {
    font-size: 1.05rem;
    margin: 1.3rem 0 0.5rem;
  }
  .post-body blockquote {
    padding: 12px 18px;
  }
  .post-feat-img {
    max-height: 220px;
    margin-bottom: 20px;
  }

  .toc-box {
    padding: 16px 18px;
    margin-bottom: 24px;
  }
  .toc-box ol {
    max-height: 220px;
  }

  .post-header-meta {
    gap: 10px;
    font-size: 0.82rem;
  }

  .author-box {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    margin: 28px 0;
  }
  .author-box img,
  .author-box .author-avatar-placeholder {
    width: 56px;
    height: 56px;
  }

  .post-share {
    gap: 8px;
  }
  .share-btn {
    font-size: 0.82rem;
    padding: 10px 14px;
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .faq-q {
    font-size: 0.92rem;
    padding: 14px 16px;
  }
  .faq-a {
    padding: 14px 16px;
    font-size: 0.88rem;
  }

  .post-end-cta {
    flex-direction: column;
    padding: 24px 20px;
    gap: 16px;
  }
  .post-end-cta-badge {
    width: 54px;
    height: 54px;
    font-size: 1.6rem;
  }
  .post-end-cta h3 {
    font-size: 1.05rem;
  }
  .post-end-cta-btns {
    flex-direction: column;
  }
  .post-end-cta-primary,
  .post-end-cta-secondary {
    justify-content: center;
  }

  .btn-back-top {
    bottom: 82px;
    left: 12px;
  }

  .blog-footer {
    padding: 40px 16px;
    margin-top: 40px;
  }
  .blog-footer p {
    font-size: 0.85rem;
  }
  .blog-footer-logo img {
    height: 32px;
  }

  .blog-popup {
    padding: 28px 20px;
  }
  .blog-popup h2 {
    font-size: 1.2rem;
  }

  .blog-wa-float {
    width: 54px;
    height: 54px;
    font-size: 1.6rem;
    bottom: 16px;
    right: 16px;
  }

  .tool-modal {
    height: 90vh;
    max-height: none;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }
  .tool-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .float-checklist {
    width: 100%;
    border-radius: 16px 16px 0 0;
    top: auto;
    bottom: -100%;
    right: 0;
    transform: none;
    transition: bottom 0.4s ease;
  }
  .float-checklist.open {
    bottom: 0;
    right: 0;
  }
  .float-checklist-tab {
    top: auto;
    bottom: 80px;
    right: 12px;
    transform: translateX(calc(100% + 12px));
    border-radius: 50%;
    width: 52px;
    height: 52px;
    padding: 0;
    min-height: 52px;
  }
  .float-checklist-tab.visible {
    transform: translateX(0);
  }
  .float-checklist-tab span {
    display: none;
  }
  .float-checklist-tab i {
    font-size: 1.5rem;
  }
}

/* 480px */
@media (max-width: 480px) {
  .blog-nav-inner {
    padding: 0 12px;
  }
  .blog-nav-logo span {
    font-size: 0.82rem;
  }
  .blog-nav-logo img {
    height: 28px;
  }
  .blog-nav-cta {
    padding: 8px 14px !important;
    font-size: 0.82rem !important;
  }

  .blog-hero {
    padding: 32px 12px 28px;
  }
  .blog-hero h1 {
    font-size: 1.35rem;
  }
  .blog-hero p {
    font-size: 0.88rem;
  }

  .blog-container {
    padding: 0 12px;
  }
  .blog-layout {
    padding: 20px 0;
    gap: 20px;
  }

  .blog-card-body {
    padding: 14px;
  }
  .blog-card h2 {
    font-size: 0.95rem;
  }
  .blog-card-excerpt {
    font-size: 0.83rem;
  }

  .post-body {
    font-size: 0.97rem;
  }
  .post-body h2 {
    font-size: 1.15rem;
  }
  .post-body h3 {
    font-size: 1rem;
  }
  .post-header-meta {
    gap: 8px;
    font-size: 0.78rem;
  }
  .post-feat-img {
    max-height: 200px;
  }

  .author-box {
    padding: 14px;
  }
  .author-box img,
  .author-box .author-avatar-placeholder {
    width: 48px;
    height: 48px;
  }

  .post-share {
    flex-direction: column;
    align-items: stretch;
  }
  .share-btn {
    justify-content: center;
  }

  .blog-footer {
    padding: 32px 12px;
  }
  .blog-footer p {
    font-size: 0.82rem;
  }
}

/* ── PREFIERE MOVIMIENTO REDUCIDO ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   ADMIN — Estilos del panel de administración
══════════════════════════════════════════════════════════════════ */

/* ── Layout base ─────────────────────────────────────────── */
.admin-wrap {
  display: flex;
  min-height: 100vh;
  background: #F1F5F9;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.admin-sidebar {
  width: 240px;
  min-width: 240px;
  background: #0F172A;
  color: #CBD5E1;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.admin-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #1E293B;
  flex-shrink: 0;
}
.admin-sidebar-logo img {
  height: 36px;
  width: auto;
  border-radius: 6px;
  flex-shrink: 0;
}
.admin-sidebar-logo span {
  font-size: 0.82rem;
  font-weight: 700;
  color: #E2E8F0;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* ── Nav del sidebar ─────────────────────────────────────── */
.admin-nav {
  padding: 12px 10px 20px;
  flex: 1;
}
.admin-nav .nav-section {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #475569;
  padding: 16px 10px 6px;
  margin-top: 4px;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #94A3B8;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  min-height: 40px;
}
.admin-nav a:hover {
  background: #1E293B;
  color: #E2E8F0;
}
.admin-nav a.active {
  background: rgba(13, 148, 136, 0.18);
  color: #2DD4BF;
  font-weight: 600;
}
.admin-nav a i {
  width: 18px;
  text-align: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ── Overlay drawer (móvil) ──────────────────────────────── */
.admin-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.admin-drawer-overlay.open {
  opacity: 1;
}

/* ── Main content ────────────────────────────────────────── */
.admin-main {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ── Topbar ──────────────────────────────────────────────── */
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.admin-topbar h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1E293B;
  margin: 0;
  letter-spacing: -0.01em;
}
.admin-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #64748B;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.admin-hamburger:hover { background: #F1F5F9; }

/* ── Content area ────────────────────────────────────────── */
.admin-content {
  padding: 24px;
  flex: 1;
}

/* ── Stats cards ─────────────────────────────────────────── */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.admin-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow 0.2s;
}
.admin-stat-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }
.admin-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.admin-stat-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1E293B;
  margin: 0 0 2px;
  line-height: 1;
}
.admin-stat-card p {
  font-size: 0.75rem;
  color: #64748B;
  margin: 0;
  font-weight: 500;
}

/* ── Tablas admin ────────────────────────────────────────── */
.admin-table-wrap {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.8);
  overflow: hidden;
}
.admin-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #F1F5F9;
  gap: 12px;
}
.admin-table-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1E293B;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table thead {
  background: #F8FAFC;
}
.admin-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  white-space: nowrap;
}
.admin-table td {
  padding: 12px 16px;
  color: #334155;
  border-top: 1px solid #F1F5F9;
  vertical-align: middle;
}
.admin-table tbody tr:hover { background: #F8FAFC; }

/* ── Badges de estado ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}
.badge-green  { background: #D1FAE5; color: #065F46; }
.badge-yellow { background: #FEF9C3; color: #92400E; }
.badge-purple { background: #EDE9FE; color: #5B21B6; }
.badge-gray   { background: #F1F5F9; color: #475569; }
.badge-red    { background: #FEE2E2; color: #991B1B; }
.badge-blue   { background: #DBEAFE; color: #1E40AF; }

/* ── Forms admin ─────────────────────────────────────────── */
.admin-form-group {
  margin-bottom: 18px;
}
.admin-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.admin-form-group input[type="text"],
.admin-form-group input[type="email"],
.admin-form-group input[type="password"],
.admin-form-group input[type="date"],
.admin-form-group select,
.admin-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1E293B;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.admin-form-group input:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
  border-color: #0D9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}
.admin-form-group .hint {
  font-size: 0.75rem;
  color: #94A3B8;
  margin-top: 4px;
}

/* ── Alertas admin ───────────────────────────────────────── */
.admin-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-alert-success { background: #D1FAE5; color: #065F46; border-left: 4px solid #059669; }
.admin-alert-error   { background: #FEE2E2; color: #991B1B; border-left: 4px solid #DC2626; }
.admin-alert-info    { background: #DBEAFE; color: #1E40AF; border-left: 4px solid #2563EB; }

/* ── Responsive admin ────────────────────────────────────── */
@media (max-width: 1024px) {
  .admin-stats {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    width: 260px;
    min-width: 260px;
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-drawer-overlay {
    display: block;
  }
  .admin-hamburger {
    display: inline-flex;
  }
  .admin-main {
    margin-left: 0;
  }
  .admin-topbar {
    padding: 0 16px;
  }
  .admin-content {
    padding: 16px;
  }
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
  }
  .admin-stat-card {
    padding: 14px 16px;
    gap: 12px;
  }
  .admin-stat-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .admin-stat-card h3 {
    font-size: 1.3rem;
  }
  .admin-table th,
  .admin-table td {
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .admin-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .admin-content {
    padding: 12px;
  }
}