/* ===============================
   DCX DESIGN SYSTEM
   Light / Dark mode
   =============================== */

/* 1) PALETA BASE (LIGHT) */

:root {
    /* Brand */
    --dcx-primary: #6C0CF2;    /* LOGO_DALECLICKBOX-1 */
    --dcx-primary-soft: #694AD9; /* LOGO_DALECLICKBOX-2 */
    --dcx-success: #6AD99A;    /* LOGO_DALECLICKBOX-3 */
    --dcx-success-strong: #5EF275; /* LOGO_DALECLICKBOX-4 */
    --dcx-black: #0D0D0D;      /* LOGO_DALECLICKBOX-5 */

    /* Neutrales (Light mode) */
    --dcx-bg-page: #F5F6FA;
    --dcx-bg-card: #FFFFFF;
    --dcx-bg-card-soft: #F9FAFB;
    --dcx-border-subtle: #E5E7EB;
    --dcx-text-main: #0F172A;
    --dcx-text-muted: #6B7280;

    /* Accents */
    --dcx-danger: #DC2626;
    --dcx-warning: #D97706;
    --dcx-info: #0369A1;

    /* Sombras y radios */
    --dcx-radius-card: 14px;
    --dcx-shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
    --dcx-shadow-strong: 0 18px 45px rgba(15, 23, 42, 0.25);

    /* Layout */
    --dcx-navbar-height: 60px;
}

/* 2) PALETA (DARK MODE) */

.theme-dark {
    --dcx-bg-page: #0D0D0D;
    --dcx-bg-card: #161616;
    --dcx-bg-card-soft: #111111;
    --dcx-border-subtle: #27272A;
    --dcx-text-main: #F9FAFB;
    --dcx-text-muted: #A1A1AA;
    --dcx-shadow-soft: 0 10px 30px rgba(0,0,0,0.8);
    --dcx-shadow-strong: 0 24px 60px rgba(0,0,0,0.95);
}

/* 3) BASE GLOBAL */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--dcx-bg-page);
    color: var(--dcx-text-main);
}

/* Breeze wrapper */
.min-h-screen {
    min-height: 100vh;
    background: var(--dcx-bg-page);
}

/* 4) NAVBAR SIMPLE (layouts/navigation.blade.php se aprovechará de esto) */

.dcx-navbar {
    height: var(--dcx-navbar-height);
    background: rgba(13, 13, 13, 0.92);
    color: #F9FAFB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.45);
    backdrop-filter: blur(12px);
}

.dcx-navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    letter-spacing: 0.03em;
    font-size: 17px;
}

.dcx-navbar-brand span {
    background: linear-gradient(135deg, var(--dcx-primary), var(--dcx-success));
    -webkit-background-clip: text;
    color: transparent;
}

.dcx-navbar-links {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
}

.dcx-navbar-link a {
    text-decoration: none;
    color: #E5E7EB;
    padding: 4px 8px;
    border-radius: 999px;
}

.dcx-navbar-link a:hover {
    background: rgba(148, 163, 184, 0.25);
}

/* 5) CONTENEDOR GENERAL */

.dcx-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* 6) TARJETAS / CARDS */

.dcx-card,
.dcx-admin-card {
    background: radial-gradient(circle at top left, rgba(108,12,242,0.08), transparent 58%),
                radial-gradient(circle at bottom right, rgba(106,217,154,0.08), transparent 60%),
                var(--dcx-bg-card);
    border-radius: var(--dcx-radius-card);
    padding: 18px 20px;
    box-shadow: var(--dcx-shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.dcx-card-title,
.dcx-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dcx-text-main);
}

/* 7) GRIDS DE STATS */

.dcx-grid,
.dcx-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.dcx-stat-card h3,
.dcx-admin-card h3 {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dcx-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dcx-value,
.dcx-admin-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--dcx-text-main);
}

/* 8) BOTONES */

.dcx-btn-primary,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--dcx-primary), var(--dcx-success));
    box-shadow: 0 10px 25px rgba(108, 12, 242, 0.35);
    text-decoration: none;
}

.dcx-btn-primary:hover,
.btn-primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 14px 30px rgba(108, 12, 242, 0.45);
}

.dcx-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--dcx-border-subtle);
    background: transparent;
    color: var(--dcx-text-main);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

/* 9) TAGS / PILLS / BADGES */

.dcx-pill,
.dcx-tag,
.dcx-alert-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.dcx-pill-status-recibido,
.dcx-pill-bodega {
    background: rgba(108, 12, 242, 0.08);
    color: #4C1D95;
}

.dcx-pill-status-listo,
.dcx-pill-listo {
    background: rgba(106, 217, 154, 0.12);
    color: #166534;
}

.dcx-pill-status-retirado,
.dcx-pill-retirado {
    background: rgba(94, 242, 117, 0.14);
    color: #166534;
}

/* Pills en modo oscuro: menos “lavadas” y más integradas */
.theme-dark .dcx-pill-status-recibido,
.theme-dark .dcx-pill-bodega {
    background: rgba(59, 130, 246, 0.20);
    color: #bfdbfe;
}

.theme-dark .dcx-pill-status-listo,
.theme-dark .dcx-pill-listo {
    background: rgba(34, 197, 94, 0.20);
    color: #bbf7d0;
}

.theme-dark .dcx-pill-status-retirado,
.theme-dark .dcx-pill-retirado {
    background: rgba(148, 163, 184, 0.25);
    color: #e5e7eb;
}


/* 10) TABLAS */

.dcx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

@media (max-width: 600px) {
    .dcx-table {
        font-size: 12px;
    }

    .dcx-table th {
        font-size: 11px;
    }
}

.dcx-table th,
.dcx-table td {
    padding: 9px 8px;
    border-bottom: 1px solid var(--dcx-border-subtle);
}

.dcx-table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dcx-text-muted);
}

.dcx-table td {
    color: var(--dcx-text-main);
}

/* 11) FORMULARIOS */

.dcx-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--dcx-text-muted);
}

.dcx-form-group input,
.dcx-form-group select,
.dcx-form-group textarea {
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid var(--dcx-border-subtle);
    background: var(--dcx-bg-card-soft);
    color: var(--dcx-text-main);
    font-size: 14px;
}

.dcx-form-group textarea {
    resize: vertical;
}

.dcx-form-help,
.dcx-help {
    font-size: 12px;
    color: var(--dcx-text-muted);
}

/* 12) ADDRESS BOX DCX (dashboard cliente) */

.dcx-address-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dcx-address-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--dcx-border-subtle);
}

.dcx-address-label {
    font-size: 13px;
    color: var(--dcx-text-muted);
}

.dcx-address-value {
    font-size: 14px;
    font-weight: 600;
}

.dcx-copy-btn {
    border: none;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    background: rgba(148, 163, 184, 0.25);
    color: var(--dcx-text-main);
}

/* 13) ALERT POPUP (ya usado) */

.dcx-alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dcx-alert-modal {
    background: radial-gradient(circle at top left, rgba(108,12,242,0.16), transparent 55%),
                radial-gradient(circle at bottom right, rgba(106,217,154,0.16), transparent 60%),
                var(--dcx-bg-card);
    border-radius: 16px;
    max-width: 420px;
    width: 90%;
    padding: 20px 22px;
    box-shadow: var(--dcx-shadow-strong);
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.dcx-alert-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dcx-text-main);
}

.dcx-alert-body {
    font-size: 14px;
    color: var(--dcx-text-main);
    margin-bottom: 14px;
}

.dcx-alert-badge-info { background:#e0f2fe;color:#0369a1; }
.dcx-alert-badge-warning { background:#fef3c7;color:#92400e; }
.dcx-alert-badge-danger { background:#fee2e2;color:#b91c1c; }

/* Ajuste de badges en dark mode */
.theme-dark .dcx-alert-badge-info {
    background: rgba(59, 130, 246, 0.22);
    color: #bfdbfe;
}

.theme-dark .dcx-alert-badge-warning {
    background: rgba(250, 204, 21, 0.22);
    color: #facc15;
}

.theme-dark .dcx-alert-badge-danger {
    background: rgba(248, 113, 113, 0.25);
    color: #fecaca;
}

.theme-dark .dcx-alert-overlay {
    background: rgba(15, 23, 42, 0.78);
}


/* 14) BOTÓN FLOTANTE DE TEMA */

.dcx-theme-toggle {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: radial-gradient(circle at 30% 0%, #facc15, transparent 55%),
                radial-gradient(circle at 80% 120%, #22c55e, transparent 55%),
                #020617;
    color: #F9FAFB;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 35px rgba(0,0,0,0.7);
    z-index: 9998;
    font-size: 18px;
}

/* 15) PAGINACIÓN SIMPLE (links de Laravel) */

.dcx-pagination nav > div {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

/* ===============================
   DCX LAYOUT WRAPPER
=============================== */

.dcx-layout {
    display: flex;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(108,12,242,0.10), transparent 55%),
                radial-gradient(circle at bottom right, rgba(106,217,154,0.10), transparent 65%),
                var(--dcx-bg-page);
}

/* ===============================
   DCX SIDEBAR – GLASSMORPHISM PREMIUM
=============================== */

.dcx-sidebar {
    width: 240px;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(16px);
    background: linear-gradient(
        135deg,
        rgba(108, 12, 242, 0.16) 0%,
        rgba(13, 13, 13, 0.75) 40%,
        rgba(0, 0, 0, 0.80) 100%
    );
    border-right: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 6px 0 22px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    transition: width 0.28s ease;
}

/* LOGO SUPERIOR */

.dcx-sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.dcx-sidebar-logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dcx-primary), var(--dcx-success));
    box-shadow: 0 8px 18px rgba(108, 12, 242, 0.45);
    color: white;
    font-size: 18px;
}

.dcx-sidebar-logo-text .main {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
}

.dcx-sidebar-logo-text .sub {
    display: block;
    font-size: 11px;
    margin-top: -2px;
    color: #9CA3AF;
}

/* TITULOS DE SECCIÓN */

.dcx-sidebar-section-title {
    margin: 18px 10px 6px;
    font-size: 11px;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.55;
}

/* MENU */

.dcx-sidebar-menu {
    padding: 0;
    margin: 0;
    list-style: none;
}

.dcx-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    color: #E2E8F0;
    transition: 0.25s ease;
    position: relative;
    backdrop-filter: blur(3px);
}

.dcx-sidebar-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #E2E8F0;
}

/* HOVER EFECTO GLASS GLOW */

.dcx-sidebar-link:hover {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 18px rgba(108, 12, 242, 0.32);
    transform: translateX(4px);
}

/* ACTIVE STATE - DEGRADADO PREMIUM */

.dcx-sidebar-link.is-active {
    background: linear-gradient(
        135deg,
        rgba(108, 12, 242, 0.95),
        rgba(106, 217, 154, 0.75)
    );
    color: #fff;
    box-shadow: 0 10px 28px rgba(108, 12, 242, 0.55);
    transform: translateX(4px);
}

.dcx-sidebar-link.is-active i {
    color: #fff;
}

.dcx-sidebar-link.is-active::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 999px;
    background: var(--dcx-success);
}

/* FOOTER USUARIO */

.dcx-sidebar-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    display: flex;
    align-items: center;
    gap: 12px;
}

.dcx-sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--dcx-primary), var(--dcx-success));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: white;
    box-shadow: 0 6px 16px rgba(108, 12, 242, 0.45);
}

.dcx-sidebar-user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.dcx-sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.dcx-sidebar-user-role {
    font-size: 11px;
    color: #cbd5e1;
}

.dcx-sidebar-logout-btn {
    margin-left: auto;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: none;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.dcx-sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: translateX(3px);
}

/* BADGE EN MENÚ */

.dcx-menu-badge {
    background: #6AD99A;
    color: #0F172A;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 999px;
    margin-left: auto;
}

/* ===============================
   MAIN / CONTENIDO
=============================== */

.dcx-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

@media (min-width: 821px) {
    .dcx-main {
        margin-left: 0; /* ya estamos dentro de dcx-layout flex */
    }
}

/* CONTENEDOR INTERNO */

.dcx-shell {
    max-width: 1200px;
    width: 100%;
    padding: 0 22px 32px;
    margin: 0 auto;
}

/* ===============================
   HEADER SUPERIOR
=============================== */

.dcx-header {
    height: 56px;
    background: var(--dcx-bg-card);
    border-bottom: 1px solid var(--dcx-border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.dcx-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dcx-header-logo {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--dcx-primary), var(--dcx-success));
    -webkit-background-clip: text;
    color: transparent;
}

.dcx-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Botones icono */
.dcx-header-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    background: var(--dcx-bg-card-soft);
    color: var(--dcx-text-main);
    display: flex;
    align-items:center;
    justify-content:center;
    cursor: pointer;
    font-size: 14px;
    transition: 0.15s ease;
}

.dcx-header-icon:hover {
    background: rgba(148,163,184,0.25);
}

/* Perfil */
.dcx-header-profile {
    position: relative;
}

.dcx-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--dcx-primary), var(--dcx-success));
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items:center;
    justify-content:center;
}

/* Submenú perfil */
.dcx-profile-menu {
    position: absolute;
    right: 0;
    top: 46px;
    background: var(--dcx-bg-card);
    border: 1px solid var(--dcx-border-subtle);
    border-radius: 10px;
    width: 180px;
    display: none;
    flex-direction: column;
    box-shadow: var(--dcx-shadow-soft);
    z-index: 100;
}

.dcx-profile-menu.open {
    display: flex;
}

.dcx-profile-menu a,
.dcx-profile-menu button {
    padding: 10px 14px;
    font-size: 14px;
    display: flex;
    align-items:center;
    gap: 8px;
    width: 100%;
    color: var(--dcx-text-main);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
}

.dcx-profile-menu a:hover,
.dcx-profile-menu button:hover {
    background: rgba(148,163,184,0.25);
}

/* ===============================
   SIDEBAR COLAPSADO (DESKTOP)
=============================== */

.dcx-sidebar.collapsed {
    width: 78px;
}

/* Ocultar textos en modo colapsado */
.dcx-sidebar.collapsed .dcx-collapse-hide {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

/* Centrar iconos en modo colapsado */
.dcx-sidebar.collapsed .dcx-sidebar-link {
    justify-content: center;
}

.dcx-sidebar.collapsed .dcx-sidebar-link i {
    margin-right: 0;
}

/* Ocultar títulos y texto usuario en colapsado */
.dcx-sidebar.collapsed .dcx-sidebar-section-title,
.dcx-sidebar.collapsed .dcx-sidebar-user-text {
    display: none;
}

.dcx-sidebar.collapsed .dcx-sidebar-logo-icon {
    margin: 0 auto;
}

/* ===============================
   MOBILE SIDEBAR
=============================== */

@media (max-width: 820px) {

    .dcx-layout {
        flex-direction: row;
    }

    .dcx-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        width: 240px;
        transition: left 0.3s ease;
    }

    .dcx-sidebar.open {
        left: 0;
    }

    .dcx-main {
        margin-left: 0 !important;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

/* AJUSTES FINOS DEL COLAPSADO DCX */

/* Centrar el bloque del logo arriba */
.dcx-sidebar.collapsed .dcx-sidebar-header {
    justify-content: center;
}

/* Quitar espacios pensados para el texto */
.dcx-sidebar.collapsed .dcx-sidebar-link {
    justify-content: center;
    gap: 0;
    padding-left: 10px;
    padding-right: 10px;
}

/* Iconos bien centrados dentro de la columna */
.dcx-sidebar.collapsed .dcx-sidebar-link i {
    width: auto;
    text-align: center;
    margin-right: 0;
}

/* El logo queda solo como “pastilla” centrada */
.dcx-sidebar.collapsed .dcx-sidebar-logo-icon {
    margin: 0 auto;
}

/* Footer: avatar centrado y botón de logout debajo */
.dcx-sidebar.collapsed .dcx-sidebar-footer {
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.dcx-sidebar.collapsed .dcx-sidebar-logout-btn {
    margin-left: 0;
}


/* ===============================
   DCX SIDEBAR — FIX COLAPSADO
=============================== */

/* 1) Reducir padding horizontal en modo colapsado */
.dcx-sidebar.collapsed {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

/* 2) Centrar todo (logo + menú + footer) */
.dcx-sidebar.collapsed .dcx-sidebar-header,
.dcx-sidebar.collapsed .dcx-sidebar-footer {
    justify-content: center !important;
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 3) Ajustar altura y forma de los botones del menú */
.dcx-sidebar.collapsed .dcx-sidebar-link {
    width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
    margin: 8px auto !important;
    border-radius: 14px !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* 4) Iconos centrados y tamaño consistente */
.dcx-sidebar.collapsed .dcx-sidebar-link i {
    font-size: 20px !important;
    margin: 0 !important;
    width: 20px !important;
    text-align: center !important;
}

/* 5) Ocultar completamente textos */
.dcx-sidebar.collapsed .dcx-collapse-hide {
    display: none !important;
}
.dcx-sidebar.collapsed .dcx-sidebar-section-title {
    display: none !important;
}
.dcx-sidebar.collapsed .dcx-sidebar-user-text {
    display: none !important;
}

/* 6) Logo reducido y centrado */
.dcx-sidebar.collapsed .dcx-sidebar-logo-icon {
    width: 46px !important;
    height: 46px !important;
    margin: 0 auto !important;
}

/* 7) Footer: avatar y logout uno debajo del otro */
.dcx-sidebar.collapsed .dcx-sidebar-footer {
    flex-direction: column !important;
    gap: 12px !important;
}

.dcx-sidebar.collapsed .dcx-sidebar-logout-btn {
    margin: 0 auto !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 8) BADGES ocultos en modo colapsado */
.dcx-sidebar.collapsed .dcx-menu-badge {
    display: none !important;
}

/* ===================================
   OVERLAY PARA SIDEBAR EN MÓVIL
=================================== */

.dcx-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 998; /* Debajo del sidebar, encima del contenido */
    display: none;
}

/* Modo visible */
.dcx-sidebar-overlay.is-active {
    display: block;
}

/* En escritorio nunca mostramos overlay */
@media (min-width: 821px) {
    .dcx-sidebar-overlay {
        display: none !important;
    }
}

.dcx-sidebar {
    z-index: 999 !important;
}


/* ===============================
   TOOLTIP PARA SIDEBAR COLAPSADO
=============================== */

.dcx-sidebar.collapsed .dcx-sidebar-link {
    position: relative;
}

/* Bubble */
.dcx-sidebar.collapsed .dcx-sidebar-link::after {
    content: attr(data-label);
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: rgba(15,23,42,0.96);
    color: #E5E7EB;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 1200;
}

/* Flechita del tooltip */
.dcx-sidebar.collapsed .dcx-sidebar-link::before {
    content: "";
    position: absolute;
    left: 62px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent rgba(15,23,42,0.96) transparent transparent;
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* Mostrar al hover */
.dcx-sidebar.collapsed .dcx-sidebar-link:hover::after,
.dcx-sidebar.collapsed .dcx-sidebar-link:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
}
/* ===============================
   DCX SIDEBAR TOOLTIP (FINAL WORKING VERSION)
   =============================== */

/* Aseguramos que el link es relativo en modo colapsado */
.dcx-sidebar.collapsed .dcx-sidebar-link {
    position: relative;
    justify-content: center; /* ya lo tienes pero lo reforzamos */
}

/* Tooltip burbuja */
.dcx-sidebar.collapsed .dcx-sidebar-link:hover::after {
    content: attr(data-label);
    position: absolute;
    left: 80px; /* separación del ícono */
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.95);
    color: #F8FAFC;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.45);
    opacity: 1;
    z-index: 2000;
    pointer-events: none;
}

/* Flechita del tooltip */
.dcx-sidebar.collapsed .dcx-sidebar-link:hover::before {
    content: "";
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent rgba(15,23,42,0.95) transparent transparent;
    z-index: 2000;
    pointer-events: none;
}
.dcx-sidebar.collapsed li {
    position: relative;
}

/* En pantallas pequeñas, el grid principal se vuelve 1 sola columna */
@media (max-width: 900px) {
    .dcx-shell > .dcx-grid:nth-of-type(2) {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}


/* Dirección DCX – mejor comportamiento en pantallas pequeñas */
@media (max-width: 600px) {
    .dcx-address-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .dcx-address-value {
        word-break: break-word;
    }

    .dcx-copy-btn {
        align-self: flex-end;
        margin-top: 2px;
    }
}


/* FORMULARIO PREALERTA – layout bonito */
#prealerta form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

/* En móvil: botón ancho completo, centrado */
#prealerta .dcx-btn-primary {
    width: 100%;
    justify-content: center;
}

/* En pantallas medias/grandes: input + botón en una fila */
@media (min-width: 768px) {
    #prealerta form {
        flex-direction: row;
        align-items: flex-end;
    }

    #prealerta .dcx-form-group {
        flex: 1;
        margin-bottom: 0; /* ya controlamos el gap por flex */
    }

    #prealerta .dcx-btn-primary {
        width: auto;
        white-space: nowrap;
        padding-inline: 16px;
    }
}


.dcx-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--dcx-primary), var(--dcx-success));
    color: #fff !important;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(108, 12, 242, 0.35);
}

.dcx-btn-download i {
    font-size: 12px;
}

.dcx-btn-download:hover {
    filter: brightness(1.06);
}

.dcx-pager{
  display:flex; align-items:center; justify-content:flex-end;
  gap:10px; padding:14px 0;
}
.dcx-pager-btn{
  width:42px;height:42px;border-radius:14px;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid rgba(148,163,184,0.25);
  background:var(--dcx-bg-card-soft); color:var(--dcx-text-main);
  text-decoration:none; transition:.15s ease;
}
.dcx-pager-btn:hover{ transform:translateY(-1px); box-shadow:0 10px 25px rgba(108,12,242,.18); }
.dcx-pager-btn.is-disabled{ opacity:.4; pointer-events:none; }

.dcx-pager-pages{ display:flex; align-items:center; gap:8px; }
.dcx-pager-page{
  min-width:42px;height:42px;padding:0 12px;border-radius:14px;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid rgba(148,163,184,0.25);
  background:transparent; color:var(--dcx-text-main);
  text-decoration:none; font-weight:700;
}
.dcx-pager-page:hover{ background:rgba(148,163,184,.16); }
.dcx-pager-page.is-active{
  background:linear-gradient(135deg,var(--dcx-primary),var(--dcx-success));
  color:#fff; border:none; box-shadow:0 12px 28px rgba(108,12,242,.28);
}
.dcx-pager-ellipsis{ color:var(--dcx-text-muted); padding:0 6px; }


/* ===============================
   DCX AUTH (Register/Login)
=============================== */

.dcx-auth-wrap{
    min-height: calc(100vh - 40px);
    display:flex;
    align-items:center;
    justify-content:center;
    padding: 26px 14px;
    background:
      radial-gradient(circle at 18% 10%, rgba(108,12,242,0.18), transparent 55%),
      radial-gradient(circle at 82% 90%, rgba(106,217,154,0.14), transparent 60%),
      var(--dcx-bg-page);
}

.dcx-auth-card{
    width: min(560px, 100%);
    padding: 18px 18px 16px;
}

.dcx-auth-header{
    display:flex;
    align-items:center;
    gap: 12px;
    padding: 4px 2px 10px;
}

.dcx-auth-logo{
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    background: linear-gradient(135deg, var(--dcx-primary), var(--dcx-success));
    color:#fff;
    box-shadow: 0 14px 30px rgba(108,12,242,0.35);
    flex-shrink:0;
}

.dcx-auth-title{
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .2px;
    color: var(--dcx-text-main);
}

.dcx-gradient-text{
    background: linear-gradient(135deg, var(--dcx-primary), var(--dcx-success));
    -webkit-background-clip:text;
    color: transparent;
}

.dcx-auth-subtitle{
    margin-top: 4px;
    font-size: 12px;
    color: var(--dcx-text-muted);
}

.dcx-auth-divider{
    height:1px;
    background: rgba(148,163,184,0.20);
    margin: 6px 0 14px;
}

.dcx-auth-form{
    display:flex;
    flex-direction:column;
    gap: 10px;
}

.dcx-auth-grid-2{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Mobile: 1 column */
@media (max-width: 560px){
    .dcx-auth-grid-2{
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Input focus glow DCX */
.dcx-form-group input:focus,
.dcx-form-group select:focus,
.dcx-form-group textarea:focus{
    outline: none;
    border-color: rgba(108,12,242,0.55);
    box-shadow: 0 0 0 4px rgba(108,12,242,0.18);
}

/* Captcha spacing */
.dcx-auth-captcha{
    margin-top: 6px;
}

/* Actions */
.dcx-auth-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 10px;
    flex-wrap:wrap;
    margin-top: 6px;
}

.dcx-auth-link{
    font-size: 12px;
    color: var(--dcx-text-muted);
    text-decoration:none;
}

.dcx-auth-link:hover{
    color: var(--dcx-text-main);
    text-decoration: underline;
}

.dcx-auth-mini-note{
    margin-top: 10px;
    font-size: 11px;
    color: var(--dcx-text-muted);
}

/* Errors box */
.dcx-auth-errors{
    background: rgba(220,38,38,0.10);
    border: 1px solid rgba(220,38,38,0.25);
    color: var(--dcx-text-main);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 12px;
}

/* ===============================
   GUEST CENTER (LOGIN/REGISTER)
   Centro inteligente + scroll seguro
=============================== */

.dcx-guest-center{
  min-height: 100svh; /* mejor que 100vh en móviles */
  display: flex;
  justify-content: center;

  /* en vez de align-items:center fijo, lo controlamos por breakpoint */
  align-items: flex-start;

  padding: 28px 18px;

  background:
    radial-gradient(circle at 20% 10%, rgba(108,12,242,.18), transparent 55%),
    radial-gradient(circle at 80% 120%, rgba(106,217,154,.14), transparent 60%),
    var(--dcx-bg-page);
}

/* En pantallas medianas/grandes sí centramos vertical */
@media (min-width: 920px){
  .dcx-guest-center{
    align-items: center;
    padding: 24px;
  }
}

/* Wrapper global guest */
.dcx-guest-center{
  min-height: 100svh;
  display:flex;
  justify-content:center;
  padding: 26px 18px;

  background:
    radial-gradient(circle at 20% 10%, rgba(108,12,242,.18), transparent 55%),
    radial-gradient(circle at 80% 120%, rgba(106,217,154,.14), transparent 60%),
    var(--dcx-bg-page);
}

/* Caja auth (login/register) */
.dcx-auth-box{
  width:100%;
}

/* Login: siempre centrado vertical */
.dcx-auth-box--center{
  align-self:center;      /* centra dentro del flex */
}

/* Register: se pega arriba con margen (evita recaptcha empujando raro) */
.dcx-auth-box--top{
  align-self:flex-start;
  margin-top: 8px;
  margin-bottom: 14px;
}


@media (max-width: 820px){
  .dcx-grid[style*="grid-template-columns: minmax(0, 2fr)"]{
    grid-template-columns: 1fr !important;
  }
}

/* Evita que los dropdowns de Quill queden detrás o cortados */
.ql-toolbar,
.ql-container,
.ql-editor {
  position: relative;
}

.ql-snow .ql-picker-options {
  z-index: 9999 !important;
}

.dcx-card {
  overflow: visible !important;
}

/* Select de variables visible en light/dark */
#dcx-vars{
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--dcx-border-subtle);
  background: var(--dcx-bg-card);
  color: var(--dcx-text-main);
  padding: 4px 10px;
  font-size: 13px;
  outline: none;
}

/* Quill toolbar no “aplana” el select */
.ql-toolbar select{
  background: var(--dcx-bg-card) !important;
  color: var(--dcx-text-main) !important;
}
