/* ==========================================================================
   MYZ SEGURIDAD - CENTRO DE COMANDO & DOCUMENTACIÓN
   Estilos Corporativos Premium: Dashboard UI/UX
   ========================================================================== */

:root {
  --color-brand: #CC1A24;
  --color-brand-hover: #A3121B;
  --color-brand-light: #FEE2E2;
  --color-brand-dark: #880E14;

  --color-dark: #0F172A;
  --color-dark-surface: #1E293B;
  --color-text: #334155;
  --color-text-muted: #64748B;
  --color-text-light: #94A3B8;

  --color-bg-body: #F8FAFC;
  --color-bg-card: #FFFFFF;
  --color-border: #E2E8F0;
  --color-border-light: #F1F5F9;

  --color-success: #10B981;
  --color-success-light: #D1FAE5;
  --color-info: #0284C7;
  --color-info-light: #E0F2FE;
  --color-warning: #D97706;
  --color-warning-light: #FEF3C7;

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-body);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   TOAST NOTIFICACIÓN
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--color-dark);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  border-left: 4px solid var(--color-success);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  width: 20px;
  height: 20px;
  stroke: var(--color-success);
}

/* ==========================================================================
   HEADER PRINCIPAL
   ========================================================================== */
.app-header {
  height: 70px;
  background-color: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-squircle {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--color-brand), var(--color-brand-hover));
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(204, 26, 36, 0.25);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.header-search {
  flex: 1;
  max-width: 480px;
  margin: 0 24px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  stroke: var(--color-text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 9px 36px 9px 40px;
  background-color: var(--color-bg-body);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--color-dark);
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  background-color: #FFFFFF;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(204, 26, 36, 0.12);
}

.btn-clear-search {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--color-text-muted);
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-success-light);
  color: #065F46;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-phone-quick {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-brand-light);
  color: var(--color-brand-dark);
  border: 1px solid rgba(204, 26, 36, 0.2);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-phone-quick:hover {
  background-color: var(--color-brand);
  color: #FFFFFF;
  border-color: var(--color-brand);
}

.btn-phone-quick svg {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */
.app-layout {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 70px - 50px);
}

/* ==========================================================================
   SIDEBAR (CATEGORÍAS)
   ========================================================================== */
.app-sidebar {
  width: 270px;
  background-color: var(--color-dark-surface);
  color: #FFFFFF;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
  padding: 0 12px 14px 12px;
}

.nav-categories {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: #CBD5E1;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.cat-btn:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.cat-btn.active {
  background-color: var(--color-brand);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(204, 26, 36, 0.35);
}

.cat-icon svg {
  width: 19px;
  height: 19px;
  display: block;
}

.cat-text {
  flex: 1;
}

.cat-count {
  font-size: 0.75rem;
  background-color: rgba(255, 255, 255, 0.12);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.cat-btn.active .cat-count {
  background-color: rgba(0, 0, 0, 0.2);
}

.sidebar-footer-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 24px;
}

.footer-card-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.footer-card-desc {
  font-size: 0.76rem;
  color: var(--color-text-light);
  margin-bottom: 12px;
  line-height: 1.4;
}

.footer-card-btn-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-sidebar-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #25D366;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-sidebar-action:hover {
  background-color: #1EB954;
  transform: translateY(-1px);
}

.btn-sidebar-action.secondary {
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.btn-sidebar-action.secondary:hover {
  background-color: rgba(255, 255, 255, 0.16);
}

.btn-sidebar-action svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   ÁREA PRINCIPAL (MAIN)
   ========================================================================== */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* SUBNAV HORIZONTAL (PESTAÑAS SUPERIORES) */
.subnav-bar {
  background-color: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  position: sticky;
  top: 70px;
  z-index: 90;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.subnav-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.subnav-tab:hover {
  background-color: var(--color-bg-body);
  color: var(--color-dark);
}

.subnav-tab.active {
  background-color: var(--color-dark);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

/* VIEWPORT DE CONTENIDO */
.content-viewport {
  padding: 32px;
  flex: 1;
  max-width: 1360px;
  margin: 0 auto;
  width: 100%;
}

.category-view {
  display: none;
}

.category-view.active {
  display: block;
}

.sub-section {
  display: none;
  animation: fadeIn 0.25s ease forwards;
}

.sub-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   HERO DE SECCIÓN
   ========================================================================== */
.section-hero {
  margin-bottom: 28px;
}

.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-brand);
  background-color: var(--color-brand-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1.25;
  margin-bottom: 8px;
}

.section-lead {
  font-size: 0.96rem;
  color: var(--color-text-muted);
  max-width: 860px;
  line-height: 1.6;
}

/* ==========================================================================
   CARDS DE DECISIÓN RÁPIDA (USUARIO 1.1)
   ========================================================================== */
.decision-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.decision-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.decision-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.decision-header {
  margin-bottom: 12px;
}

.decision-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.decision-badge.corporate { background-color: #E2E8F0; color: #1E293B; }
.decision-badge.modern { background-color: var(--color-brand-light); color: var(--color-brand-dark); }
.decision-badge.direct { background-color: #E0F2FE; color: #0369A1; }
.decision-badge.jobs { background-color: #FEF3C7; color: #92400E; }

.decision-for {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.decision-body h4 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.decision-body p {
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: 14px;
}

.link-box {
  background-color: var(--color-bg-body);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-box code {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--color-brand-dark);
}

.card-actions {
  display: flex;
  gap: 10px;
}

.btn-action-copy,
.btn-action-open {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-action-copy {
  background-color: #FFFFFF;
  color: var(--color-dark);
  border: 1px solid var(--color-border);
}

.btn-action-copy:hover {
  background-color: var(--color-bg-body);
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

.btn-action-open {
  background-color: var(--color-brand);
  color: #FFFFFF;
  border: 1px solid var(--color-brand);
}

.btn-action-open:hover {
  background-color: var(--color-brand-hover);
  border-color: var(--color-brand-hover);
  transform: translateY(-1px);
}

.btn-action-copy svg,
.btn-action-open svg {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   TABLAS DE DATOS & TELEFONOS
   ========================================================================== */
.table-card,
.landings-table-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th {
  background-color: #F1F5F9;
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
}

.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
  line-height: 1.5;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover {
  background-color: #FAFAFC;
}

.phone-item {
  display: flex;
  flex-direction: column;
}

.phone-number {
  font-size: 1.05rem;
  color: var(--color-dark);
  font-weight: 700;
}

.phone-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.badge-role {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background-color: #F1F5F9;
  color: var(--color-dark);
}

.badge-role.sales { background-color: var(--color-success-light); color: #065F46; }
.badge-role.private { background-color: #FEF3C7; color: #92400E; }
.badge-protected { font-size: 0.78rem; font-weight: 700; color: #DC2626; }

.badge-status-green {
  background-color: var(--color-success-light);
  color: #065F46;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
}

.btn-inline-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sm-copy,
.btn-sm-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-sm-copy {
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  color: var(--color-dark);
}

.btn-sm-copy:hover {
  background-color: var(--color-bg-body);
  border-color: #CBD5E1;
}

.btn-sm-open {
  background-color: var(--color-brand);
  border: 1px solid var(--color-brand);
  color: #FFFFFF;
}

.btn-sm-open:hover {
  background-color: var(--color-brand-hover);
}

.btn-sm-copy svg,
.btn-sm-open svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   ALERTA INFORMATIVA
   ========================================================================== */
.info-alert-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background-color: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.alert-icon svg {
  width: 24px;
  height: 24px;
  stroke: #2563EB;
  display: block;
}

.alert-content h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #1E40AF;
  margin-bottom: 4px;
}

.alert-content p {
  font-size: 0.88rem;
  color: #1E3A8A;
  line-height: 1.5;
}

/* ==========================================================================
   STEPS GRID & SCRIPTS
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.step-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.step-number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-brand);
  line-height: 1;
  margin-bottom: 12px;
}

.step-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 10px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: 16px;
}

.clean-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--color-text);
}

.clean-list li {
  padding-left: 18px;
  position: relative;
}

.clean-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-brand);
  font-weight: bold;
}

/* SCRIPTS RESPUESTAS RÁPIDAS */
.scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

.script-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.script-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.script-title {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--color-dark);
}

.btn-script-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--color-brand-light);
  color: var(--color-brand-dark);
  border: 1px solid rgba(204, 26, 36, 0.2);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-script-copy:hover {
  background-color: var(--color-brand);
  color: #FFFFFF;
}

.btn-script-copy svg {
  width: 14px;
  height: 14px;
}

.script-bubble {
  background-color: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 0.9rem;
  color: #14532D;
  line-height: 1.5;
  font-style: italic;
}

/* ==========================================================================
   PORTALES & CALENDARIO
   ========================================================================== */
.split-portals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.portal-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.portal-card.featured {
  border-color: rgba(204, 26, 36, 0.4);
  box-shadow: 0 4px 14px rgba(204, 26, 36, 0.08);
}

.portal-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.portal-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 10px;
}

.portal-desc {
  font-size: 0.92rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 20px;
}

.portal-highlights {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-dark);
}

.highlight-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-brand);
  flex-shrink: 0;
}

.nap-box {
  background-color: var(--color-bg-body);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

/* CALENDARIO META */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.calendar-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.day-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background-color: #1E293B;
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.day-badge.sunday {
  background-color: var(--color-brand);
}

.calendar-card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.calendar-card p {
  font-size: 0.84rem;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: 6px;
}

/* PIPELINE B2B */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.pipeline-step {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.pipeline-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-brand);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.pipeline-step h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 12px;
}

.pipeline-step p {
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: 12px;
}

.email-sequence {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.email-item {
  background-color: var(--color-bg-body);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.84rem;
  color: var(--color-dark);
}

/* ==========================================================================
   TÉCNICOS: CODE BLOCKS, COMANDOS & FISCAL
   ========================================================================== */
.code-card {
  background-color: var(--color-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.code-header {
  background-color: #1E293B;
  color: #CBD5E1;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-card pre {
  padding: 20px;
  color: #F8FAFC;
  font-family: 'Consolas', monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  overflow-x: auto;
}

.commands-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.command-block {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.command-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.command-info strong {
  font-size: 0.95rem;
  color: var(--color-dark);
}

.command-info span {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.command-cli {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--color-dark);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: #38BDF8;
  font-family: monospace;
  font-size: 0.82rem;
  max-width: 60%;
  overflow-x: auto;
}

/* GRID FISCAL */
.fiscal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.fiscal-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.fiscal-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.fiscal-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-dark);
  line-height: 1.3;
}

.fiscal-note {
  font-size: 0.8rem;
  color: var(--color-brand);
  font-weight: 600;
}

/* ==========================================================================
   FOOTER INFORMATIVO
   ========================================================================== */
.app-footer {
  background-color: var(--color-dark-surface);
  color: var(--color-text-light);
  font-size: 0.8rem;
  padding: 16px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-inner code {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ==========================================================================
   INFORME GENERAL & MATRIZ FODA
   ========================================================================== */
.summary-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-metric-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--color-brand-light);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.stat-metric-info {
  display: flex;
  flex-direction: column;
}

.stat-metric-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1.2;
}

.stat-metric-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* CARDS DE DIAGNÓSTICO */
.diagnosis-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.diagnosis-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.diagnosis-header-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.diagnosis-num {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-brand);
  background-color: var(--color-brand-light);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.diagnosis-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-dark);
}

.diagnosis-comparison {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diag-item {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.diag-item.before {
  background-color: #FEF2F2;
  border-left: 3px solid #EF4444;
  color: #991B1B;
}

.diag-item.after {
  background-color: #F0FDF4;
  border-left: 3px solid #22C55E;
  color: #166534;
}

.diag-item strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

/* CUADRÍCULA FODA */
.foda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
}

.foda-quadrant {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.foda-quadrant.f { border-top: 4px solid #10B981; }
.foda-quadrant.o { border-top: 4px solid #0284C7; }
.foda-quadrant.d { border-top: 4px solid #F59E0B; }
.foda-quadrant.a { border-top: 4px solid #EF4444; }

.foda-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.foda-badge {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.foda-quadrant.f .foda-badge { background-color: #10B981; }
.foda-quadrant.o .foda-badge { background-color: #0284C7; }
.foda-quadrant.d .foda-badge { background-color: #F59E0B; }
.foda-quadrant.a .foda-badge { background-color: #EF4444; }

.foda-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark);
}

.foda-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.5;
}

.foda-list li {
  padding-left: 20px;
  position: relative;
}

.foda-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  font-weight: bold;
}

.foda-quadrant.f .foda-list li::before { color: #10B981; }
.foda-quadrant.o .foda-list li::before { color: #0284C7; }
.foda-quadrant.d .foda-list li::before { color: #F59E0B; }
.foda-quadrant.a .foda-list li::before { color: #EF4444; }

/* ==========================================================================
   RESPONSIVE (TABLETS & MÓVILES)
   ========================================================================== */
@media (max-width: 1024px) {
  .app-sidebar {
    width: 230px;
    padding: 16px 12px;
  }
  .command-block {
    flex-direction: column;
    align-items: flex-start;
  }
  .command-cli {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .app-header {
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .header-search {
    order: 3;
    max-width: 100%;
    margin: 0;
    width: 100%;
  }
  .app-layout {
    flex-direction: column;
  }
  .app-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-categories {
    flex-direction: row;
    overflow-x: auto;
  }
  .cat-btn {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  .sidebar-footer-card {
    display: none;
  }
  .content-viewport {
    padding: 16px;
  }
  .decision-cards-grid,
  .split-portals-grid,
  .scripts-grid {
    grid-template-columns: 1fr;
  }
  .data-table {
    display: block;
    overflow-x: auto;
  }
}
