:root {
  --gold: #c5a059;
  --gold-light: #e5c158;
  --gold-dark: #a37e4c;
  --white: #ffffff;
  --black: #14120f;
  --charcoal: #1c1813;
  --cream: #faf7f2;
  --line: #e8e0d5;
  --muted: #8c8273;
  --wa-bg: #e9e3d8;
  --wa-green: #25d366;
  --wa-green-dark: #128c7e;
  --wa-bubble-in: #ffffff;
  --wa-bubble-out: #dcf3d5;
  --ok: #3f8a4f;
  --warn: #c07a1f;
  --new: #b23b3b;
  --shadow: 0 12px 35px rgba(20,18,15,.08);
  --font-heading: 'Montserrat', 'Playfair Display', serif;
  --font-subheading: 'Montserrat', serif;
  --font-body: 'Arial', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
}

/* ---------- ONAMI-STYLE SIDEBAR BAR (NEGRO Y DORADO LUXURY) ---------- */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
}

.onami-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 76px;
  background: linear-gradient(180deg, #181410 0%, #110e0b 100%);
  border-right: 1px solid rgba(197, 160, 89, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 20px;
  z-index: 9999;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.4);
}

/* Sidebar expandido al hacer clic en el logo de Cibeles */
body.sidebar-expanded .onami-sidebar {
  width: 240px;
  align-items: flex-start;
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.5);
}

/* Header del Sidebar (Logo Cibeles) */
.sidebar-top {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
  padding-bottom: 16px;
}

.sidebar-logo-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  outline: none;
  transition: transform 0.2s ease;
}

.sidebar-logo-btn:hover {
  transform: scale(1.06);
}

.logo-circle-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1c1813;
  box-shadow: 0 0 14px rgba(197, 160, 89, 0.25);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.sidebar-logo-btn:hover .logo-circle-wrapper {
  border-color: var(--gold-light);
  box-shadow: 0 0 20px rgba(229, 193, 88, 0.45);
}

.logo-circle-wrapper svg {
  height: 32px;
  width: auto;
}

.sidebar-brand-title {
  display: block;
  margin-left: 14px;
  text-align: left;
}

body.sidebar-expanded .sidebar-brand-title,
body.sidebar-open .sidebar-brand-title {
  display: block;
}

.sidebar-brand-title h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.sidebar-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
  padding: 14px 16px;
  width: 100%;
}

/* Menú de Navegación Vertical */
.sidebar-menu {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 10px;
  flex: 1;
}

.sidebar-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 16px;
  height: 46px;
  width: 100%;
  border-radius: 12px;
  color: var(--gold);
  text-decoration: none;
  font-size: 20px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.sidebar-item svg, .sidebar-item i {
  width: 22px;
  height: 22px;
  stroke: var(--gold);
  transition: transform 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
  flex-shrink: 0;
}

.sidebar-item .item-label {
  display: inline-block;
  margin-left: 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cream);
  white-space: nowrap;
}

.sidebar-item:hover {
  background: rgba(197, 160, 89, 0.14);
  color: var(--gold-light);
}

.sidebar-item:hover svg, .sidebar-item:hover i {
  transform: scale(1.12);
  stroke: var(--gold-light);
  filter: drop-shadow(0 0 6px rgba(229, 193, 88, 0.5));
}

.sidebar-item:hover .item-label {
  color: var(--gold-light);
}

.sidebar-item.active {
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.25) 0%, rgba(163, 126, 76, 0.35) 100%);
  border-left: 3px solid var(--gold-light);
  color: var(--gold-light);
  font-weight: 700;
}

.sidebar-item.active svg {
  stroke: var(--gold-light);
  filter: drop-shadow(0 0 4px rgba(229, 193, 88, 0.4));
}

.sidebar-item.active .item-label {
  color: var(--gold-light);
  font-weight: 700;
}

/* Deshabilitar tooltips al pasar el mouse por los elementos del sidebar */
.sidebar-item::after {
  display: none !important;
  content: none !important;
}

/* Footer del Sidebar (Logout / Salir) */
.sidebar-footer {
  width: 100%;
  padding: 10px;
  border-top: 1px solid rgba(197, 160, 89, 0.2);
}

.logout-sidebar-form {
  margin: 0;
  width: 100%;
}

.logout-item {
  background: transparent;
  border: none;
  width: 100%;
}

.logout-item svg, .logout-item i {
  stroke: #e04f5f !important;
  color: #e04f5f !important;
}

.logout-item:hover {
  background: rgba(224, 79, 95, 0.15) !important;
}

.logout-item:hover .item-label {
  color: #e04f5f !important;
}

/* Área Principal de Contenido */
.app-content {
  flex: 1;
  margin-left: 76px;
  transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 100vh;
  background: var(--cream);
}

body.sidebar-expanded .app-content {
  margin-left: 240px;
}

/* Header Superior de Contexto en el Contenido */
.content-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: linear-gradient(90deg, #181410 0%, #110e0b 100%);
  border-bottom: 1px solid rgba(197, 160, 89, 0.25);
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.content-header-bar .page-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  margin: 0;
  color: var(--gold-light);
  text-transform: uppercase;
}

.content-header-bar .user-badge {
  font-size: 13px;
  color: var(--white);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- CONTENEDOR PRINCIPAL ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 22px 24px 60px; }
.view { display: none; }
.view.active { display: block; }

/* ---------- TARJETAS Y PANELES ---------- */
.card { background: #fff; border: 1px solid #000; border-radius: 14px; padding: 18px 20px; box-shadow: none; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.dash-head h2 { margin: 0 0 4px; font-size: 20px; }
.dash-head p { margin: 0; color: #6b6455; font-size: 13px; }

/* ---------- INDICADORES (KPIs) ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .v { font-size: 26px; font-weight: 700; color: var(--black); }
.kpi .l { font-size: 12px; color: var(--muted); margin-top: 2px; letter-spacing: .2px; }
.kpi .v.gold { color: var(--gold-dark); }

/* ---------- TABLAS ---------- */
.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y;
  box-shadow: none;
  width: 100%;
}

.table-wrap::-webkit-scrollbar {
  height: 6px;
}

.table-wrap::-webkit-scrollbar-track {
  background: #f5efe2;
  border-radius: 10px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #c5a059;
  border-radius: 10px;
}
table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
thead th {
  text-align: left; color: #fff; padding: 11px 12px; font-weight: 600;
  font-size: 11.5px; letter-spacing: .3px; text-transform: uppercase;
}
tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #ffffff; }
tbody tr:last-child td { border-bottom: none; }

.badge { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; letter-spacing: .2px; display: inline-block; }
.badge.nuevo { background: #fbe6e6; color: var(--new); }
.badge.agendado { background: #fdf0da; color: var(--warn); }
.badge.confirmado { background: #e2f3e4; color: var(--ok); }
.badge.seguimiento { background: #e8e6f7; color: #5a4fb2; }
.badge.completado { background: #e2f3e4; color: var(--ok); }
.badge.cancelado { background: #fbe6e6; color: var(--new); }

.who-cell .name { font-weight: 600; color: #fff; }
.who-cell .phone { color: #fff; font-size: 11.5px; }
.drink-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #5a5142; }

/* ---------- BOTONES Y FORMULARIOS ---------- */
.replay-btn {
  width: 100%; background: var(--black); color: #fff; border: none; padding: 12px;
  border-radius: 10px; font-size: 13.5px; font-weight: 600; cursor: pointer; letter-spacing: .2px;
}
.replay-btn:hover { background: #000; }
.handoff-btn {
  margin-top: 10px; width: 100%; background: transparent; color: #666; border: 1.5px dashed #bbb;
  padding: 10px; border-radius: 10px; font-size: 12.3px; font-weight: 600; cursor: pointer;
}
.handoff-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.form-input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
  font-family: inherit; margin-bottom: 12px;
}
.form-checkbox { margin-bottom: 12px; }

/* ---------- WHATSAPP SIMULADOR ---------- */
.wa-layout { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }
.phone { width: 360px; background: #0b0b0b; border-radius: 34px; padding: 12px; box-shadow: var(--shadow); flex-shrink: 0; }
.phone-screen {
  background: var(--wa-bg); border-radius: 24px; overflow: hidden; height: 660px; display: flex; flex-direction: column;
  background-image: radial-gradient(rgba(0,0,0,.03) 1px, transparent 1px); background-size: 14px 14px;
}
.wa-header { background: var(--wa-green-dark); color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.wa-header .avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--black); font-size: 14px; }
.wa-header .who .n { font-size: 14.5px; font-weight: 600; }
.wa-header .who .s { font-size: 11.5px; opacity: .85; }

/* Contenedor del chat (definición única y limpia) */
.wa-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #e5ddd5; /* Fondo clásico de WhatsApp */
}

.wa-inputbar { background: #f0f0f0; padding: 8px 10px; display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.wa-inputbar input { flex: 1; border: none; border-radius: 20px; padding: 10px 14px; font-size: 13px; background: #fff; }
.wa-send { width: 36px; height: 36px; border-radius: 50%; background: var(--wa-green-dark); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.wa-side { width: 340px; flex-shrink: 0; }

/* ========== BURBUJAS DEL CHAT ========== */
.bubble {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 12px;
  margin: 4px 0;
  position: relative;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
  clear: both;
}

.bubble.in {
  background: #ffffff;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.bubble.out {
  background: #dcf8c6;
  align-self: flex-end;
  margin-left: auto;
  border-bottom-right-radius: 2px;
}

.bubble .t {
  display: block;
  font-size: 0.7em;
  color: #667;
  text-align: right;
  margin-top: 4px;
}

/* Indicador de escribiendo... */
.typing {
  padding: 10px 14px;
  margin: 6px 0;
  background: #ffffff;
  border-radius: 12px;
  align-self: flex-start;
  display: flex;
  gap: 5px;
  width: fit-content;
}
.typing span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  animation: typing 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* ========== QUICK REPLIES (BOTONES DE RESPUESTA RÁPIDA) ========== */
.wa-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  flex-shrink: 0;
}

.quick-reply-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--black);
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  user-select: none;
}

.quick-reply-btn:hover {
  background: var(--gold-dark);
  color: #fff;
}

/* ========== MEJORAS EN BURBUJAS ========== */
.bubble {
  display: flex;
  flex-direction: column;
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 12px;
  margin: 4px 10px;
  position: relative;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
}

.bubble.in {
  background: #ffffff;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.bubble.out {
  background: #dcf8c6;
  align-self: flex-end;
  margin-left: auto;
  border-bottom-right-radius: 2px;
}

.bubble .t {
  display: block;
  font-size: 0.7em;
  color: #667;
  text-align: right;
  margin-top: 4px;
}

/* ========== INDICADOR ESCRIBIENDO ========== */
.typing {
  padding: 10px 14px;
  margin: 6px 10px;
  background: #ffffff;
  border-radius: 12px;
  align-self: flex-start;
  display: flex;
  gap: 5px;
  width: fit-content;
}

.typing span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  animation: typing 1.2s infinite;
}

.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}


/* ========== QUICK REPLIES ========== */
.wa-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  flex-shrink: 0;
}

.quick-reply-btn {
  display: inline-block;
  background: var(--gold, #c9a24a);
  color: var(--black, #14120f);
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  user-select: none;
}

.quick-reply-btn:hover {
  background: var(--gold-dark, #a6822f);
  color: #fff;
}

/* ========== BOTONES DE REGRESO Y NAVEGACIÓN SECUNDARIA LUXURY ========== */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: #ffffff;
  color: #1c1813 !important;
  border: 1px solid #dcd3c5;
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(20, 18, 15, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  cursor: pointer;
}

.btn-back:hover {
  background: #181410 !important;
  color: #e5c158 !important;
  border-color: #181410 !important;
  box-shadow: 0 6px 18px rgba(24, 20, 16, 0.25);
  transform: translateY(-1.5px);
}

.btn-back .btn-arrow {
  display: inline-block;
  font-size: 15px;
  transition: transform 0.2s ease;
  line-height: 1;
}

.btn-back:hover .btn-arrow {
  transform: translateX(-4px);
}

/* ========== MEJORAS RESPONSIVAS GLOBALES PARA MÓVIL Y TABLET ========== */
@media (max-width: 960px) {
  .app-layout {
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .app-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  body.sidebar-expanded .app-content {
    margin-left: 0 !important;
  }

  .wrap {
    padding: 14px 10px 40px !important;
    max-width: 100% !important;
  }

  .view.active, .view {
    padding: 14px 10px !important;
  }

  /* Tarjetas y Contenedores */
  .card, .stat-card {
    padding: 16px 14px !important;
  }

  /* Grid de Tarjetas KPI */
  div[style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 10px !important;
  }

  /* Tablas Responsivas con Scroll Táctil Suave */
  div[style*="overflow-x: auto"] {
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
    max-width: 100% !important;
  }

  table {
    font-size: 12px !important;
  }

  th, td {
    padding: 10px 12px !important;
  }

  /* Conversión de KPI Cards a Lista Vertical en Móvil y Tablet (<= 960px) */
  .kpi-cards-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .kpi-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 18px !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    border: 1px solid rgba(197, 160, 89, 0.25) !important;
    border-left: 4px solid #c5a059 !important;
    box-shadow: 0 3px 12px rgba(0,0,0,0.03) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .kpi-label {
    margin-top: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #44403c !important;
    order: 1 !important;
    flex: 1 !important;
    padding-right: 10px !important;
  }

  .kpi-value {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #1c1917 !important;
    order: 2 !important;
    text-align: right !important;
    flex-shrink: 0 !important;
  }

  /* APARTADO CRM / DIRECTORIO RESPONSIVO (MÓVIL Y TABLET <= 960px) */
  .crm-sub-nav {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
    padding: 4px !important;
    background: #181410 !important;
    border-radius: 12px !important;
    margin-bottom: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .crm-sub-nav a {
    text-align: center !important;
    padding: 8px 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .crm-dash-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .crm-dash-head h2 {
    font-family: 'Cinzel', serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1c1917 !important;
    margin: 0 0 4px 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
  }

  .crm-dash-head p {
    font-size: 11.5px !important;
    color: #78716c !important;
    margin: 0 !important;
    line-height: 1.3 !important;
  }

  .crm-head-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .crm-head-actions a {
    flex: 1 1 calc(50% - 4px) !important;
    text-align: center !important;
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .crm-head-actions a.tab-btn,
  .crm-head-actions a:only-child {
    flex: 1 1 100% !important;
    padding: 10px 14px !important;
    font-size: 12.5px !important;
    border-radius: 10px !important;
    background: #181410 !important;
    color: #e5c158 !important;
    box-shadow: 0 3px 12px rgba(24, 20, 16, 0.2) !important;
  }

  .crm-metrics-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-top: 14px !important;
  }

  .crm-metrics-grid .card {
    padding: 10px 12px !important;
    text-align: left !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
  }

  .crm-metrics-grid .card div:first-child {
    font-size: 9.5px !important;
    letter-spacing: 0.5px !important;
  }

  .crm-metrics-grid .card div:last-child {
    font-size: 20px !important;
    font-weight: 800 !important;
    margin-top: 2px !important;
  }

  .crm-metrics-grid a:last-child {
    grid-column: span 2 !important;
  }

  .crm-metrics-grid a:last-child .card {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .crm-metrics-grid a:last-child .card div:last-child {
    margin-top: 0 !important;
  }

  .crm-filter-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .crm-filter-form div {
    min-width: 100% !important;
    width: 100% !important;
  }

  .crm-filter-form input,
  .crm-filter-form select {
    padding: 9px 12px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
    border: 1px solid #e7e5e4 !important;
    background: #ffffff !important;
  }

  .crm-filter-form button[type="submit"] {
    width: 100% !important;
    height: 38px !important;
    border-radius: 8px !important;
    font-size: 12.5px !important;
    background: #181410 !important;
    color: #e5c158 !important;
  }

  /* Tabla con Scroll Táctil Fluido en Móvil y Tablet (<= 960px) */
  .table-wrap {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04) !important;
    margin-top: 14px !important;
    width: 100% !important;
    display: block !important;
  }

  .table-wrap table {
    min-width: 780px !important;
    width: 100% !important;
    font-size: 12px !important;
  }

  .table-wrap th,
  .table-wrap td {
    padding: 10px 12px !important;
    white-space: nowrap !important;
  }

  .table-wrap td.who-cell {
    white-space: normal !important;
    min-width: 180px !important;
  }

  /* Formularios y Botones */
  .form-group {
    gap: 8px !important;
  }

  input[type="text"], input[type="search"], select {
    font-size: 13px !important;
  }
}

@media (max-width: 600px) {
  h1, h2 {
    font-size: 18px !important;
  }

  h3 {
    font-size: 15px !important;
  }

  .dash-chip {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }
}
