/* ================================================================
 * DDC · Suite Administrativa — overrides globales (cargado SIEMPRE
 * después del style.css del template). Mantener pequeño y temático:
 * solo cambios de marca, no estructura.
 * ================================================================ */

/* ── Tipografía Poppins en TODO el sistema ───────────────────── */
body,
.sidebar, .sidebar *,
.dashboard-main, .dashboard-main *,
.btn, .form-control, .form-select, .form-label,
input, select, textarea, button,
h1, h2, h3, h4, h5, h6,
.card, .modal, .alert, .nav, .breadcrumb {
    font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
}

/* ── Login ──────────────────────────────────────────────────────── */
.ddc-login__hero {
    position: relative;
    background: url('../images/brand/login-bg.jpg') center / cover no-repeat #1f2937;
    min-height: 100vh;
    overflow: hidden;
}
.ddc-login__hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg,
        rgba(20,20,30,.85) 0%,
        rgba(200,16,46,.55) 100%);
    pointer-events: none;
}
.ddc-login__hero-content {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: flex; flex-direction: column;
    justify-content: space-between;        /* logo arriba, warning abajo */
    align-items: flex-start;                /* alineados a la izquierda (estilo legacy) */
    padding: 38px 52px;
    color: #fff;
}
.ddc-login__logo {
    max-width: 320px;
    width: 70%;
    height: auto;
    filter: drop-shadow(0 4px 14px rgba(0,0,0,.5));
}
/* Logo arriba del formulario (área derecha) — conserva tamaño original 285x41 */
.ddc-login__form-logo img {
    height: auto;
    max-width: 100%;
}

/* Botón para mostrar/ocultar contraseña en el input de password */
.ddc-pwd-toggle {
    cursor: pointer;
    line-height: 1;
    transition: color .15s ease;
}
.ddc-pwd-toggle:hover { color: #c8102e !important; }
.ddc-pwd-toggle:focus { outline: none; box-shadow: none; }
/* Padding extra a la derecha del input para que el texto no se monte sobre el ícono */
.icon-field .form-control.pe-56 { padding-right: 3.5rem; }
.ddc-login__warning {
    color: rgba(255,255,255,.95);
    font-size: .92rem;
    line-height: 1.55;
    max-width: 540px;
    text-shadow: 0 1px 3px rgba(0,0,0,.45);
    /* Sin card: solo el texto */
}

/* Área derecha del login: SIEMPRE blanca (incluso en dark mode) */
.auth-right { background: #fff !important; color: #1f2937 !important; }
[data-theme="dark"] .auth-right,
[data-theme="dark"] .auth-right * { color: inherit; }
[data-theme="dark"] .auth-right h4,
[data-theme="dark"] .auth-right h5,
[data-theme="dark"] .auth-right h6,
[data-theme="dark"] .auth-right p,
[data-theme="dark"] .auth-right .text-secondary-light { color: #1f2937 !important; }
[data-theme="dark"] .auth-right .text-secondary-light { color: #6b7280 !important; }
[data-theme="dark"] .auth-right .form-control {
    background-color: #f9fafb !important;
    color: #1f2937 !important;
    border-color: #e5e7eb !important;
}

/* Copyright del login: dos líneas centradas */
.ddc-login__copyright { text-align: center; margin-top: 40px; font-size: .82rem; color: #6b7280; line-height: 1.55; }
.ddc-login__copyright strong { color: #1f2937; display: block; }

/* ── Brand color override — rojo DDC en lugar del azul del template ─ */
:root {
    --bs-primary: #c8102e;
    --bs-primary-rgb: 200, 16, 46;
    --bs-link-color: #c8102e;
    --bs-link-hover-color: #8a0a1f;
}
.btn-primary,
.btn-primary:focus {
    background-color: #c8102e !important;
    border-color: #c8102e !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-primary:active {
    background-color: #8a0a1f !important;
    border-color: #8a0a1f !important;
    color: #fff !important;
}
.btn-outline-primary {
    color: #c8102e !important;
    border-color: #c8102e !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:active {
    background-color: #c8102e !important;
    color: #fff !important;
}
.text-primary,
.text-primary-600 { color: #c8102e !important; }
a { color: #c8102e; }
a:hover { color: #8a0a1f; }
.form-control:focus,
.form-select:focus {
    border-color: #c8102e;
    box-shadow: 0 0 0 .15rem rgba(200,16,46,.12);
}

/* ── Sidebar — escala compacta DDC ─────────────────────────────── */
.sidebar .sidebar-menu-group-title {
    /* Mismo tratamiento que un <th> de tabla compacta */
    font-size: .72rem !important;
    font-weight: 600 !important;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6b7280;
    margin-top: 14px;
    padding-left: 10px;
}
.sidebar .sidebar-menu > li > a,
.sidebar .sidebar-submenu > li > a {
    font-size: .88rem !important;   /* ~14px (antes .82 ≈ 13px) */
    font-weight: 500 !important;
    letter-spacing: .01em;
}
.sidebar .sidebar-menu > li > a > .menu-icon,
.sidebar .sidebar-menu > li > a iconify-icon {
    font-size: 1rem !important;   /* iconos del tamaño del texto */
    margin-right: 10px;
}
/* Item activo con un poco más de presencia */
.sidebar .sidebar-menu > li.active-page > a,
.sidebar .sidebar-menu > li.open > a {
    font-weight: 500 !important;
}
.sidebar .sidebar-menu > li.active-page > a {
    color: #c8102e !important;
    background: rgba(200,16,46,.08);
}
.sidebar .sidebar-menu > li.active-page > a iconify-icon {
    color: #c8102e !important;
}

/* ── Títulos de página — mismo tamaño que el breadcrumb del template ─ */
.ddc-page-title {
    font-size: 1.125rem !important;   /* coincide con h6 del template Wowdash */
    font-weight: 600 !important;
    line-height: 1.3;
    color: #1f2937;
    margin-bottom: 4px !important;
}

/* ── Títulos de cards más compactos ──────────────────────────────── */
.card-header h6,
.card-header .card-title {
    font-size: 1.125rem !important;   /* 18px */
    font-weight: 600 !important;
    color: #1f2937;
    letter-spacing: .01em;
    margin-bottom: 0 !important;
}

/* ── Footer ──────────────────────────────────────────────────────── */
/* Layout sticky-footer: el footer SIEMPRE al fondo de la pantalla,
   incluso cuando el contenido es corto. Wowdash deja .dashboard-main
   como flex-row + flex-wrap; le forzamos columna + min-height para
   que el body crezca y empuje al footer al final. */
.dashboard-main {
    flex-direction: column !important;
    min-height: 100vh;
}
.dashboard-main-body {
    flex: 1 0 auto;
}
.ddc-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}
.ddc-footer p {
    font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: .8rem;
    font-weight: 400;
    color: #6b7280;
    letter-spacing: .01em;
    margin: 0;
}

/* ── Tabla compacta global (mismo patrón que oficina virtual) ──── */
.tbl-compact {
    font-size: .82rem;   /* ~1px menos del default Bootstrap */
}
.tbl-compact thead th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}
.tbl-compact tbody td {
    vertical-align: middle;
    padding-top: .55rem;
    padding-bottom: .55rem;
}

/* Botón-icono cuadrado con bordes redondeados (para acciones de tabla) */
.btn-icon-xs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 1.05rem;
    line-height: 1;
    border-radius: 8px;
    border-width: 1px;
}
.btn-icon-xs iconify-icon { font-size: 1.05rem; line-height: 1; }
.btn-icon-xs:hover { transform: translateY(-1px); }

/* ── Botones de "elegir canal" (Login paso 2) ─────────────────── */
.ddc-canal-grid { gap: 14px !important; }
.ddc-canal-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    min-height: 72px;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #1f2937;
    transition: all .15s ease;
}
.ddc-canal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.ddc-canal-btn__icon {
    font-size: 1.9rem;
    line-height: 1;
    flex-shrink: 0;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    transition: background .15s, color .15s;
}
.ddc-canal-btn__text {
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.2;
    flex: 1;
    text-align: left;
}
.ddc-canal-btn--email { color: #1d4ed8; }
.ddc-canal-btn--email .ddc-canal-btn__icon { background: rgba(29,78,216,.10); color: #1d4ed8; }
.ddc-canal-btn--email:hover { border-color: #1d4ed8; color: #1d4ed8; }
.ddc-canal-btn--email:hover .ddc-canal-btn__icon { background: #1d4ed8; color: #fff; }
.ddc-canal-btn--wa { color: #16a34a; }
.ddc-canal-btn--wa .ddc-canal-btn__icon { background: rgba(22,163,74,.10); color: #16a34a; }
.ddc-canal-btn--wa:hover { border-color: #16a34a; color: #16a34a; }
.ddc-canal-btn--wa:hover .ddc-canal-btn__icon { background: #16a34a; color: #fff; }
.ddc-canal-btn[disabled],
.ddc-canal-btn.is-loading {
    opacity: .55;
    cursor: progress;
    transform: none !important;
    box-shadow: none !important;
}
.ddc-reenviar-btn[disabled],
.ddc-reenviar-btn.is-loading {
    opacity: .55;
    cursor: progress;
}

/* Enlace "Volver al inicio de sesión" — siempre en una línea */
.ddc-volver-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
    font-size: .9rem;
}
.ddc-volver-link iconify-icon { font-size: 1rem; line-height: 1; flex-shrink: 0; }
.ddc-volver-link:hover { color: #c8102e; }

/* Botones de reenvío (paso 3) */
.ddc-reenviar-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #4b5563;
    font-size: .82rem;
    font-weight: 500;
    transition: all .12s;
}
.ddc-reenviar-btn iconify-icon { font-size: 1.05rem; line-height: 1; }
.ddc-reenviar-btn:hover {
    border-color: #c8102e;
    color: #c8102e;
    background: #fef2f3;
}

/* ── DataTables: paginador compacto con iconos ───────────────── */
.dataTables_wrapper .dataTables_paginate {
    padding-top: 12px;
    display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex !important;
    align-items: center; justify-content: center;
    min-width: 32px; height: 32px;
    padding: 0 10px !important;
    margin: 0 !important;
    font-size: .82rem;
    color: #374151 !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    line-height: 1 !important;
    transition: all .12s;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #fef2f3 !important;
    color: #c8102e !important;
    border-color: #c8102e !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #c8102e !important;
    color: #fff !important;
    border-color: #c8102e !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    opacity: .35;
    background: #fff !important;
    color: #374151 !important;
    border-color: #e5e7eb !important;
    cursor: not-allowed;
}
.dataTables_wrapper .dataTables_paginate .paginate_button iconify-icon {
    font-size: 1rem; line-height: 1;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter { font-size: .82rem; }
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input { padding: 4px 8px; font-size: .82rem; }

/* Modales DDC — tipografía y proporciones más sobrias */
.modal .modal-title {
    font-size: 1.1875rem !important;   /* ~19px (≈1rem + 3px) */
    font-weight: 600 !important;
    line-height: 1.3;
    color: #1f2937;
}
.modal .modal-header { padding: 14px 20px; }
.modal .modal-body { padding: 18px 20px; }
.modal .modal-footer { padding: 12px 20px; }
.modal .form-label { font-size: .78rem; font-weight: 500; margin-bottom: 4px; }
.modal .modal-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: .85rem;
    padding: 7px 14px;
}
.modal .modal-footer .btn iconify-icon { font-size: 1rem; line-height: 1; }

/* Cualquier botón que contenga un iconify-icon: 1 línea + icono alineado */
.btn:has(iconify-icon) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.btn iconify-icon { font-size: 1rem; line-height: 1; flex-shrink: 0; }

/* ── Switch (form-switch) estilo DDC — pomo SVG via background-image ── */
/* Wowdash (style.css) inyecta un ::before/::after centrado en el input
   marcado, lo que provoca un pomo fantasma. Lo neutralizamos. */
.form-switch .form-check-input::before,
.form-switch .form-check-input::after {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
}
.form-switch {
    padding-left: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: auto;
}
.form-switch .form-check-input {
    width: 38px !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #d1d5db !important;
    border: 0 !important;
    border-radius: 999px !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color .2s ease, background-position .22s cubic-bezier(.34, 1.3, .64, 1);
    flex-shrink: 0;
    /* Pomo: SVG de un círculo blanco 18×18, posicionado por px desde el borde */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='9' fill='%23fff' filter='url(%23s)'/%3E%3Cdefs%3E%3Cfilter id='s' x='-2' y='-2' width='22' height='22'%3E%3CfeGaussianBlur stdDeviation='0.5'/%3E%3C/filter%3E%3C/defs%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-size: 18px 18px !important;
    background-position: 2px center !important;
}
.form-switch .form-check-input:checked {
    background-color: #c8102e !important;
    /* Reafirmar el mismo SVG para que Bootstrap no inyecte otro distinto */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='9' fill='%23fff'/%3E%3C/svg%3E") !important;
    background-position: 18px center !important; /* 38 - 18 - 2 = 18 desde el borde izq */
}
.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(200,16,46,.18) !important;
    outline: 0;
}
.form-switch .form-check-input:disabled,
.form-switch .form-check-input[disabled] {
    opacity: .5; cursor: not-allowed;
}
.form-switch .form-check-label {
    font-size: .85rem;
    font-weight: 500;
    color: #1f2937;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

/* ── Editor Quill para blogs (toolbar compacto DDC) ──────────── */
.blog-editor { background: #fff; }
.blog-editor.ql-container.ql-snow {
    border: 1px solid #e5e7eb !important;
    border-radius: 0 0 8px 8px !important;
    min-height: 260px;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: .92rem;
}
.ql-toolbar.ql-snow {
    border: 1px solid #e5e7eb !important;
    border-bottom: 0 !important;
    border-radius: 8px 8px 0 0 !important;
    background: #f9fafb;
    padding: 6px 8px !important;
}
.ql-toolbar.ql-snow .ql-formats { margin-right: 10px !important; }
.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow button:focus .ql-stroke,
.ql-toolbar.ql-snow .ql-active .ql-stroke { stroke: #c8102e !important; }
.ql-toolbar.ql-snow button:hover .ql-fill,
.ql-toolbar.ql-snow .ql-active .ql-fill { fill: #c8102e !important; }
.ql-toolbar.ql-snow .ql-picker.ql-active .ql-picker-label,
.ql-toolbar.ql-snow .ql-picker-label:hover { color: #c8102e !important; }
.ql-editor { padding: 14px 16px !important; line-height: 1.6; min-height: 250px; }
.ql-editor.ql-blank::before { color: #9ca3af; font-style: normal; font-size: .9rem; }
.ql-editor p { margin: 0 0 10px 0; }
.ql-editor h1, .ql-editor h2, .ql-editor h3 { font-weight: 600; color: #1f2937; }
.ql-editor blockquote {
    border-left: 4px solid #c8102e; padding: 6px 14px;
    background: #fef2f3; color: #4b5563; margin: 12px 0; border-radius: 0 8px 8px 0;
}
.ql-editor a { color: #c8102e; text-decoration: underline; }

/* ── Preview de imagen del modal de blog ─────────────────────── */
.blog-img-preview {
    position: relative;
    width: 100%; aspect-ratio: 16 / 9;
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    overflow: hidden;
}
.blog-img-preview img { width: 100%; height: 100%; object-fit: cover; display: none; }
.blog-img-preview.has-img img { display: block; }
.blog-img-preview.has-img { border-style: solid; }
.blog-img-fallback {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #9ca3af; font-size: 2rem;
}
.blog-img-preview.has-img .blog-img-fallback { display: none; }

/* ── Listas tipo timeline (gestión / citas en suscriptor edit) ── */
.gescom-list { max-height: 540px; overflow-y: auto; }
.gescom-item { padding: 12px 16px; border-bottom: 1px solid #f1f3f5; }
.gescom-item:last-child { border-bottom: 0; }
.gescom-item__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.gescom-item__tipo { font-size: .72rem; font-weight: 600; color: #c8102e; text-transform: uppercase; letter-spacing: .04em; }
.gescom-item__fecha { font-size: .75rem; color: #6b7280; }
.gescom-item__body { font-size: .85rem; color: #1f2937; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.gescom-item__res { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: #ecfdf5; color: #15803d; font-size: .72rem; font-weight: 600; }

/* ── Autocompletar empresa en modal de Oportunidad ────────────── */
.opo-sug {
    position: relative;
    margin-top: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,.06);
    max-height: 220px;
    overflow-y: auto;
    z-index: 10;
}
.opo-sug__item, .opo-sug__empty {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    font-size: .82rem;
    color: #1f2937;
    cursor: pointer;
}
.opo-sug__item:hover { background: #fef2f3; color: #c8102e; }
.opo-sug__empty { color: #9ca3af; font-style: italic; cursor: default; }

/* ── Header de página de edición de suscriptor ────────────────── */
.susc-edit-header {
    background: linear-gradient(135deg, #fef2f3 0%, #fff 100%);
    border: 1px solid #fde0e3;
    border-radius: 12px;
    padding: 14px 18px;
}
.susc-edit-header__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: #c8102e; color: #fff;
    border-radius: 8px; font-size: 1rem;
    box-shadow: 0 2px 6px rgba(200,16,46,.25);
}
.susc-edit-header__id {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px;
    background: #fff; color: #1f2937;
    border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 0 10px;
    font-weight: 700; letter-spacing: 2px; font-size: .85rem;
}
.susc-edit-header__name { font-size: 1.05rem; color: #1f2937; letter-spacing: .02em; }

.susc-edit-tabs { flex-wrap: wrap; }

/* ── Pestañas (Bootstrap nav-tabs) estilo DDC ─────────────────── */
.ddc-tabs.nav-tabs {
    border-bottom: 1px solid #e5e7eb;
    gap: 4px;
    padding: 0 4px;
}
.ddc-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0 !important;
    background: transparent;
    color: #6b7280;
    font-size: .85rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: color .15s, background .15s;
}
.ddc-tabs .nav-link:hover {
    color: #c8102e;
    background: #fef2f3;
}
.ddc-tabs .nav-link.active {
    color: #c8102e;
    background: transparent;
    font-weight: 600;
}
.ddc-tabs .nav-link.active::after {
    content: ''; position: absolute;
    bottom: -1px; left: 8px; right: 8px;
    height: 2px;
    background: #c8102e;
    border-radius: 2px 2px 0 0;
}
.ddc-tabs .nav-link iconify-icon {
    font-size: 1rem;
    line-height: 1;
}

/* Foto del modal de usuario — preview circular grande */
.usuario-foto-preview {
    position: relative;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: #f1f3f5;
    border: 2px solid #e5e7eb;
    overflow: hidden;
    flex-shrink: 0;
}
.usuario-foto-preview img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: none;
}
.usuario-foto-preview img[src][data-loaded] { display: block; }
.usuario-foto-preview img[src=""] { display: none; }
.usuario-foto-preview img[src]:not([src=""]) { display: block; }
.usuario-foto-fallback {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #9ca3af; font-size: 1.8rem;
}
.usuario-foto-preview img[src]:not([src=""]) ~ .usuario-foto-fallback { display: none; }

/* Avatar fallback (cuando no hay foto o falla la URL) */
.ddc-avatar-fallback {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    background: #f1f3f5;
    color: #9ca3af;
    border-radius: 50%;
    font-size: 1rem;
    flex-shrink: 0;
}
/* Modificadores de tamaño para reutilizar el mismo componente en navbar y modal */
.ddc-avatar-fallback--md { width: 40px; height: 40px; font-size: 1.3rem; }
.ddc-avatar-fallback--lg { width: 80px; height: 80px; font-size: 2rem; }

/* Logo del sidebar — sin restricciones de tamaño (queda con sus medidas reales del PNG).
   Hay que vencer el `img { max-width: 100% }` global del template y el max-height del sidebar. */
.sidebar-logo,
.sidebar-logo img {
    max-width: none !important;
    max-height: none !important;
    width: auto !important;
    height: auto !important;
}
/* Columna Foto en tabla usuarios — fija a 60px */
#tablaUsuarios th:first-child,
#tablaUsuarios td:first-child {
    width: 60px !important;
    min-width: 60px;
    max-width: 60px;
}
/* Columna Usuario (login) — fija a 90px */
#tablaUsuarios th:nth-child(2),
#tablaUsuarios td:nth-child(2) {
    width: 90px !important;
    min-width: 90px;
    max-width: 90px;
}

/* ── Celdas apiladas (Fecha 2-líneas, Nombre/Empresa/Msg, etc) ── */
.dt-fecha { display: flex; flex-direction: column; line-height: 1.15; }
.dt-fecha__d { font-size: .82rem; font-weight: 500; color: #1f2937; }
.dt-fecha__h { font-size: .72rem; color: #6b7280; }
.dt-stack { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.dt-stack strong { font-size: .82rem; color: #1f2937; }
.dt-stack small { font-size: .72rem; }
.dt-stack__msg { color: #6b7280; font-style: italic; }
.dt-badge-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
    width: max-content;
}

/* Acciones — col más ancha para que entren los 2 botones */
#tablaLeads th:last-child, #tablaLeads td:last-child { min-width: 100px; }
#tablaGestion th:last-child, #tablaGestion td:last-child,
#tablaBlogs th:last-child, #tablaBlogs td:last-child {
    min-width: 110px !important; white-space: nowrap;
}

/* ── Barra de filtros compacta (selects tipo pill) ─────────────── */
.ddc-filter-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;          /* siempre en una sola línea */
    white-space: nowrap;
}
.ddc-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    color: #374151;
    transition: border-color .15s, box-shadow .15s;
    margin: 0;
}
.ddc-filter:hover { border-color: #c8102e; }
.ddc-filter:focus-within {
    border-color: #c8102e;
    box-shadow: 0 0 0 .15rem rgba(200,16,46,.12);
}
.ddc-filter iconify-icon {
    font-size: .95rem;
    color: #c8102e;
    flex-shrink: 0;
}
/* ── Dropdown custom DDC (usado dentro de .ddc-filter) ─────────── */
.ddc-dropdown { position: relative; display: inline-flex; align-items: center; }
.ddc-dropdown__trigger {
    display: inline-flex; align-items: center; gap: 6px;
    border: 0; background: transparent;
    color: #374151; font-size: .8rem; font-weight: 500;
    line-height: 1.2; padding: 2px 0; cursor: pointer;
    font-family: 'Poppins', system-ui, sans-serif;
}
.ddc-dropdown__label {
    max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ddc-dropdown__caret {
    font-size: .9rem; color: #9ca3af; transition: transform .15s, color .15s;
}
.ddc-dropdown.is-open  .ddc-dropdown__caret { transform: rotate(180deg); color: #c8102e; }
.ddc-dropdown.has-value .ddc-dropdown__label { color: #c8102e; font-weight: 600; }

.ddc-dropdown__menu {
    position: absolute; top: calc(100% + 8px); left: -8px;
    z-index: 1050;
    width: 260px; max-height: 320px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.04);
    overflow: hidden;
    display: flex; flex-direction: column;
    animation: ddcDropdownIn .12s ease-out;
}
@keyframes ddcDropdownIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ddc-dropdown__search {
    border: 0; border-bottom: 1px solid #f1f3f5;
    padding: 10px 14px;
    font-size: .82rem; color: #374151;
    outline: 0;
    font-family: 'Poppins', system-ui, sans-serif;
    background: #f9fafb;
}
.ddc-dropdown__search:focus { background: #fff; }
.ddc-dropdown__list {
    list-style: none; margin: 0; padding: 4px;
    overflow-y: auto; flex: 1;
}
.ddc-dropdown__list li {
    padding: 7px 12px;
    font-size: .82rem; color: #1f2937;
    border-radius: 8px;
    cursor: pointer;
    transition: background .1s, color .1s;
    font-family: 'Poppins', system-ui, sans-serif;
}
.ddc-dropdown__list li:hover { background: #f9fafb; }
.ddc-dropdown__list li.is-selected {
    background: #fef2f3; color: #c8102e; font-weight: 600;
}
.ddc-dropdown__empty {
    padding: 10px 12px; color: #9ca3af;
    font-size: .78rem; font-style: italic; cursor: default !important;
}
/* Scrollbar suave en el menú */
.ddc-dropdown__list::-webkit-scrollbar { width: 6px; }
.ddc-dropdown__list::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 3px; }
.ddc-dropdown__list::-webkit-scrollbar-thumb:hover { background: #c8102e; }
.ddc-filter-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    color: #9ca3af;
    transition: all .12s;
}
.ddc-filter-clear:hover { color: #c8102e; background: #fef2f3; }
.ddc-filter-clear iconify-icon { font-size: 1.05rem; }

/* ── Leads ─────────────────────────────────────────────────────── */
.leads-mes-nav .leads-mes-pill {
    display: inline-block;
    padding: 4px 14px;
    background: #c8102e; color: #fff;
    border-radius: 999px;
    font-size: .82rem; font-weight: 600;
    min-width: 86px; text-align: center;
    box-shadow: 0 2px 6px rgba(200,16,46,.25);
}
.leads-mes-nav .btn-light:disabled { opacity: .4; }

.leads-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.leads-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    color: #374151;
    font-size: .82rem; font-weight: 500;
    text-decoration: none;
    transition: all .12s;
}
.leads-chip:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,.05); color: #c8102e; border-color: #c8102e; }
.leads-chip.is-active { background: #1f2937; color: #fff; border-color: #1f2937; }
.leads-chip__dot { width: 8px; height: 8px; border-radius: 50%; }
.leads-chip__count {
    background: rgba(0,0,0,.06); color: inherit;
    padding: 1px 8px; border-radius: 999px;
    font-size: .76rem; font-weight: 700; min-width: 22px; text-align: center;
}
.leads-chip.is-active .leads-chip__count { background: rgba(255,255,255,.18); }

.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.lead-grid .lbl { font-size: .7rem; font-weight: 600; color: #6b7280;
                  text-transform: uppercase; letter-spacing: .04em; }
.lead-grid .val { font-size: .9rem; color: #1f2937; word-break: break-word; }
.lead-mensaje {
    background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 10px 14px; font-size: .9rem; white-space: pre-wrap;
}
.lead-modal-seccion {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1.0625rem !important;   /* 17px — !important porque h6 del template gana por especificidad */
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    line-height: 1.2;
}
.lead-modal-seccion iconify-icon { font-size: .95rem; line-height: 1; color: #c8102e; }

/* ── Pill de status reutilizable ────────────────────────────────── */
.status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.status-pill__dot {
    width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}

/* ═══════════════════════════════════════════════════════════════════
   DARK MODE — overrides para componentes propios del suite
   Wowdash conmuta con <html data-theme="dark">.
   ═══════════════════════════════════════════════════════════════════ */

/* Tablas compactas — th con color que se ve en ambos modos */
[data-theme="dark"] .tbl-compact thead th {
    color: #d1d5db;                 /* gris claro legible sobre fondo oscuro */
    border-bottom-color: #374151;
    background: transparent;
}
[data-theme="dark"] .tbl-compact tbody td {
    border-color: #374151;
}

/* Tablas Bootstrap stock — Wowdash a veces deja headers blancos sobre blanco */
[data-theme="dark"] .table > :not(caption) > * > * {
    color: #e5e7eb;
}
[data-theme="dark"] .table thead th,
[data-theme="dark"] table thead th {
    color: #d1d5db !important;
    background-color: transparent !important;
    border-bottom-color: #374151;
}

/* Cards con header bg-white — el fondo blanco hardcodeado no se invierte */
[data-theme="dark"] .card-header.bg-white,
[data-theme="dark"] .bg-white {
    background-color: #1f2937 !important;
    color: #e5e7eb;
    border-color: #374151 !important;
}

/* Selector de país de la topbar — el btn-light queda invisible en dark */
[data-theme="dark"] .ddc-pais-switch .btn-light {
    background-color: #1f2937;
    color: #e5e7eb;
    border-color: #374151;
}
[data-theme="dark"] .ddc-pais-switch .btn-light:hover {
    background-color: #374151;
    color: #fff;
}
[data-theme="dark"] .ddc-pais-switch .text-secondary-light {
    color: #d1d5db !important;
}
[data-theme="dark"] .ddc-pais-switch .dropdown-menu {
    background-color: #1f2937;
    border-color: #374151;
}
[data-theme="dark"] .ddc-pais-switch .dropdown-item {
    color: #e5e7eb;
}
[data-theme="dark"] .ddc-pais-switch .dropdown-item:hover,
[data-theme="dark"] .ddc-pais-switch .dropdown-item.active {
    background-color: #374151;
    color: #fff;
}
[data-theme="dark"] .ddc-pais-switch .dropdown-header {
    color: #9ca3af;
}

/* Chips de filtro (Leads/Suscriptores/Blogs/Banners) en dark */
[data-theme="dark"] .leads-chip {
    background-color: #1f2937;
    color: #e5e7eb;
    border-color: #374151;
}
[data-theme="dark"] .leads-chip.is-active {
    background-color: #374151;
    color: #fff;
    border-color: #4b5563;
}

/* Barras de filtro (ddc-filter-bar) */
[data-theme="dark"] .ddc-filter {
    background-color: #1f2937;
    color: #e5e7eb;
    border-color: #374151;
}
[data-theme="dark"] .ddc-filter-clear {
    background-color: #1f2937;
    color: #d1d5db;
    border-color: #374151;
}

/* Cards de chips count */
[data-theme="dark"] .leads-chip__count {
    background-color: #374151;
    color: #e5e7eb;
}

/* Títulos de página y de cards en dark — Wowdash deja varios h6 en negro */
[data-theme="dark"] .ddc-page-title,
[data-theme="dark"] .card-header h6,
[data-theme="dark"] .card-header .h6,
[data-theme="dark"] .card-body h6 {
    color: #f9fafb !important;
}

/* Fondo de tablas en dark — Bootstrap deja --bs-table-bg blanco hardcoded */
[data-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: #e5e7eb;
    --bs-table-border-color: #374151;
    --bs-table-striped-bg: rgba(255,255,255,0.03);
    --bs-table-striped-color: #e5e7eb;
    --bs-table-hover-bg: rgba(255,255,255,0.05);
    --bs-table-hover-color: #fff;
    background-color: transparent;
    color: #e5e7eb;
}
[data-theme="dark"] .table > tbody > tr > td,
[data-theme="dark"] .table > tbody > tr > th {
    background-color: transparent;
    color: #e5e7eb;
}

/* Wrapper de tabla responsive (el card-body p-0 + table-responsive de últimas gestiones) */
[data-theme="dark"] .table-responsive {
    background-color: transparent;
}

/* List groups dentro de cards (próximas citas, top owners, leads recientes) */
[data-theme="dark"] .card .list-unstyled li {
    border-color: #374151 !important;
}
[data-theme="dark"] .card .list-unstyled li strong,
[data-theme="dark"] .card .list-unstyled li .fw-semibold {
    color: #f3f4f6;
}

/* Texto secondary-light que en dark queda casi negro */
[data-theme="dark"] .text-secondary-light {
    color: #9ca3af !important;
}

/* Border-bottom hardcoded en filas de listas */
[data-theme="dark"] .border-bottom {
    border-color: #374151 !important;
}

