.modules-admin-container {
    padding: 1.5rem 0;
    max-width: 80rem;
    margin: 0 auto;
}

.module-category-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.category-header {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
    cursor: move;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #1e293b;
}

.category-title i {
    color: #3b82f6;
    width: 20px;
    text-align: center;
}

.submodules-list {
    padding: 1rem;
    min-height: 50px;
    background: #ffffff;
}

.submodule-item {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: move;
}

.submodule-item:hover {
    border-color: #3b82f6;
    background: #e2e8f0;
}

.submodule-item i {
    color: #64748b;
    width: 20px;
    text-align: center;
}

.submodule-label {
    flex-grow: 1;
    font-size: 0.875rem;
    color: #334155;
}

.sortable-ghost {
    opacity: 0.4;
    border: 2px dashed #3b82f6 !important;
}

.sortable-chosen {
    background: #dbeafe !important;
}

.drag-handle {
    color: #94a3b8;
    cursor: move;
}

.save-modules-btn {
    position: sticky;
    bottom: 2rem;
    right: 2rem;
    float: right;
    background: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    z-index: 100;
    border: none;
    cursor: pointer;
}

.save-modules-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.4);
}

/* =====================================================================
   SISTEMA DE CASILLAS DE VERIFICACIÓN EMPRESARIALES (.erp-checkbox)
   ===================================================================== */
.erp-checkbox,
.tab-panel input[type="checkbox"]:not(.sr-only):not(.hidden):not([hidden]) {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    flex: 0 0 22px !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    border: 2.5px solid #94a3b8 !important;
    border-radius: 7px !important;
    background-color: #ffffff !important;
    cursor: pointer !important;
    display: inline-grid !important;
    place-content: center !important;
    margin: 0 !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.dark .erp-checkbox,
.dark .tab-panel input[type="checkbox"]:not(.sr-only):not(.hidden):not([hidden]) {
    border-color: #64748b !important;
    background-color: #0f172a !important;
}

.erp-checkbox:hover,
.tab-panel input[type="checkbox"]:not(.sr-only):not(.hidden):not([hidden]):hover {
    border-color: #0891b2 !important;
    transform: scale(1.06) !important;
}

.erp-checkbox:checked,
.tab-panel input[type="checkbox"]:not(.sr-only):not(.hidden):not([hidden]):checked {
    background-color: #0891b2 !important;
    border-color: #0891b2 !important;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.4) !important;
}

.erp-checkbox:checked::before,
.tab-panel input[type="checkbox"]:not(.sr-only):not(.hidden):not([hidden]):checked::before {
    content: "" !important;
    width: 6px !important;
    height: 11px !important;
    border: solid #ffffff !important;
    border-width: 0 2.5px 2.5px 0 !important;
    transform: rotate(45deg) translate(-0.5px, -1px) !important;
    display: block !important;
}

.erp-checkbox:focus-visible,
.tab-panel input[type="checkbox"]:not(.sr-only):not(.hidden):not([hidden]):focus-visible {
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.25) !important;
}

.erp-checkbox-danger:checked {
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4) !important;
}

.erp-checkbox-emerald:checked {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4) !important;
}

.erp-checkbox-indigo:checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4) !important;
}
